aboutsummaryrefslogtreecommitdiffstats
path: root/src/low_can_client.cpp
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-05-14 17:22:57 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-05-14 17:24:48 +0900
commitbfadb522b21256fde7283746b90116c237e57a5b (patch)
tree099baa7b078029a19430372bace46dee64958be6 /src/low_can_client.cpp
parent701f1ff00b3b6cf5f5a50b4cf3f65e176cb26460 (diff)
PolicyManager can judge the current car state
and remove judgement process of it from LowCanClient because it should be judged by PolicyManager Change-Id: I94467332665e34b751604cafe5d43f3abd4d7cfd Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
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