Skip to content

Commit

Permalink
fix: emergency switches were inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemensElflein committed Nov 18, 2022
1 parent d868eb6 commit 6f706d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Firmware/LowLevel/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ void updateEmergency()
uint8_t last_emergency = status_message.emergency_bitmask & 1;

// Mask the emergency bits. 2x Lift sensor, 2x Emergency Button
bool emergency1 = gpio_get(PIN_EMERGENCY_1);
bool emergency2 = gpio_get(PIN_EMERGENCY_2);
bool emergency3 = gpio_get(PIN_EMERGENCY_3);
bool emergency4 = gpio_get(PIN_EMERGENCY_4);
bool emergency1 = !gpio_get(PIN_EMERGENCY_1);
bool emergency2 = !gpio_get(PIN_EMERGENCY_2);
bool emergency3 = !gpio_get(PIN_EMERGENCY_3);
bool emergency4 = !gpio_get(PIN_EMERGENCY_4);

uint8_t emergency_state = 0;

Expand Down

0 comments on commit 6f706d9

Please sign in to comment.