mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-06 16:55:58 +08:00
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>
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user