Skip to content

Commit

Permalink
Fix the if statement for correctly use the standalone mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavosr8 authored and augustofg committed Jan 29, 2024
1 parent 8bb07f9 commit 7a4d221
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/sensors/hotswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void vTaskHotSwap( void *Parameters )
hotswap_clear_mask_bit( HOTSWAP_AMC, 1 << (!new_state_amc) );
old_state_amc = new_state_amc;
}
if (!standalone_mode) {
if (standalone_mode) {
old_state_amc = new_state_amc;
}
}
Expand All @@ -173,13 +173,13 @@ void vTaskHotSwap( void *Parameters )
if ( new_state_rtm == 0 ) {
printf("RTM Hotswap handle pressed!\n");

if (!standalone_mode) {
if (standalone_mode) {
payload_send_message(FRU_RTM, PAYLOAD_MESSAGE_RTM_ENABLE);
}
} else {
printf("RTM Hotswap handle released!\n");

if (!standalone_mode) {
if (standalone_mode) {
payload_send_message(FRU_RTM, PAYLOAD_MESSAGE_QUIESCE);
}

Expand All @@ -190,7 +190,7 @@ void vTaskHotSwap( void *Parameters )
old_state_rtm = new_state_rtm;
}

if (!standalone_mode) {
if (standalone_mode) {
old_state_rtm = new_state_rtm;
}

Expand Down

0 comments on commit 7a4d221

Please sign in to comment.