Skip to content

Commit

Permalink
#232 Improve data yield in fast switching conditions (3)
Browse files Browse the repository at this point in the history
add UI elements to configure grace period
  • Loading branch information
dostuffthatmatters committed Dec 11, 2024
1 parent e07364c commit 7b1e752
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ConfigSectionGeneral() {
/>
<configurationComponents.ConfigElementNote>
The TUM Enclosure Spectrometer will power up three degrees below. Helios will start
at this angle.
at this angle. Manual measurements will start at this angle.
</configurationComponents.ConfigElementNote>
<configurationComponents.ConfigElementLine />
<configurationComponents.ConfigElementBooleanToggle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ export default function ConfigSectionMeasurementTriggers() {
Pyra may only do measurements, when sun angle is higher than this value. This angle
will only have an effect if it is higher than "general.min_sun_elevation".
</configurationComponents.ConfigElementNote>
<configurationComponents.ConfigElementLine />
<configurationComponents.ConfigElementText
title="Shutdown Grace Period"
value={localSectionConfig.shutdown_grace_period}
setValue={(v: number) =>
setLocalConfigItem('measurement_triggers.shutdown_grace_period', v)
}
oldValue={centralSectionConfig.shutdown_grace_period}
postfix="second(s)"
numeric
/>
<configurationComponents.ConfigElementNote>
How long to wait to stop measurements after the trigger conditions are not met anymore.
</configurationComponents.ConfigElementNote>
</>
);
}
2 changes: 2 additions & 0 deletions packages/ui/src/custom-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export namespace customTypes {
start_time: { hour: number; minute: number; second: number };
stop_time: { hour: number; minute: number; second: number };
min_sun_elevation: number;
shutdown_grace_period: number;
};
tum_enclosure: null | {
ip: string;
Expand Down Expand Up @@ -130,6 +131,7 @@ export namespace customTypes {
start_time?: { hour?: number; minute?: number; second?: number };
stop_time?: { hour?: number; minute?: number; second?: number };
min_sun_elevation?: number;
shutdown_grace_period?: number;
};
tum_enclosure?: null | {
ip?: string;
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/utils/zustand-utils/config-zustand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const configSchema = z.object({
second: intSchema,
}),
min_sun_elevation: floatSchema,
shutdown_grace_period: floatSchema,
}),
tum_enclosure: z
.object({
Expand Down

0 comments on commit 7b1e752

Please sign in to comment.