diff options
Diffstat (limited to 'src/app.cpp')
-rw-r--r-- | src/app.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/app.cpp b/src/app.cpp index c82c98c..4ce9df6 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -126,13 +126,13 @@ void App::updateCarElements(json_object* json_out) { if (changed) { if ("parking_brake" == car_ele_name) { - if ("parking_brake_off" == state) { + if ("off" == state) { this->crr_car_info.parking_brake_stt = false; #if 0 // FOR ALS: using lightstatus brake, so do not emit parking brake event this->emitParkingBrakeOff(); #endif } - else if ("parking_brake_on" == state) { + else if ("on" == state) { this->crr_car_info.parking_brake_stt = true; #if 0 // FOR ALS: using lightstatus brake, so do not emit parking brake event this->emitParkingBrakeOn(); @@ -143,10 +143,10 @@ void App::updateCarElements(json_object* json_out) { } } else if ("accel_pedal" == car_ele_name) { - if ("accel_pedal_off" == state) { + if ("off" == state) { this->crr_car_info.accel_pedal_stt = false; } - else if ("accel_pedal_on" == state) { + else if ("on" == state) { this->crr_car_info.accel_pedal_stt = true; } else { @@ -154,11 +154,11 @@ void App::updateCarElements(json_object* json_out) { } } else if ("lightstatus_brake" == car_ele_name) { - if ("lightstatus_brake_off" == state) { + if ("off" == state) { this->crr_car_info.lightstatus_brake_stt = false; this->emitLightstatusBrakeOff(); } - else if ("lightstatus_brake_on" == state) { + else if ("on" == state) { this->crr_car_info.lightstatus_brake_stt = true; this->emitLightstatusBrakeOn(); } @@ -167,11 +167,11 @@ void App::updateCarElements(json_object* json_out) { } } else if ("running" == car_ele_name) { - if ("car_stop" == state) { + if ("stop" == state) { this->crr_car_info.car_stt = "stop"; this->emitCarStop(); } - else if ("car_run" == state) { + else if ("run" == state) { this->crr_car_info.car_stt = "run"; this->emitCarRun(); } @@ -180,11 +180,11 @@ void App::updateCarElements(json_object* json_out) { } } else if ("lamp" == car_ele_name) { - if ("lamp_off" == state) { + if ("off" == state) { this->crr_car_info.headlamp_stt = false; this->emitHeadlampOff(); } - else if ("lamp_on" == state) { + else if ("on" == state) { this->crr_car_info.headlamp_stt = true; this->emitHeadlampOn(); } |