|
|
@ -7,6 +7,7 @@ |
|
|
|
#include <cassert> |
|
|
|
#include <cassert> |
|
|
|
#include <cerrno> |
|
|
|
#include <cerrno> |
|
|
|
#include <chrono> |
|
|
|
#include <chrono> |
|
|
|
|
|
|
|
#include <fstream> |
|
|
|
#include <future> |
|
|
|
#include <future> |
|
|
|
#include <memory> |
|
|
|
#include <memory> |
|
|
|
#include <thread> |
|
|
|
#include <thread> |
|
|
@ -495,6 +496,11 @@ void panda_state_thread(std::vector<Panda *> pandas, bool spoofing_started) { |
|
|
|
|
|
|
|
|
|
|
|
// reset the safety mode to avoid faulting the car
|
|
|
|
// reset the safety mode to avoid faulting the car
|
|
|
|
LOGE("EXITED!"); |
|
|
|
LOGE("EXITED!"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::ofstream f; |
|
|
|
|
|
|
|
f.open("/data/pandad_exited.txt", std::ios_base::app); |
|
|
|
|
|
|
|
f << "exited\n"; |
|
|
|
|
|
|
|
|
|
|
|
if (is_onroad && !engaged) { |
|
|
|
if (is_onroad && !engaged) { |
|
|
|
for (auto &p : pandas) { |
|
|
|
for (auto &p : pandas) { |
|
|
|
p->set_safety_model(cereal::CarParams::SafetyModel::NO_OUTPUT); |
|
|
|
p->set_safety_model(cereal::CarParams::SafetyModel::NO_OUTPUT); |
|
|
|