diff --git a/selfdrive/camerad/cameras/camera_qcom2.cc b/selfdrive/camerad/cameras/camera_qcom2.cc index 0f0fb10b529c30..44f77d80b687a6 100644 --- a/selfdrive/camerad/cameras/camera_qcom2.cc +++ b/selfdrive/camerad/cameras/camera_qcom2.cc @@ -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? diff --git a/selfdrive/camerad/cameras/sensor2_i2c.h b/selfdrive/camerad/cameras/sensor2_i2c.h index 6fb771b0a693be..5898bd4cce984a 100644 --- a/selfdrive/camerad/cameras/sensor2_i2c.h +++ b/selfdrive/camerad/cameras/sensor2_i2c.h @@ -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 diff --git a/selfdrive/ui/qt/sidebar.cc b/selfdrive/ui/qt/sidebar.cc index 2ac0dc39d7aa2a..b55ea90fe3d87b 100644 --- a/selfdrive/ui/qt/sidebar.cc +++ b/selfdrive/ui/qt/sidebar.cc @@ -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; } diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 35e654d8ba79cc..1f201354c798af 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -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>({ "modelV2", "controlsState", "liveCalibration", "radarState", "deviceState", "liveLocationKalman", "pandaState", "carParams", "driverState", "driverMonitoringState", "sensorEvents", "carState", "ubloxGnss", + "gpsLocationExternal", #ifdef QCOM2 "roadCameraState", #endif diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index 53686c00ebb5fc..8cfd9aa03cf258 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -82,6 +82,7 @@ typedef struct UIScene { // gps int satelliteCount; + float gpsAccuracy; // modelV2 float lane_line_probs[4];