Skip to content

Commit

Permalink
Some format
Browse files Browse the repository at this point in the history
  • Loading branch information
devtekve committed Dec 13, 2024
1 parent a355672 commit 1d0eda0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions board/sunnypilot/safety_mads.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ ButtonState mads_button_press = MADS_BUTTON_UNAVAILABLE;
MADSState m_mads_state;

// state for mads controls_allowed_lat timeout logic
bool heartbeat_engaged_mads = false; // MADS enabled, passed in heartbeat USB command
uint32_t heartbeat_engaged_mads_mismatches = 0U; // count of mismatches between heartbeat_engaged_mads and controls_allowed_lat
bool heartbeat_engaged_mads = false; // MADS enabled, passed in heartbeat USB command
uint32_t heartbeat_engaged_mads_mismatches = 0U; // count of mismatches between heartbeat_engaged_mads and controls_allowed_lat

// ===============================
// State Update Helpers
Expand Down Expand Up @@ -122,7 +122,7 @@ static void m_update_control_state(void) {
process_controls = false;
}
// Brake release might request controls if brake was the ONLY reason for disengagement
else if ((m_mads_state.braking.transition == MADS_EDGE_FALLING) && (m_mads_state.current_disengage.active_reason == MADS_DISENGAGE_REASON_BRAKE) && (m_mads_state.current_disengage.pending_reasons == MADS_DISENGAGE_REASON_BRAKE)) {
else if ((m_mads_state.braking.transition == MADS_EDGE_FALLING) && (m_mads_state.current_disengage.active_reason == MADS_DISENGAGE_REASON_BRAKE) && (m_mads_state.current_disengage.pending_reasons == MADS_DISENGAGE_REASON_BRAKE)) {
m_mads_state.controls_requested_lat = true;
} else if (m_mads_state.braking.current) {
process_controls = false;
Expand Down

0 comments on commit 1d0eda0

Please sign in to comment.