adopt pre-modelrevert clearpilot tree (d639e28) as the new head
Discard the modelrevert tree adoption (8b4b7e0) and the in-process park short-circuits / cached-output / dashcam-idle work that came with it (0dc8002,37e095e). Restore the clearpilot tree as it stood atd639e28— the parked-controlsd manager-process split, the GPS-disable in locationd, the controlsd UI hooks, the boardd ignition-edge safety_setter_thread fix. After a full /data/params/d wipe and re-calibration drive, the modelrevert-tree variant overcorrected on turns; reverting to the parked-controlsd architecture (which Brian had previously vetted and documented in887b9c9+27cad05) and starting fresh. Single new commit, no merge — file state matchesd639e28byte-for-byte. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -415,6 +415,7 @@ void panda_state_thread(std::vector<Panda *> pandas, bool spoofing_started) {
|
||||
Panda *peripheral_panda = pandas[0];
|
||||
bool is_onroad = false;
|
||||
bool is_onroad_last = false;
|
||||
bool ignition_last = false;
|
||||
std::future<bool> safety_future;
|
||||
|
||||
std::vector<std::string> connected_serials;
|
||||
@@ -472,8 +473,14 @@ void panda_state_thread(std::vector<Panda *> pandas, bool spoofing_started) {
|
||||
|
||||
is_onroad = params.getBool("IsOnroad");
|
||||
|
||||
// set new safety on onroad transition, after params are cleared
|
||||
if (is_onroad && !is_onroad_last) {
|
||||
// CLEARPILOT: trigger on ignition rising edge instead of IsOnroad rising edge.
|
||||
// ClearPilot's parked-mode split breaks the stock assumption that IsOnroad
|
||||
// rises with ignition: IsOnroad now requires `started`, which requires
|
||||
// thermald to see carState != park, which requires controlsd_parked to
|
||||
// finish CarD init, which requires this thread to ack OBD multiplexing.
|
||||
// Firing on ignition restores the original "set safety as soon as the bus
|
||||
// is alive" timing for both controlsd variants.
|
||||
if (ignition && !ignition_last) {
|
||||
if (!safety_future.valid() || safety_future.wait_for(0ms) == std::future_status::ready) {
|
||||
safety_future = std::async(std::launch::async, safety_setter_thread, pandas);
|
||||
} else {
|
||||
@@ -482,6 +489,7 @@ void panda_state_thread(std::vector<Panda *> pandas, bool spoofing_started) {
|
||||
}
|
||||
|
||||
is_onroad_last = is_onroad;
|
||||
ignition_last = ignition;
|
||||
|
||||
sm.update(0);
|
||||
const bool engaged = sm.allAliveAndValid({"controlsState"}) && sm["controlsState"].getControlsState().getEnabled();
|
||||
|
||||
Reference in New Issue
Block a user