aboutsummaryrefslogtreecommitdiffstats
path: root/src/low_can_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/low_can_client.cpp')
-rw-r--r--src/low_can_client.cpp40
1 files changed, 1 insertions, 39 deletions
diff --git a/src/low_can_client.cpp b/src/low_can_client.cpp
index a42e641..025418a 100644
--- a/src/low_can_client.cpp
+++ b/src/low_can_client.cpp
@@ -38,12 +38,9 @@ LowCanClient::LowCanClient() :
crr_parking_brake_state_("parking_brake_on"),
prv_accel_pedal_state_("accel_pedal_off"),
crr_accel_pedal_state_("accel_pedal_off"),
- prv_car_state_("car_stop"),
- crr_car_state_("car_stop"),
is_changed_lamp_state_(false),
is_changed_parking_brake_state_(false),
- is_changed_accel_pedal_state_(false),
- is_changed_car_state_(false)
+ is_changed_accel_pedal_state_(false)
{
HMI_DEBUG("wm:lcc", "Call");
}
@@ -170,15 +167,6 @@ void LowCanClient::analyzeCanSignal(struct json_object *object) {
}
HMI_DEBUG("wm:lcc", "Current accelerator pedal state:%s", this->crr_accel_pedal_state_.c_str());
- // Update car state
- if ((0 == this->vehicle_speed_) || (true == this->parking_brake_status_)) {
- this->crr_car_state_ = "car_stop";
- }
- else {
- this->crr_car_state_ = "car_run";
- }
- HMI_DEBUG("wm:lcc", "Current car state:%s", this->crr_car_state_.c_str());
-
// If lamp state is changed,
// backup current state for previous state and set flag
if (this->prv_lamp_state_ != this->crr_lamp_state_) {
@@ -205,15 +193,6 @@ void LowCanClient::analyzeCanSignal(struct json_object *object) {
this->prv_accel_pedal_state_ = this->crr_accel_pedal_state_;
this->is_changed_accel_pedal_state_ = true;
}
-
- // If car state is changed,
- // backup current state for previous state and set flag
- if (this->prv_car_state_ != this->crr_car_state_) {
- HMI_DEBUG("wm:lcc", "Car state is changed: %s -> %s",
- this->prv_car_state_.c_str(), this->crr_car_state_.c_str());
- this->prv_car_state_ = this->crr_car_state_;
- this->is_changed_car_state_ = true;
- }
}
bool LowCanClient::isChangedLampState() {
@@ -237,13 +216,6 @@ bool LowCanClient::isChangedAccelPedalState() {
return this->is_changed_accel_pedal_state_;
}
-bool LowCanClient::isChangedCarState() {
- HMI_DEBUG("wm:lcc", "Call");
-
- // Return changed flag
- return this->is_changed_car_state_;
-}
-
const char* LowCanClient::getCurrentLampState() {
HMI_DEBUG("wm:lcc", "Call");
@@ -274,15 +246,5 @@ const char* LowCanClient::getCurrentAccelPedalState() {
return this->crr_accel_pedal_state_.c_str();
}
-const char* LowCanClient::getCurrentCarState() {
- HMI_DEBUG("wm:lcc", "Call");
-
- // Clear changed flag
- this->is_changed_car_state_ = false;
-
- // Return current car state
- return this->crr_car_state_.c_str();
-}
-
} // namespace wm