mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-10-01 03:53:41 +08:00
Replace ifdef with hw abstraction layer (#20843)
* Replace ifdefs with hardware abstraction layer (#20801) * add type to class hadwareXXX * replace ifdefs with hardware layer * continue * continue * new function get_driver_view_transform * full path to hw.h * fix build error setup.cc * apply review * fix typo * fix deprecated error:replace deprecated fromPath with new * fix build error * Fixes after ifdef clenaup (#20842) * inheritance doesnt work with static * fix debayer * small cleanup * Update selfdrive/camerad/cameras/camera_common.cc * Update selfdrive/ui/qt/offroad/settings.cc * Update selfdrive/common/modeldata.h * flip conditions * fix comment Co-authored-by: Dean Lee <deanlee3@gmail.com> old-commit-hash: ab319d4f54a53e1a0aa1c2c0d94d56a9acef8362
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include <unordered_map>
|
||||
#include "common/util.h"
|
||||
#include "common/swaglog.h"
|
||||
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
// keep trying if x gets interrupted by a signal
|
||||
#define HANDLE_EINTR(x) \
|
||||
({ \
|
||||
@@ -30,13 +30,9 @@
|
||||
|
||||
namespace {
|
||||
|
||||
#if defined(QCOM) || defined(QCOM2)
|
||||
const std::string default_params_path = "/data/params";
|
||||
const std::string persistent_params_path = "/persist/comma/params";
|
||||
#else
|
||||
const std::string default_params_path = util::getenv_default("HOME", "/.comma/params", "/data/params");
|
||||
const std::string persistent_params_path = default_params_path;
|
||||
#endif
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user