Skip to content

Commit

Permalink
Merge pull request #35 from gemini-hlsw/websocket-inputs
Browse files Browse the repository at this point in the history
Fixed input format
  • Loading branch information
dngomez authored Jul 5, 2024
2 parents 57fd127 + b4a7487 commit 83973fd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/components/ControlPanel/ControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ export default function ControlPanel() {
txMessage({
startTime: datesState[0].toISOString().split(".")[0].replace("T", " "),
endTime: datesState[1].toISOString().split(".")[0].replace("T", " "),
sites: siteState,
sites: siteState === "ALL_SITES" ? ["GN", "GS"] : [siteState],
schedulerMode: "VALIDATION",
semesterVisibility: "True",
numNightsToSchedule: numNight,
numNightsToSchedule: numNight.toString(),
rankerParameters: {
thesisFactor: thesis,
power: power,
metPower: metPower,
visPower: visPower,
whaPower: whaPower,
thesisFactor: thesis.toFixed(1),
power: power.toString(),
metPower: metPower.toFixed(1),
visPower: visPower.toFixed(1),
whaPower: whaPower.toFixed(1),
},
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/components/GlobalState/GlobalState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function GlobalStateProvider({
}) {
const [nightPlans, setNightPlans] = useState<NightPlanType[]>([]);
const [plansSummary, setPlansSummary] = useState<object>({});
const [thesis, setThesis] = useState(1.0);
const [thesis, setThesis] = useState(1.1);
const [power, setPower] = useState(2);
const [metPower, setMetPower] = useState(1.0);
const [visPower, setVisPower] = useState(1.0);
Expand Down
1 change: 0 additions & 1 deletion src/helpers/sortNightPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,5 @@ export function sortNightPlan(timeline: any) {
timeEntriesBySite: sTimelineEntries,
});
}
console.log({ newTimelines });
return newTimelines;
}
2 changes: 1 addition & 1 deletion src/websocket/WebsocketProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function WebsocketProvider({
);

ws.current.onopen = () => {
console.log("Socket successfully connected");
console.log(`Socket successfully connected with ID ${sessionId}`);
setIsReady(true);
};

Expand Down

0 comments on commit 83973fd

Please sign in to comment.