Skip to content

Commit a5ecd8b

Browse files
docs
1 parent c83a3b9 commit a5ecd8b

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

core/pioreactor/calibrations/session_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def store_calibration(
241241
def read_voltage(self) -> Float:
242242
if not self.executor or self.mode != "ui":
243243
raise ValueError("Voltage reader is only available in UI sessions.")
244-
payload = self.executor("read_voltage", {})
244+
payload = self.executor("read_aux_voltage", {})
245245
value = payload.get("voltage")
246246
if not isinstance(value, (int, float, str)):
247247
raise ValueError("Invalid voltage payload.")

core/pioreactor/web/tasks.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@
4949

5050
CalibrationActionHandler = tuple[
5151
Any,
52-
int,
5352
str,
5453
Callable[[Any], dict[str, Any]],
5554
]
5655

57-
# Registry of calibration action -> handler that returns a Huey task, timeout, label, and normalizer.
56+
# Registry of calibration action -> handler that returns a Huey task, label, and normalizer.
5857
calibration_actions: dict[str, Callable[[dict[str, Any]], CalibrationActionHandler]] = {}
5958

6059

@@ -496,7 +495,6 @@ def _register_core_calibration_actions() -> None:
496495
float(payload["hz"]),
497496
float(payload["dc"]),
498497
),
499-
300,
500498
"Pump action",
501499
_default_normalizer,
502500
),
@@ -508,7 +506,6 @@ def _register_core_calibration_actions() -> None:
508506
float(payload["rpm"]),
509507
payload["channel_angle_map"],
510508
),
511-
300,
512509
"OD measurement",
513510
_voltages_normalizer,
514511
),
@@ -517,7 +514,6 @@ def _register_core_calibration_actions() -> None:
517514
"od_reference_standard_read",
518515
lambda payload: (
519516
calibration_reference_standard_read(float(payload["ir_led_intensity"])),
520-
300,
521517
"Reference standard reading",
522518
_od_readings_normalizer,
523519
),
@@ -529,17 +525,15 @@ def _register_core_calibration_actions() -> None:
529525
float(payload["min_dc"]) if (payload.get("min_dc") is not None) else None,
530526
float(payload["max_dc"]) if (payload.get("max_dc") is not None) else None,
531527
),
532-
300,
533528
"Stirring calibration",
534529
_stirring_normalizer,
535530
),
536531
)
537532
register_calibration_action(
538-
"read_voltage",
533+
"read_aux_voltage",
539534
lambda payload: (
540535
calibration_read_voltage(),
541-
30,
542-
"Voltage read",
536+
"Aux voltage read",
543537
_voltage_normalizer,
544538
),
545539
)
@@ -550,7 +544,6 @@ def _register_core_calibration_actions() -> None:
550544
payload["device"],
551545
payload["calibration"],
552546
),
553-
300,
554547
"Saving calibration",
555548
_default_normalizer,
556549
),

core/pioreactor/web/unit_calibration_sessions_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
def _execute_calibration_action(action: str, payload: dict[str, Any]) -> dict[str, Any]:
3434
handler = get_calibration_action(action)
35-
task, timeout_s, error_label, normalize = handler(payload)
35+
task, error_label, normalize = handler(payload)
3636
try:
37-
result = task(blocking=True, timeout=timeout_s)
37+
result = task(blocking=True, timeout=300)
3838
except TaskException as exc:
3939
raise ValueError(f"{error_label} failed: {exc}") from exc
4040
except HueyException as exc:

0 commit comments

Comments
 (0)