2022-06-19 14:43:49 -07:00
|
|
|
#include "system/camerad/cameras/camera_common.h"
|
2021-05-09 13:15:17 +08:00
|
|
|
|
2021-06-09 04:46:22 +08:00
|
|
|
#include <cassert>
|
2021-05-09 13:15:17 +08:00
|
|
|
|
2022-05-18 14:11:57 -07:00
|
|
|
#include "common/params.h"
|
|
|
|
|
#include "common/util.h"
|
2022-06-11 16:38:24 -07:00
|
|
|
#include "system/hardware/hw.h"
|
2020-01-17 10:52:42 -08:00
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
2022-09-12 04:56:38 +08:00
|
|
|
if (Hardware::PC()) {
|
2023-12-01 20:10:07 -08:00
|
|
|
printf("exiting, camerad is not meant to run on PC\n");
|
2022-09-12 04:56:38 +08:00
|
|
|
return 0;
|
2021-10-26 21:51:46 -07:00
|
|
|
}
|
2020-01-17 10:52:42 -08:00
|
|
|
|
2024-04-26 02:08:27 +08:00
|
|
|
int ret = util::set_realtime_priority(53);
|
2022-09-12 04:56:38 +08:00
|
|
|
assert(ret == 0);
|
|
|
|
|
ret = util::set_core_affinity({6});
|
|
|
|
|
assert(ret == 0 || Params().getBool("IsOffroad")); // failure ok while offroad due to offlining cores
|
|
|
|
|
|
2022-01-22 08:19:50 +08:00
|
|
|
camerad_thread();
|
2022-01-18 21:21:30 +08:00
|
|
|
return 0;
|
2020-01-17 10:52:42 -08:00
|
|
|
}
|