ui: include MADS enabled state to engaged check (#976)

* ui: include MADS enabled state to `engaged` check

* let's bump it up
This commit is contained in:
Jason Wen
2025-06-03 00:28:55 -04:00
committed by GitHub
parent 1ee7b4ad0e
commit 9c28583171
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -20,6 +20,11 @@ class UIStateSP : public UIState {
public:
UIStateSP(QObject *parent = 0);
void updateStatus() override;
inline bool engaged() const override {
return scene.started && (
(*sm)["selfdriveState"].getSelfdriveState().getEnabled() || (*sm)["selfdriveStateSP"].getSelfdriveStateSP().getMads().getEnabled()
);
}
void setSunnylinkRoles(const std::vector<RoleModel> &roles);
void setSunnylinkDeviceUsers(const std::vector<UserModel> &users);
+1 -1
View File
@@ -72,7 +72,7 @@ class UIState : public QObject {
public:
UIState(QObject* parent = 0);
virtual void updateStatus();
inline bool engaged() const {
virtual inline bool engaged() const {
return scene.started && (*sm)["selfdriveState"].getSelfdriveState().getEnabled();
}