Skip to content

Commit 94badb0

Browse files
committed
make the 8 channel preheat only change the current during the script.
1 parent 85aa73c commit 94badb0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

api/src/opentrons/config/defaults_ot3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
OT3AxisKind.X: 0.5,
167167
OT3AxisKind.Y: 0.5,
168168
OT3AxisKind.Z: 0.1,
169-
OT3AxisKind.P: 1.0,
169+
OT3AxisKind.P: 0.3,
170170
OT3AxisKind.Z_G: 0.2,
171171
},
172172
)

hardware-testing/hardware_testing/protocols/8ch_preheat.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ def add_parameters(parameters: ParameterContext) -> None:
3737
requirements = {"robotType": "Flex", "apiLevel": "2.21"}
3838

3939

40+
async def change_current(self, current: float) -> None:
41+
await self._backend.set_active_current({Axis.P_L: current})
42+
43+
4044
async def read_sensor(self, sensor: EnvironmentSensor) -> float: # noqa: ANN001
4145
"""Read and return the current sensor information."""
4246
s_driver = SensorDriver()
@@ -60,6 +64,7 @@ def run(ctx: ProtocolContext) -> None:
6064
ot3api = ctx._core.get_hardware()
6165
if not ctx.is_simulating():
6266
OT3API.read_sensor = read_sensor # type: ignore [attr-defined]
67+
OT3API.change_current = change_current # type: ignore [attr-defined]
6368
primary = EnvironmentSensor.build(
6469
sensor_id=SensorId.S0,
6570
node_id=NodeId.pipette_left,
@@ -72,6 +77,7 @@ def run(ctx: ProtocolContext) -> None:
7277
f"flex_8channel_{ctx.params.model_type}", "left" # type: ignore [attr-defined]
7378
)
7479
if not ctx.is_simulating():
80+
ot3api.change_current(1.0)
7581
current_temp_1 = ot3api.read_sensor(primary)
7682
current_temp_2 = ot3api.read_sensor(secondary)
7783
get_motors_hot(ot3api) # type: ignore [arg-type]
@@ -82,3 +88,4 @@ def run(ctx: ProtocolContext) -> None:
8288
current_temp_2 = ot3api.read_sensor(secondary)
8389
avg_temp = (current_temp_1 + current_temp_2) / 2
8490
ctx.delay(seconds=15, msg=f"Current temperature {avg_temp} target={target}")
91+
ot3api.change_current(0.3)

0 commit comments

Comments
 (0)