forked from mawei/dp
1
0
Fork 0
dp/selfdrive/camerad/main.cc

21 lines
552 B
C++
Raw Permalink Normal View History

2022-02-15 07:25:21 +08:00
#include "selfdrive/camerad/cameras/camera_common.h"
2021-05-15 09:20:48 +08:00
2021-07-15 08:34:36 +08:00
#include <cassert>
2021-05-15 09:20:48 +08:00
#include "selfdrive/common/params.h"
#include "selfdrive/common/util.h"
#include "selfdrive/hardware/hw.h"
2019-01-24 07:34:52 +08:00
2019-12-14 05:03:08 +08:00
int main(int argc, char *argv[]) {
2021-11-20 07:24:51 +08:00
if (!Hardware::PC()) {
int ret;
2021-12-14 12:51:54 +08:00
ret = util::set_realtime_priority(53);
2021-11-20 07:24:51 +08:00
assert(ret == 0);
2022-04-30 06:24:13 +08:00
ret = util::set_core_affinity({Hardware::EON() ? 2 : Hardware::JETSON() ? 0 : 6});
2021-11-20 07:24:51 +08:00
assert(ret == 0 || Params().getBool("IsOffroad")); // failure ok while offroad due to offlining cores
}
2019-01-24 07:34:52 +08:00
2022-02-15 07:25:21 +08:00
camerad_thread();
return 0;
2019-01-24 07:34:52 +08:00
}