Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Sep 12, 2022
2 parents 46dfb19 + 29f9c53 commit bfed601
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 40 deletions.
3 changes: 0 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ if arch == "larch64":
"#third_party/libyuv/larch64/lib",
"/usr/lib/aarch64-linux-gnu"
]
cpppath += [
"#system/camerad/include",
]
cflags = ["-DQCOM2", "-mcpu=cortex-a57"]
cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"]
rpath += ["/usr/local/lib"]
Expand Down
10 changes: 5 additions & 5 deletions selfdrive/ui/translations/main_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ location set</source>
<message>
<location line="+1"/>
<source>Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h).</source>
<translation>時速31マイル(50km)を超えるスピードで走行中、方向指示器を作動させずに検出された車線ライン上に車両が触れた場合、車線に戻るアラートを受信します。</translation>
<translation>時速31マイル(50km)を超えるスピードで走行中、ウインカーを作動させずに検出された車線ライン上に車両が触れた場合、車線に戻るアラートを受信します。</translation>
</message>
<message>
<location line="+5"/>
Expand All @@ -1195,22 +1195,22 @@ location set</source>
<message>
<location line="+11"/>
<source>🌮 End-to-end longitudinal (extremely alpha) 🌮</source>
<translation type="unfinished"></translation>
<translation>🌮 エンドツーエンドのアクセル制御 (超アルファ版) 🌮</translation>
</message>
<message>
<location line="+6"/>
<source>Experimental openpilot longitudinal control</source>
<translation type="unfinished"></translation>
<translation>実験段階のopenpilotによるアクセル制御</translation>
</message>
<message>
<location line="+1"/>
<source>&lt;b&gt;WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.&lt;/b&gt;</source>
<translation type="unfinished"></translation>
<translation>&lt;b&gt;警告: openpilotによるアクセル制御は実験段階であり、AEBを無効化します。&lt;/b&gt;</translation>
</message>
<message>
<location line="+42"/>
<source>Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental.</source>
<translation type="unfinished"></translation>
<translation>アクセルとブレーキの制御をopenpilotに任せます。openpilotが人間と同じように運転します。最初期の実験段階です。</translation>
</message>
<message>
<location line="-55"/>
Expand Down
26 changes: 10 additions & 16 deletions system/camerad/SConscript
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
Import('env', 'arch', 'cereal', 'messaging', 'common', 'gpucommon', 'visionipc')

libs = ['m', 'pthread', common, 'jpeg', 'OpenCL', 'yuv', cereal, messaging, 'zmq', 'capnp', 'kj', visionipc, gpucommon]
libs = ['m', 'pthread', common, 'jpeg', 'OpenCL', 'yuv', cereal, messaging, 'zmq', 'capnp', 'kj', visionipc, gpucommon, 'atomic']

cameras = []
if arch == "larch64":
libs += ['atomic']
cameras = ['cameras/camera_qcom2.cc']
cenv = env.Clone()
cenv['CPPPATH'].append('include/')

env.Program('camerad', [
'main.cc',
'cameras/camera_ar0231.cc',
'cameras/camera_ox03c10.cc',
'cameras/camera_common.cc',
'cameras/camera_util.cc',
'imgproc/utils.cc',
cameras,
], LIBS=libs)
camera_obj = cenv.Object(['cameras/camera_qcom2.cc', 'cameras/camera_ar0231.cc','cameras/camera_ox03c10.cc','cameras/camera_common.cc', 'cameras/camera_util.cc'])
cenv.Program('camerad', [
'main.cc',
camera_obj,
], LIBS=libs)

if GetOption("test") and arch == "x86_64":
env.Program('test/ae_gray_test', [
cenv.Program('test/ae_gray_test', [
'test/ae_gray_test.cc',
'cameras/camera_common.cc',
camera_obj,
], LIBS=libs)
4 changes: 1 addition & 3 deletions system/camerad/cameras/camera_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
#include "system/hardware/hw.h"
#include "msm_media_info.h"

#include "system/camerad/cameras/camera_qcom2.h"
#ifdef QCOM2
#include "CL/cl_ext_qcom.h"
#include "system/camerad/cameras/camera_qcom2.h"
#else
#include "system/camerad/test/camera_test.h"
#endif

ExitHandler do_exit;
Expand Down
1 change: 0 additions & 1 deletion system/camerad/cameras/camera_qcom2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1041,4 +1041,3 @@ void cameras_run(MultiCameraState *s) {

cameras_close(s);
}

12 changes: 6 additions & 6 deletions system/camerad/cameras/sensor2_i2c.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
struct i2c_random_wr_payload start_reg_array_ar0231[] = {{0x301A, 0x91C}};
struct i2c_random_wr_payload stop_reg_array_ar0231[] = {{0x301A, 0x918}};
struct i2c_random_wr_payload start_reg_array_ox03c10[] = {{0x100, 1}};
struct i2c_random_wr_payload stop_reg_array_ox03c10[] = {{0x100, 0}};
static struct i2c_random_wr_payload start_reg_array_ar0231[] = {{0x301A, 0x91C}};
static struct i2c_random_wr_payload stop_reg_array_ar0231[] = {{0x301A, 0x918}};
static struct i2c_random_wr_payload start_reg_array_ox03c10[] = {{0x100, 1}};
static struct i2c_random_wr_payload stop_reg_array_ox03c10[] = {{0x100, 0}};

struct i2c_random_wr_payload init_array_ox03c10[] = {
static struct i2c_random_wr_payload init_array_ox03c10[] = {
{0x103, 1},
{0x107, 1},

Expand Down Expand Up @@ -751,7 +751,7 @@ struct i2c_random_wr_payload init_array_ox03c10[] = {
{0x5886, 0x08}, {0x5887, 0x6C},
};

struct i2c_random_wr_payload init_array_ar0231[] = {
static struct i2c_random_wr_payload init_array_ar0231[] = {
{0x301A, 0x0018}, // RESET_REGISTER

// CLOCK Settings
Expand Down
15 changes: 9 additions & 6 deletions system/camerad/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
#include "system/hardware/hw.h"

int main(int argc, char *argv[]) {
if (!Hardware::PC()) {
int ret;
ret = util::set_realtime_priority(53);
assert(ret == 0);
ret = util::set_core_affinity({6});
assert(ret == 0 || Params().getBool("IsOffroad")); // failure ok while offroad due to offlining cores
if (Hardware::PC()) {
printf("camerad is not meant to run on PC\n");
return 0;
}

int ret;
ret = util::set_realtime_priority(53);
assert(ret == 0);
ret = util::set_core_affinity({6});
assert(ret == 0 || Params().getBool("IsOffroad")); // failure ok while offroad due to offlining cores

camerad_thread();
return 0;
}

0 comments on commit bfed601

Please sign in to comment.