Index: dialin/hd/valves.py =================================================================== diff -u -r2c2a2e3c49d6e76c93e9f0db004b5679b626cec2 -r34b6c910e5c691b6bf661283f28bc87c9be20220 --- dialin/hd/valves.py (.../valves.py) (revision 2c2a2e3c49d6e76c93e9f0db004b5679b626cec2) +++ dialin/hd/valves.py (.../valves.py) (revision 34b6c910e5c691b6bf661283f28bc87c9be20220) @@ -288,7 +288,7 @@ @_publish(["hd_valve_ID", "hd_valve_state", "hd_valve_curr_pos_ID", "hd_valve_curr_pos_cnt", "hd_valve_next_pos_cnt", "hd_valve_current", "hd_valves_pos_c", "hd_valves_pos_a", "hd_valves_pos_b", "hd_valves_pwm", "hd_air_trap_status"]) - def handler_hd_valves_sync(self, message): + def _handler_hd_valves_sync(self, message): """ Handles published HD valves data messages. HD valves data are captured for reference. @@ -329,7 +329,7 @@ self.hd_valves_pos_a = pos_a[0] self.hd_valves_pos_b = pos_b[0] self.hd_valves_pwm = pwm[0] - self.hd_air_trap_status = self.air_trap_states[air_trap[0]] if air_trap[0] < len(air_trap[0]) else \ + self.hd_air_trap_status = self.air_trap_states[air_trap[0]] if air_trap[0] < len(self.air_trap_states) else \ 'Status Unknwon' #TODO REMOVE THIS FUNCTION Index: dialin/squish/denaliMessages.py =================================================================== diff -u -r2c016f17a5468be8add2a467c989c19f69d501df -r34b6c910e5c691b6bf661283f28bc87c9be20220 --- dialin/squish/denaliMessages.py (.../denaliMessages.py) (revision 2c016f17a5468be8add2a467c989c19f69d501df) +++ dialin/squish/denaliMessages.py (.../denaliMessages.py) (revision 34b6c910e5c691b6bf661283f28bc87c9be20220) @@ -65,15 +65,16 @@ Acknow = 65535 - AcknowGeneric = 0 # Generic Acknowledgment is not a unique message ID and inherits its Id from the actual message. Zero is a placeholder + AcknowGeneric = 0 # Generic Acknowledgment is not a unique message ID and inherits its + # Id from the actual message. Zero is a placeholder def send_acknowledge_HD(): subprocess.call(['cansend', 'can0', '020#A5.01.00.FF.FF.00.19.00']) def send_acknowledge_UI(): subprocess.call(['cansend', 'can0', '100#A5.01.00.FF.FF.00.19.00']) - + def show_PowerOffDialog(): subprocess.call(['cansend', 'can0', '020#A5.01.00.01.00.01.00.38']) @@ -93,7 +94,8 @@ def waitForMessageToBeSent(): time.sleep(0.200) # 200ms -def buildSetTreatmentParamRanges(vMinTreatmentDuration, vMaxTreatmentDuration, vMinUFVolume, vMaxUFVolume, vMinDialysateFlowRate, vMaxDialysateFlowRate): +def buildSetTreatmentParamRanges(vMinTreatmentDuration, vMaxTreatmentDuration, vMinUFVolume, vMaxUFVolume, + vMinDialysateFlowRate, vMaxDialysateFlowRate): """ @param vMinTreatmentDuration: @@ -105,16 +107,17 @@ @return: """ msg = buildMessage(GuiActionType.TreatmentRanges, 4 * 6, True, - toI32(vMinTreatmentDuration), - toI32(vMaxTreatmentDuration), - toF32(vMinUFVolume), - toF32(vMaxUFVolume), - toI32(vMinDialysateFlowRate), - toI32(vMaxDialysateFlowRate) + toI32(vMinTreatmentDuration), + toI32(vMaxTreatmentDuration), + toF32(vMinUFVolume), + toF32(vMaxUFVolume), + toI32(vMinDialysateFlowRate), + toI32(vMaxDialysateFlowRate) ) return toFrames(msg) -def setTreatmentParamRanges(vMinTreatmentDuration, vMaxTreatmentDuration, vMinUFVolume, vMaxUFVolume, vMinDialysateFlowRate, vMaxDialysateFlowRate): +def setTreatmentParamRanges(vMinTreatmentDuration, vMaxTreatmentDuration, vMinUFVolume, vMaxUFVolume, + vMinDialysateFlowRate, vMaxDialysateFlowRate): """ @param vMinTreatmentDuration: @@ -125,7 +128,8 @@ @param vMaxDialysateFlowRate: @return: """ - frames = buildSetTreatmentParamRanges(vMinTreatmentDuration, vMaxTreatmentDuration, vMinUFVolume, vMaxUFVolume, vMinDialysateFlowRate, vMaxDialysateFlowRate) + frames = buildSetTreatmentParamRanges(vMinTreatmentDuration, vMaxTreatmentDuration, vMinUFVolume, vMaxUFVolume, + vMinDialysateFlowRate, vMaxDialysateFlowRate) frames = toCandumpFormat(frames) for frame in frames: subprocess.call(['cansend', 'can0', '020#{}'.format(frame)]) @@ -144,13 +148,13 @@ @return: """ msg = buildMessage(GuiActionType.BloodFlow, 4 * 7, False, - toI32(vFlowSetPt ), - toF32(vMeasFlow ), - toF32(vRotSpd ), - toF32(vMotSpd ), - toF32(vMCSpd ), - toF32(vMCCurr ), - toF32(vPWM ) + toI32(vFlowSetPt), + toF32(vMeasFlow), + toF32(vRotSpd), + toF32(vMotSpd), + toF32(vMCSpd), + toF32(vMCCurr), + toF32(vPWM) ) return toFrames(msg) @@ -171,7 +175,7 @@ for frame in frames: subprocess.call(['cansend', 'can0', '040#{}'.format(frame)]) waitForMessageToBeSent() - + def buildSetTreatmentDialysateFlowRate(vFlowSetPt, vMeasFlow, vRotSpd, vMotSpd, vMCSpd, vMCCurr, vPWM): """ @@ -185,13 +189,13 @@ @return: """ msg = buildMessage(GuiActionType.DialysateInletFlow, 4 * 7, False, - toI32(vFlowSetPt), - toF32(vMeasFlow), - toF32(vRotSpd), - toF32(vMotSpd), - toF32(vMCSpd), - toF32(vMCCurr), - toF32(vPWM) + toI32(vFlowSetPt), + toF32(vMeasFlow), + toF32(vRotSpd), + toF32(vMotSpd), + toF32(vMCSpd), + toF32(vMCCurr), + toF32(vPWM) ) return toFrames(msg) @@ -212,7 +216,7 @@ for frame in frames: subprocess.call(['cansend', 'can0', '040#{}'.format(frame)]) waitForMessageToBeSent() - + def buildTreatmentAdjustBloodDialysateResponse(vAccepted, vReason, vBloodRate, vDialysate): """ @@ -223,10 +227,10 @@ @return: """ msg = buildMessage(GuiActionType.AdjustBloodDialysateRsp, 4 * 4, True, - toI32(vAccepted), - toI32(vReason), - toI32(vBloodRate), - toI32(vDialysate) + toI32(vAccepted), + toI32(vReason), + toI32(vBloodRate), + toI32(vDialysate) ) return toFrames(msg) @@ -245,7 +249,6 @@ subprocess.call(['cansend', 'can0', '020#{}'.format(frame)]) waitForMessageToBeSent() - def buildTreatmentAdjustDurationResponse(vAccepted, vReason, vDuration, vUltrafiltration): """ @@ -256,14 +259,13 @@ @return: """ msg = buildMessage(GuiActionType.AdjustDurationRsp, 4 * 4, True, - toI32(vAccepted), - toI32(vReason), - toI32(vDuration), - toF32(vUltrafiltration) + toI32(vAccepted), + toI32(vReason), + toI32(vDuration), + toF32(vUltrafiltration) ) return toFrames(msg) - def sendTreatmentAdjustDurationResponse(vAccepted, vReason, vDuration, vUltrafiltration): """ @@ -285,31 +287,28 @@ @param vState: @return: """ - msg = buildMessage(GuiActionType.AdjustUltrafiltrationStateReq, 1 * 4 , False, - toI32(vState) + msg = buildMessage(GuiActionType.AdjustUltrafiltrationStateReq, 1 * 4, False, toI32(vState) ) return toFrames(msg) - def setTreatmentAdjustUltrafiltrationStateResponse(vState): frames = buildTreatmentAdjustUltrafiltrationStateResponse(vState) frames = toCandumpFormat(frames) for frame in frames: subprocess.call(['cansend', 'can0', '020#{}'.format(frame)]) waitForMessageToBeSent() - def setTreatmentAdjustUltrafiltrationAccepted(): setTreatmentAdjustUltrafiltrationStateResponse( EResponse.Accepted ) - def setTreatmentAdjustUltrafiltrationRejected(): setTreatmentAdjustUltrafiltrationStateResponse( EResponse.Rejected ) - -def buildTreatmentAdjustUltrafiltrationEditResponse(vAccepted, vReason, vVolume, vDuration, vDurationDiff, vRate, vRateDiff, vRateOld): +def buildTreatmentAdjustUltrafiltrationEditResponse(vAccepted, vReason, vVolume, vDuration, vDurationDiff, vRate, + vRateDiff, vRateOld): """ - 19 0x020 6 Rsp Y HD UI UF Vol. Change Response (U32)-0=No, 1=Yes (U32) reject reason UF vol-mL (F32) Time-min (U32) Time diff (S32) UF rate-mL/min (F32) Rate diff (F32) + 19 0x020 6 Rsp Y HD UI UF Vol. Change Response (U32)-0=No, 1=Yes (U32) reject reason + UF vol-mL (F32) Time-min (U32) Time diff (S32) UF rate-mL/min (F32) Rate diff (F32) @param vAccepted: @param vReason: @@ -321,19 +320,20 @@ @param vRateOld: @return: """ - msg = buildMessage(GuiActionType.AdjustUltrafiltrationEditRsp, 8 * 4 , True, - toI32(vAccepted), - toI32(vReason), - toF32(vVolume), - toI32(vDuration), - toI32(vDurationDiff), - toF32(vRate), - toF32(vRateDiff), - toF32(vRateOld) + msg = buildMessage(GuiActionType.AdjustUltrafiltrationEditRsp, 8 * 4, True, + toI32(vAccepted), + toI32(vReason), + toF32(vVolume), + toI32(vDuration), + toI32(vDurationDiff), + toF32(vRate), + toF32(vRateDiff), + toF32(vRateOld) ) return toFrames(msg) -def setTreatmentAdjustUltrafiltrationEditResponse(vAccepted, vReason, vVolume, vDuration, vDurationDiff, vRate, vRateDiff, vRateOld): +def setTreatmentAdjustUltrafiltrationEditResponse(vAccepted, vReason, vVolume, vDuration, vDurationDiff, vRate, + vRateDiff, vRateOld): """ @param vAccepted: @@ -346,7 +346,8 @@ @param vRateOld: @return: """ - frames = buildTreatmentAdjustUltrafiltrationEditResponse(vAccepted, vReason, vVolume, vDuration, vDurationDiff, vRate, vRateDiff, vRateOld) + frames = buildTreatmentAdjustUltrafiltrationEditResponse(vAccepted, vReason, vVolume, vDuration, vDurationDiff, + vRate, vRateDiff, vRateOld) frames = toCandumpFormat(frames) for frame in frames: subprocess.call(['cansend', 'can0', '020#{}'.format(frame)]) @@ -366,7 +367,8 @@ def buildTreatmentAdjustUltrafiltrationConfirmResponse(vAccepted, vReason, vVolume, vDuration, vRate): """ - 46 0x020 6 Rsp Y HD UI UF Vol. Change Confirmation Response (U32)-0=No, 1=Yes (U32) reject reason UF vol-mL (F32) Time-min (U32) UF rate-mL/min (F32) + 46 0x020 6 Rsp Y HD UI UF Vol. Change Confirmation Response (U32)-0=No, 1=Yes + (U32) reject reason UF vol-mL (F32) Time-min (U32) UF rate-mL/min (F32) @param vAccepted: @param vReason: @@ -375,16 +377,16 @@ @param vRate: @return: """ - msg = buildMessage(GuiActionType.AdjustUltrafiltrationConfirmRsp, 5 * 4 , True, - toI32(vAccepted), - toI32(vReason), - toF32(vVolume), - toI32(vDuration), - toF32(vRate) + msg = buildMessage(GuiActionType.AdjustUltrafiltrationConfirmRsp, 5 * 4, True, + toI32(vAccepted), + toI32(vReason), + toF32(vVolume), + toI32(vDuration), + toF32(vRate) ) return toFrames(msg) -def setTreatmentAdjustUltrafiltrationConfirmResponse (vAccepted, vReason, vVolume, vDuration, vRate): +def setTreatmentAdjustUltrafiltrationConfirmResponse(vAccepted, vReason, vVolume, vDuration, vRate): """ @param vAccepted: @@ -400,7 +402,7 @@ subprocess.call(['cansend', 'can0', '020#{}'.format(frame)]) waitForMessageToBeSent() -def setTreatmentAdjustUltrafiltrationConfirmRejected ( vReason ): +def setTreatmentAdjustUltrafiltrationConfirmRejected(vReason): """ @param vReason: @@ -421,9 +423,9 @@ @return: """ msg = buildMessage(GuiActionType.TreatmentTime, 3 * 4, False, - toI32(vSecsTotal), - toI32(vSecsElap), - toI32(vSecsRem) + toI32(vSecsTotal), + toI32(vSecsElap), + toI32(vSecsRem) ) return toFrames(msg) @@ -442,7 +444,7 @@ for frame in frames: subprocess.call(['cansend', 'can0', '040#{}'.format(frame)]) waitForMessageToBeSent() - + def buildSetTreatmentUltrafiltration(vRefUFVol, vMeasUFVol, vRotSpd, vMotSpd, vMCSpd, vMCCurr, vPWM): """ @@ -456,13 +458,13 @@ @return: """ msg = buildMessage(GuiActionType.DialysateOutletFlow, 4 * 7, False, - toF32(vRefUFVol), - toF32(vMeasUFVol), - toF32(vRotSpd), - toF32(vMotSpd), - toF32(vMCSpd), - toF32(vMCCurr), - toF32(vPWM) + toF32(vRefUFVol), + toF32(vMeasUFVol), + toF32(vRotSpd), + toF32(vMotSpd), + toF32(vMCSpd), + toF32(vMCCurr), + toF32(vPWM) ) return toFrames(msg) @@ -478,12 +480,12 @@ @param vPWM: @return: """ - frames = buildSetTreatmentUltrafiltration(vRefUFVol, vMeasUFVol, vRotSpd, vMotSpd, vMCSpd, vMCCurr, vPWM ) + frames = buildSetTreatmentUltrafiltration(vRefUFVol, vMeasUFVol, vRotSpd, vMotSpd, vMCSpd, vMCCurr, vPWM) frames = toCandumpFormat(frames) for frame in frames: subprocess.call(['cansend', 'can0', '040#{}'.format(frame)]) waitForMessageToBeSent() - + def buildSetTreatmentPressureOcclusion(vArtPres, vVenPres, vBPOccl, vDIPOccl, vDOPOccl): """ @@ -495,11 +497,11 @@ @return: """ msg = buildMessage(GuiActionType.PressureOcclusion, 4 * 5, False, - toF32(vArtPres), - toF32(vVenPres), - toF32(vBPOccl), - toF32(vDIPOccl), - toF32(vDOPOccl) + toF32(vArtPres), + toF32(vVenPres), + toF32(vBPOccl), + toF32(vDIPOccl), + toF32(vDOPOccl) ) return toFrames(msg) @@ -518,10 +520,11 @@ for frame in frames: subprocess.call(['cansend', 'can0', '040#{}'.format(frame)]) waitForMessageToBeSent() - + def buildTreatmentLoadCellReadings(vRs1Prim, vRs1Bkup, vRs2Prim, vRs2Bkup): """ - 12 0x080 8 10 Hz N DG All Load Cell Readings Data Rs1 Prim. (F32) Rs1 Bkup (F32) Rs2 Prim. (F32) Rs2 Bkup (F32) + 12 0x080 8 10 Hz N DG All Load Cell Readings Data Rs1 Prim. (F32) Rs1 Bkup (F32) + Rs2 Prim. (F32) Rs2 Bkup (F32) @param vRs1Prim: @param vRs1Bkup: @@ -530,10 +533,10 @@ @return: """ msg = buildMessage(GuiActionType.LoadCellReadings, 4 * 4, False, - toF32(vRs1Prim), - toF32(vRs1Bkup), - toF32(vRs2Prim), - toF32(vRs2Bkup) + toF32(vRs1Prim), + toF32(vRs1Bkup), + toF32(vRs2Prim), + toF32(vRs2Bkup) ) return toFrames(msg) @@ -544,7 +547,10 @@ subprocess.call(['cansend', 'can0', '080#{}'.format(frame)]) waitForMessageToBeSent() -def buildTreatmentTemperatureSensors(vInletPrimaryHeater, vOutletPrimaryHeater, vConductivitySensor1, vConductivitySensor2, vOutletRedundancy, vInletDialysate, vPrimaryHeaterThermoCouple, vPrimmerHeaterThermoCouple, vPrimaryHeaterColdJunction, vTrimmerHeaterColdJunction, vTrimaryHeaterInternal ,vTrimmerHeaterInternal): +def buildTreatmentTemperatureSensors(vInletPrimaryHeater, vOutletPrimaryHeater, vConductivitySensor1, + vConductivitySensor2, vOutletRedundancy, vInletDialysate, + vPrimaryHeaterThermoCouple, vPrimmerHeaterThermoCouple, vPrimaryHeaterColdJunction, + vTrimmerHeaterColdJunction, vTrimaryHeaterInternal ,vTrimmerHeaterInternal): """ 45 0x080 8 ??? Hz N DG All DG Temperature Data ??? @@ -564,22 +570,25 @@ """ msg = buildMessage(GuiActionType.TemperatureSensors, 4 * 12, False, - toF32(vInletPrimaryHeater), - toF32(vOutletPrimaryHeater), - toF32(vConductivitySensor1), - toF32(vConductivitySensor2), - toF32(vOutletRedundancy), - toF32(vInletDialysate), - toF32(vPrimaryHeaterThermoCouple), - toF32(vPrimmerHeaterThermoCouple), - toF32(vPrimaryHeaterColdJunction), - toF32(vTrimmerHeaterColdJunction), - toF32(vTrimaryHeaterInternal), - toF32(vTrimmerHeaterInternal) + toF32(vInletPrimaryHeater), + toF32(vOutletPrimaryHeater), + toF32(vConductivitySensor1), + toF32(vConductivitySensor2), + toF32(vOutletRedundancy), + toF32(vInletDialysate), + toF32(vPrimaryHeaterThermoCouple), + toF32(vPrimmerHeaterThermoCouple), + toF32(vPrimaryHeaterColdJunction), + toF32(vTrimmerHeaterColdJunction), + toF32(vTrimaryHeaterInternal), + toF32(vTrimmerHeaterInternal) ) return toFrames(msg) -def setTreatmentTemperatureSensors(vInletPrimaryHeater, vOutletPrimaryHeater, vConductivitySensor1, vConductivitySensor2, vOutletRedundancy, vInletDialysate, vPrimaryHeaterThermoCouple, vPrimmerHeaterThermoCouple, vPrimaryHeaterColdJunction, vTrimmerHeaterColdJunction, vTrimaryHeaterInternal ,vTrimmerHeaterInternal): +def setTreatmentTemperatureSensors(vInletPrimaryHeater, vOutletPrimaryHeater, vConductivitySensor1, + vConductivitySensor2, vOutletRedundancy, vInletDialysate, vPrimaryHeaterThermoCouple, + vPrimmerHeaterThermoCouple, vPrimaryHeaterColdJunction, vTrimmerHeaterColdJunction, + vTrimaryHeaterInternal , vTrimmerHeaterInternal): """ @param vInletPrimaryHeater: @@ -596,7 +605,11 @@ @param vTrimmerHeaterInternal: @return: """ - frames = buildTreatmentTemperatureSensors(vInletPrimaryHeater, vOutletPrimaryHeater, vConductivitySensor1, vConductivitySensor2, vOutletRedundancy, vInletDialysate, vPrimaryHeaterThermoCouple, vPrimmerHeaterThermoCouple, vPrimaryHeaterColdJunction, vTrimmerHeaterColdJunction, vTrimaryHeaterInternal ,vTrimmerHeaterInternal) + frames = buildTreatmentTemperatureSensors(vInletPrimaryHeater, vOutletPrimaryHeater, vConductivitySensor1, + vConductivitySensor2, vOutletRedundancy, vInletDialysate, + vPrimaryHeaterThermoCouple, vPrimmerHeaterThermoCouple, + vPrimaryHeaterColdJunction, vTrimmerHeaterColdJunction, + vTrimaryHeaterInternal, vTrimmerHeaterInternal) frames = toCandumpFormat(frames) for frame in frames: subprocess.call(['cansend', 'can0', '080#{}'.format(frame)]) @@ -608,8 +621,7 @@ @param vCount: @return: """ - msg = buildMessage(GuiActionType.CanBUSFaultCount, 4 * 1, False, - toI32(vCount) + msg = buildMessage(GuiActionType.CanBUSFaultCount, 4 * 1, False, toI32(vCount) ) return toFrames(msg) @@ -636,23 +648,21 @@ @return: """ msg = buildMessage(GuiActionType.AlarmStatus, 4 * 4 + 2, False, - toI32(vState), - toI32(vTop), - toI32(vEsclatesIn), - toI32(vSilentExpires), - toI16(vFlags) + toI32(vState), + toI32(vTop), + toI32(vEsclatesIn), + toI32(vSilentExpires), + toI16(vFlags) ) return toFrames(msg) - def sendAlarm(vState, vTop, vEsclatesIn, vSilentExpires, vFlags): frames = buildAlarm(vState, vTop, vEsclatesIn, vSilentExpires, vFlags) frames = toCandumpFormat(frames) for frame in frames: subprocess.call(['cansend', 'can0', '001#{}'.format(frame)]) waitForMessageToBeSent() - def buildAlarmTriggered(vAlarmID): """ @@ -664,7 +674,6 @@ ) return toFrames(msg) - def setAlarmTriggered(vAlarmID): """ @@ -677,19 +686,15 @@ subprocess.call(['cansend', 'can0', '001#{}'.format(frame)]) waitForMessageToBeSent() - def buildAlarmCleared(vAlarmID): """ @param vAlarmID: @return: """ - msg = buildMessage(GuiActionType.AlarmCleared, 4 , True, - toI32(vAlarmID) - ) + msg = buildMessage(GuiActionType.AlarmCleared, 4, True, toI32(vAlarmID)) return toFrames(msg) - def setAlarmCleared(vAlarmID): """ @@ -702,7 +707,6 @@ subprocess.call(['cansend', 'can0', '001#{}'.format(frame)]) waitForMessageToBeSent() - def buildUnknown(): """ @@ -711,7 +715,6 @@ msg = buildMessage(GuiActionType.Unknown, 0, False) return toFrames(msg) - def sendUnknown_HD(): """ @@ -723,7 +726,6 @@ subprocess.call(['cansend', 'can0', '001#{}'.format(frame)]) # send from HD waitForMessageToBeSent() - def sendUnknown_DG(): """ @@ -735,7 +737,6 @@ subprocess.call(['cansend', 'can0', '070#{}'.format(frame)]) # send from DG waitForMessageToBeSent() - def clear_all_alarms(): """ @return: None Index: dialin/squish/messageBuilder.py =================================================================== diff -u -r2c016f17a5468be8add2a467c989c19f69d501df -r34b6c910e5c691b6bf661283f28bc87c9be20220 --- dialin/squish/messageBuilder.py (.../messageBuilder.py) (revision 2c016f17a5468be8add2a467c989c19f69d501df) +++ dialin/squish/messageBuilder.py (.../messageBuilder.py) (revision 34b6c910e5c691b6bf661283f28bc87c9be20220) @@ -74,5 +74,3 @@ msg += arg msg += calcCRC8(msg) return syncByte + msg - - Index: tests/hd_valves_test.py =================================================================== diff -u -r39797925579b6770fbb48e634d73f518ab417d37 -r34b6c910e5c691b6bf661283f28bc87c9be20220 --- tests/hd_valves_test.py (.../hd_valves_test.py) (revision 39797925579b6770fbb48e634d73f518ab417d37) +++ tests/hd_valves_test.py (.../hd_valves_test.py) (revision 34b6c910e5c691b6bf661283f28bc87c9be20220) @@ -50,6 +50,7 @@ # 1 Insert/Eject # 2 Open # 3 Close + """" valves.cmd_home_hd_valve(0) sleep(2) valves.cmd_home_hd_valve(1) @@ -61,7 +62,13 @@ #valves.cmd_set_hd_valve_pwm(2, 100, 1) valves.cmd_set_hd_valve_position(0, 2) + """ + #valves.cmd_home_hd_valve(2) + #sleep(2) + + valves.cmd_set_hd_valve_position(2, 2) + while overall_counter < (overall_time_seconds/sleep_time): if counter >= 10: