adopt modelrevert tree as the new clearpilot baseline
Replaces clearpilot's working state wholesale with the modelrevert branch's
tree (modelrevert tip cea422b). Discards the parked-controlsd manager-process
split and the two session READMEs that documented it; keeps the simpler
in-process park short-circuits (controlsd state_control, plannerd, frogpilot_process)
and the cached-output decimation (modeld, dmonitoringmodeld) that achieve
the same goal with less moving parts. Also brings in the locationd GPS
ignore, the calibrationd valid=calStatus gate, and the model-revert lineage's
controlsd / paramsd / torqued / events.py / carstate.py / interfaces.py.
This is a single new commit on clearpilot (no merge), so the branch advances
linearly while the file state matches modelrevert exactly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -415,7 +415,6 @@ 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;
|
||||
@@ -473,14 +472,8 @@ void panda_state_thread(std::vector<Panda *> pandas, bool spoofing_started) {
|
||||
|
||||
is_onroad = params.getBool("IsOnroad");
|
||||
|
||||
// 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) {
|
||||
// set new safety on onroad transition, after params are cleared
|
||||
if (is_onroad && !is_onroad_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 {
|
||||
@@ -489,7 +482,6 @@ 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