Fixes after ifdef clenaup (#20842)

albatross
Willem Melching 2021-05-06 11:58:35 +02:00 committed by GitHub
parent 12f17dc2f4
commit fd7c2b4adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -30,8 +30,9 @@
namespace {
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;
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";
volatile sig_atomic_t params_do_exit = 0;
void params_sig_handler(int signal) {

View File

@ -18,8 +18,7 @@
#endif
void dmonitoring_init(DMonitoringModelState* s) {
const char *model_path = Hardware::PC() ? "../../models/dmonitoring_model.dlc"
: "../../models/dmonitoring_model_q.dlc";
const char *model_path = "../../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");

View File

@ -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());