File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ pub struct HVOnData {
4343}
4444
4545/// the topic to listen for for HV enable, 1 is off and 0 is on
46- pub const HV_EN_TOPIC : & str = "BMS/shutdown/state " ;
46+ pub const HV_EN_TOPIC : & str = "BMS/Shutdown/State " ;
4747
4848/// the topic to listen for mute enable, 1 is on 0 is off
4949pub const MUTE_EN_TOPIC : & str = "WHEEL/Buttons/Mute" ;
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ impl MqttProcessor {
172172 HV_EN_TOPIC => {
173173 if !self . augment_hv_on {
174174 // ensure only triggering upon change from previous loop
175- if val == 0 && !last_stat {
175+ if val == 1 && !last_stat {
176176 debug!( "Transitioning states to HV on, creating folder!" ) ;
177177 if let Err ( err) = std:: fs:: create_dir( format!( "{}/event-{}" , SAVE_LOCATION . get( ) . unwrap( ) , res. time_us / 1000 ) ) {
178178 warn!( "Could not create folder for data, bailing out of this loop! {}" , err) ;
@@ -181,7 +181,7 @@ impl MqttProcessor {
181181 self . hv_stat_send. send( HVTransition :: TransitionOn (
182182 crate :: HVOnData { time_ms: res. time_us / 1000 } ) ) . expect( "HV Stat Channel Closed" ) ;
183183 last_stat = true ;
184- } else if val == 1 && last_stat {
184+ } else if val == 0 && last_stat {
185185 debug!( "Transitioning states to HV off" ) ;
186186 self . hv_stat_send. send( HVTransition :: TransitionOff ) . expect( "HV Stat Channel Closed" ) ;
187187 last_stat = false ;
You can’t perform that action at this time.
0 commit comments