mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-28 08:53:52 +08:00
Revert "Fixes after ifdef clenaup (#20842)"
This reverts commit fd7c2b4adf.
This commit is contained in:
@@ -30,9 +30,8 @@
|
||||
|
||||
namespace {
|
||||
|
||||
const std::string default_params_path = Hardware::PC() ? util::getenv_default("HOME", "/.comma/params", "/data/params")
|
||||
: "/data/params";
|
||||
const std::string persistent_params_path = Hardware::PC() ? default_params_path : "/persist/comma/params";
|
||||
const std::string default_params_path = !Hardware::PC() ? "/data/params" : util::getenv_default("HOME", "/.comma/params", "/data/params");
|
||||
const std::string persistent_params_path = !Hardware::PC() ? "/persist/comma/params" : default_params_path;
|
||||
|
||||
volatile sig_atomic_t params_do_exit = 0;
|
||||
void params_sig_handler(int signal) {
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
#endif
|
||||
|
||||
void dmonitoring_init(DMonitoringModelState* s) {
|
||||
const char *model_path = "../../models/dmonitoring_model_q.dlc";
|
||||
const char *model_path = Hardware::PC() ? "../../models/dmonitoring_model.dlc"
|
||||
: "../../models/dmonitoring_model_q.dlc";
|
||||
int runtime = USE_DSP_RUNTIME;
|
||||
s->m = new DefaultRunModel(model_path, &s->output[0], OUTPUT_SIZE, runtime);
|
||||
s->is_rhd = Params().getBool("IsRHD");
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
|
||||
const std::string private_key_path =
|
||||
Hardware::PC() ? util::getenv_default("HOME", "/.comma/persist/comma/id_rsa", "/persist/comma/id_rsa")
|
||||
: "/persist/comma/id_rsa";
|
||||
!Hardware::PC() ? util::getenv_default("HOME", "/.comma/persist/comma/id_rsa", "/persist/comma/id_rsa")
|
||||
: "/persist/comma/id_rsa";
|
||||
|
||||
QByteArray CommaApi::rsa_sign(const QByteArray &data) {
|
||||
auto file = QFile(private_key_path.c_str());
|
||||
|
||||
Reference in New Issue
Block a user