mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-22 08:43:54 +08:00
FrogPilot structs
This commit is contained in:
@@ -10,6 +10,12 @@ static void update_state(FrogPilotUIState *fs) {
|
||||
const cereal::DeviceState::Reader &deviceState = fpsm["deviceState"].getDeviceState();
|
||||
frogpilot_scene.online = deviceState.getNetworkType() != cereal::DeviceState::NetworkType::NONE;
|
||||
}
|
||||
if (fpsm.updated("frogpilotCarState")) {
|
||||
const cereal::FrogPilotCarState::Reader &frogpilotCarState = fpsm["frogpilotCarState"].getFrogpilotCarState();
|
||||
}
|
||||
if (fpsm.updated("frogpilotPlan")) {
|
||||
const cereal::FrogPilotPlan::Reader &frogpilotPlan = fpsm["frogpilotPlan"].getFrogpilotPlan();
|
||||
}
|
||||
if (fpsm.updated("selfdriveState")) {
|
||||
const cereal::SelfdriveState::Reader &selfdriveState = fpsm["selfdriveState"].getSelfdriveState();
|
||||
frogpilot_scene.enabled = selfdriveState.getEnabled();
|
||||
@@ -18,8 +24,8 @@ static void update_state(FrogPilotUIState *fs) {
|
||||
|
||||
FrogPilotUIState::FrogPilotUIState(QObject *parent) : QObject(parent) {
|
||||
sm = std::make_unique<SubMaster, const std::initializer_list<const char *>>({
|
||||
"carControl", "deviceState",
|
||||
"liveDelay",
|
||||
"carControl", "deviceState", "frogpilotCarState", "frogpilotDeviceState",
|
||||
"frogpilotPlan", "frogpilotRadarState", "frogpilotSelfdriveState", "liveDelay",
|
||||
"liveParameters", "liveTorqueParameters", "liveTracks", "selfdriveState"
|
||||
});
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ void FrogPilotAnnotatedCameraWidget::updateState(const UIState &s, const FrogPil
|
||||
const SubMaster &fpsm = *(fs.sm);
|
||||
|
||||
const cereal::CarState::Reader &carState = sm["carState"].getCarState();
|
||||
const cereal::FrogPilotCarState::Reader &frogpilotCarState = fpsm["frogpilotCarState"].getFrogpilotCarState();
|
||||
const cereal::FrogPilotPlan::Reader &frogpilotPlan = fpsm["frogpilotPlan"].getFrogpilotPlan();
|
||||
const cereal::FrogPilotSelfdriveState::Reader &frogpilotSelfdriveState = fpsm["frogpilotSelfdriveState"].getFrogpilotSelfdriveState();
|
||||
const cereal::ModelDataV2::Reader &modelV2 = sm["modelV2"].getModelV2();
|
||||
const cereal::SelfdriveState::Reader &selfdriveState = sm["selfdriveState"].getSelfdriveState();
|
||||
|
||||
@@ -36,6 +39,7 @@ void FrogPilotAnnotatedCameraWidget::updateState(const UIState &s, const FrogPil
|
||||
}
|
||||
|
||||
hideBottomIcons = selfdriveState.getAlertSize() != cereal::SelfdriveState::AlertSize::NONE;
|
||||
hideBottomIcons |= frogpilotSelfdriveState.getAlertSize() != cereal::FrogPilotSelfdriveState::AlertSize::NONE;
|
||||
}
|
||||
|
||||
void FrogPilotAnnotatedCameraWidget::mousePressEvent(QMouseEvent *mouseEvent) {
|
||||
|
||||
Reference in New Issue
Block a user