diff options
-rw-r--r-- | src/app.cpp | 6 | ||||
-rw-r--r-- | src/app.hpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/app.cpp b/src/app.cpp index 4ce9df6..cbb8cfd 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -168,11 +168,11 @@ void App::updateCarElements(json_object* json_out) { } else if ("running" == car_ele_name) { if ("stop" == state) { - this->crr_car_info.car_stt = "stop"; + this->crr_car_info.running_stt = false; this->emitCarStop(); } else if ("run" == state) { - this->crr_car_info.car_stt = "run"; + this->crr_car_info.running_stt = true; this->emitCarRun(); } else { @@ -321,7 +321,7 @@ App::App(wl::display *d) this->crr_car_info.parking_brake_stt = true; this->crr_car_info.accel_pedal_stt = false; this->crr_car_info.accel_pedal_pos = 0; - this->crr_car_info.car_stt = "stop"; + this->crr_car_info.running_stt = false; this->crr_car_info.headlamp_stt = false; } diff --git a/src/app.hpp b/src/app.hpp index 14cf2f9..3fc5738 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -132,7 +132,7 @@ typedef struct CarInfo { bool parking_brake_stt; bool accel_pedal_stt; double accel_pedal_pos; - const char *car_stt; + bool running_stt; bool headlamp_stt; bool lightstatus_brake_stt; } CarInfo; |