Index: leahi_dialin/fp/modules/boost_pump.py =================================================================== diff -u -r970453631a6ccccf10dbe89eab0f131a83c1cf37 -rf642483a9aa42114257a1c9123b9a91e364cf9ee --- leahi_dialin/fp/modules/boost_pump.py (.../boost_pump.py) (revision 970453631a6ccccf10dbe89eab0f131a83c1cf37) +++ leahi_dialin/fp/modules/boost_pump.py (.../boost_pump.py) (revision f642483a9aa42114257a1c9123b9a91e364cf9ee) @@ -51,19 +51,19 @@ self.can_interface.register_receiving_publication_function(channel_id, msg_id, self._handler_boost_pump_sync) self.ro_pump_timestamp = 0.0 - self.p12_ro_pump_state = 0 - self.p12_ro_pump_duty_cycle = 0.0 - self.p12_ro_pump_fb_duty_cycle = 0.0 - self.p12_ro_pump_speed = 0.0 - self.p40_boost_pump_state = 0 - self.p40_boost_pump_duty_cycle = 0.0 - self.p40_boost_pump_fb_duty_cycle = 0.0 - self.p40_boost_pump_speed = 0.0 + self.p12_pump_state = 0 + self.p12_pump_duty_cycle = 0.0 + self.p12_pump_fb_duty_cycle = 0.0 + self.p12_pump_speed = 0.0 + self.p40_pump_state = 0 + self.p40_pump_duty_cycle = 0.0 + self.p40_pump_fb_duty_cycle = 0.0 + self.p40_pump_speed = 0.0 - @publish(["ro_pump_timestamp", "p12_ro_pump_state", "p12_ro_pump_duty_cycle", "p12_ro_pump_fb_duty_cycle", - "p12_ro_pump_speed", "p40_boost_pump_state", "p40_boost_pump_duty_cycle", - "p40_boost_pump_fb_duty_cycle", "p40_boost_pump_speed"]) + @publish(["ro_pump_timestamp", "p12_pump_state", "p12_pump_duty_cycle", "p12_pump_fb_duty_cycle", + "p12_pump_speed", "p40_pump_state", "p40_pump_duty_cycle", + "p40_pump_fb_duty_cycle", "p40_pump_speed"]) def _handler_boost_pump_sync(self, message, timestamp=0.0): """ Handles published RO pump data messages. RO pump data is captured @@ -73,35 +73,25 @@ @return: none """ - rps = struct.unpack('i', bytearray( + self.p12_pump_state = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1])) - rpdc = struct.unpack('i', bytearray( + self.p12_pump_duty_cycle = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2])) - rpfbdc = struct.unpack('i', bytearray( + self.p12_pump_fb_duty_cycle = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3])) - rprpm = struct.unpack('f', bytearray( + self.p12_pump_speed = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_4:MsgFieldPositions.END_POS_FIELD_4])) - bps = struct.unpack('i', bytearray( + self.p40_pump_state = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_5:MsgFieldPositions.END_POS_FIELD_5])) - bpdc = struct.unpack('i', bytearray( + self.p40_pump_duty_cycle = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_6:MsgFieldPositions.END_POS_FIELD_6])) - bpfbdc = struct.unpack('i', bytearray( + self.p40_pump_fb_duty_cycle = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_7:MsgFieldPositions.END_POS_FIELD_7])) - bprpm = struct.unpack('f', bytearray( + self.p40_pump_speed = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_8:MsgFieldPositions.END_POS_FIELD_8])) self.ro_pump_timestamp = timestamp - self.p12_ro_pump_state = rps[0] - self.p12_ro_pump_duty_cycle = rpdc[0] - self.p12_ro_pump_fb_duty_cycle = rpfbdc[0] - self.p12_ro_pump_speed = rprpm[0] - self.p40_boost_pump_state = bps[0] - self.p40_boost_pump_duty_cycle = bpdc[0] - self.p40_boost_pump_fb_duty_cycle = bpfbdc[0] - self.p40_boost_pump_speed = bprpm[0] - - def cmd_boost_pump_set_speed_rate_override(self, pump: int, rpm: int, reset: int = NO_RESET) -> int: """ Constructs and sends the boost pump set point command @@ -146,8 +136,8 @@ Constraints: Must be logged into FP. + @param pump: integer - the pump id to set pwm @param pwm: integer - counts to override the pwm ( 0 - 500 ) - @param reset: integer - 1 to reset a previous override, 0 to override @return: 1 if successful, zero otherwise """ Index: leahi_dialin/fp/modules/levels.py =================================================================== diff -u -r970453631a6ccccf10dbe89eab0f131a83c1cf37 -rf642483a9aa42114257a1c9123b9a91e364cf9ee --- leahi_dialin/fp/modules/levels.py (.../levels.py) (revision 970453631a6ccccf10dbe89eab0f131a83c1cf37) +++ leahi_dialin/fp/modules/levels.py (.../levels.py) (revision f642483a9aa42114257a1c9123b9a91e364cf9ee) @@ -117,10 +117,10 @@ @returns 1 if successful, zero otherwise """ reset_value = integer_to_bytearray(reset) - lvl = integer_to_bytearray(level) + lvl = integer_to_bytearray(level_sensor) payload = reset_value + lvl message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_fp_ch_id, - message_id=MsgIds.MSG_ID_RO_LEVELS_STATUS_OVERRIDE_REQUEST.value, + message_id=MsgIds.MSG_ID_RO_LEVEL_OVERRIDE_REQUEST.value, payload=payload) # Send message Index: leahi_dialin/protocols/CAN.py =================================================================== diff -u -r78a66378ef0f284406cfcf12085a2c23e224ac05 -rf642483a9aa42114257a1c9123b9a91e364cf9ee --- leahi_dialin/protocols/CAN.py (.../CAN.py) (revision 78a66378ef0f284406cfcf12085a2c23e224ac05) +++ leahi_dialin/protocols/CAN.py (.../CAN.py) (revision f642483a9aa42114257a1c9123b9a91e364cf9ee) @@ -286,9 +286,9 @@ DenaliChannels.td_to_dd_ch_id: DenaliChannels.dialin_to_td_ch_id, DenaliChannels.dd_to_td_ch_id: DenaliChannels.dialin_to_dd_ch_id, DenaliChannels.td_to_ui_ch_id: DenaliChannels.dialin_to_td_ch_id, - DenaliChannels.td_sync_broadcast_ch_id: None, - # DenaliChannels.dd_to_ui_ch_id: DenaliChannels.dialin_to_dd_ch_id, - DenaliChannels.dd_sync_broadcast_ch_id: None, + DenaliChannels.td_sync_broadcast_ch_id: DenaliChannels.dialin_to_td_ch_id, + DenaliChannels.dd_sync_broadcast_ch_id: DenaliChannels.dialin_to_dd_ch_id, + DenaliChannels.fp_sync_broadcast_ch_id: DenaliChannels.dialin_to_fp_ch_id, DenaliChannels.ui_to_td_ch_id: DenaliChannels.dialin_to_ui_ch_id, DenaliChannels.ui_sync_broadcast_ch_id: DenaliChannels.dialin_to_ui_ch_id, DenaliChannels.td_to_dialin_ch_id: DenaliChannels.dialin_to_td_ch_id,