Move MCLK from 24 -> 19.2 mhz + Add accuracy in sidebar (#20960)

* wip

* one day i'll flip that right

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: f43671c987
commatwo_master
George Hotz 4 years ago committed by GitHub
parent 4d137f459f
commit 6922150ede
  1. 2
      selfdrive/camerad/cameras/camera_qcom2.cc
  2. 2
      selfdrive/camerad/cameras/sensor2_i2c.h
  3. 2
      selfdrive/ui/qt/sidebar.cc
  4. 4
      selfdrive/ui/ui.cc
  5. 1
      selfdrive/ui/ui.h

@ -273,7 +273,7 @@ void sensors_init(int video0_fd, int sensor_fd, int camera_num) {
power->count = 1;
power->cmd_type = CAMERA_SENSOR_CMD_TYPE_PWR_UP;
power->power_settings[0].power_seq_type = 0;
power->power_settings[0].config_val_low = 24000000; //Hz
power->power_settings[0].config_val_low = 19200000; //Hz
power = power_set_wait(power, 10);
// 8,1 is this reset?

@ -8,7 +8,7 @@ struct i2c_random_wr_payload init_array_ar0231[] = {
{0x302A, 0x0006}, // VT_PIX_CLK_DIV
{0x302C, 0x0001}, // VT_SYS_CLK_DIV
{0x302E, 0x0002}, // PRE_PLL_CLK_DIV
{0x3030, 0x0028}, // PLL_MULTIPLIER
{0x3030, 0x0032}, // PLL_MULTIPLIER
{0x3036, 0x000A}, // OP_WORD_CLK_DIV
{0x3038, 0x0001}, // OP_SYS_CLK_DIV

@ -80,7 +80,7 @@ void Sidebar::update(const UIState &s) {
panda_status = danger_color;
panda_str = "NO\nPANDA";
} else if (Hardware::TICI() && s.scene.started) {
panda_str = QString("SAT CNT\n%1").arg(s.scene.satelliteCount);
panda_str = QString("SATS %1\nACC %2").arg(s.scene.satelliteCount).arg(fmin(10, s.scene.gpsAccuracy), 0, 'f', 2);
panda_status = (*s.sm)["liveLocationKalman"].getLiveLocationKalman().getGpsOK() ? good_color : warning_color;
}

@ -169,6 +169,9 @@ static void update_state(UIState *s) {
scene.satelliteCount = data.getMeasurementReport().getNumMeas();
}
}
if (sm.updated("gpsLocationExternal")) {
scene.gpsAccuracy = sm["gpsLocationExternal"].getGpsLocationExternal().getAccuracy();
}
if (sm.updated("carParams")) {
scene.longitudinal_control = sm["carParams"].getCarParams().getOpenpilotLongitudinalControl();
}
@ -270,6 +273,7 @@ QUIState::QUIState(QObject *parent) : QObject(parent) {
ui_state.sm = std::make_unique<SubMaster, const std::initializer_list<const char *>>({
"modelV2", "controlsState", "liveCalibration", "radarState", "deviceState", "liveLocationKalman",
"pandaState", "carParams", "driverState", "driverMonitoringState", "sensorEvents", "carState", "ubloxGnss",
"gpsLocationExternal",
#ifdef QCOM2
"roadCameraState",
#endif

@ -82,6 +82,7 @@ typedef struct UIScene {
// gps
int satelliteCount;
float gpsAccuracy;
// modelV2
float lane_line_probs[4];

Loading…
Cancel
Save