mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-15 03:53:43 +08:00
6adb63b915
date: 2026-06-04T09:49:56 master commit: c0ab3550eca2e9daf197c46b7e4b24aa9637cf2e
27 lines
561 B
C++
27 lines
561 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "common/params.h"
|
|
#include "selfdrive/pandad/panda.h"
|
|
|
|
void pandad_main_thread(std::string serial);
|
|
|
|
class PandaSafety {
|
|
public:
|
|
PandaSafety(Panda *panda) : panda_(panda) {}
|
|
void configureSafetyMode(bool is_onroad);
|
|
|
|
private:
|
|
void updateMultiplexingMode();
|
|
std::string fetchCarParams();
|
|
void setSafetyMode(const std::string ¶ms_string);
|
|
|
|
bool initialized_ = false;
|
|
bool log_once_ = false;
|
|
bool safety_configured_ = false;
|
|
bool prev_obd_multiplexing_ = false;
|
|
Panda *panda_;
|
|
Params params_;
|
|
};
|