Add UNKNOWN status type. test for shared_data in ShmValid()

pull/3034/head
Isaac Connor 2020-09-02 17:22:00 -04:00
parent 0d07f93cd7
commit 794474afab
1 changed files with 2 additions and 1 deletions

View File

@ -88,6 +88,7 @@ public:
} Orientation;
typedef enum {
UNKNOWN,
IDLE,
PREALARM,
ALARM,
@ -425,7 +426,7 @@ public:
bool connect();
inline int ShmValid() const {
return shared_data->valid;
return shared_data && shared_data->valid;
}
inline unsigned int Id() const {