Files
sunnypilot-byd/opendbc_repo/opendbc/safety/modes/subaru_common.h
T
github-actions[bot] de77c89cf6 sunnypilot v2026.002.000
version: sunnypilot v2026.002.000 (staging)
date: 2026-07-21T07:44:02
master commit: 2c334ede443d7391d27575af8c854a095ba702a8
2026-07-21 07:44:02 +00:00

31 lines
896 B
C

/**
* Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors.
*
* This file is part of sunnypilot and is licensed under the MIT License.
* See the LICENSE.md file in the root directory for more details.
*/
#pragma once
extern bool subaru_stop_and_go;
bool subaru_stop_and_go = false;
void subaru_common_init(void) {
const uint16_t SUBARU_PARAM_SP_STOP_AND_GO = 1;
subaru_stop_and_go = GET_FLAG(current_safety_param_sp, SUBARU_PARAM_SP_STOP_AND_GO);
}
/*
bool subaru_common_stop_and_go_throttle_check(const int throttle_pedal) {
bool violation = throttle_pedal != 5U || !controls_allowed || vehicle_moving;
return violation;
}
bool subaru_common_stop_and_go_brake_pedal_check(const int speed, const bool is_preglobal) {
int val = is_preglobal ? 1U : 3U;
bool violation = speed != val || !controls_allowed || vehicle_moving;
return violation;
}
*/