aboutsummaryrefslogtreecommitdiffstats
path: root/src/low_can_client.hpp
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-05-11 13:23:53 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-05-11 13:23:53 +0900
commit160b8947d684ce037120cf5237bd221bd9ea9785 (patch)
tree7b523f91da6516502528ad737e13d9eda847fd12 /src/low_can_client.hpp
parentf73c5f5ff5cd4b424eed1a757c7bc8d3e34ec0e9 (diff)
LowCanClient can receive accelerator.pedal.position signal
Change-Id: Ia6d4ad7888ec764fcd8dec696f6eda9d826cb62d Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src/low_can_client.hpp')
-rw-r--r--src/low_can_client.hpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/low_can_client.hpp b/src/low_can_client.hpp
index 04220f5..2941e6e 100644
--- a/src/low_can_client.hpp
+++ b/src/low_can_client.hpp
@@ -33,12 +33,14 @@ public:
void initialize();
void analyzeCanSignal(struct json_object *object);
+ bool isChangedLampState();
bool isChangedParkingBrakeState();
+ bool isChangedAccelPedalState();
bool isChangedCarState();
- bool isChangedLampState();
+ const char* getCurrentLampState();
const char* getCurrentParkingBrakeState();
+ const char* getCurrentAccelPedalState();
const char* getCurrentCarState();
- const char* getCurrentLampState();
private:
// Disable copy and move
@@ -47,29 +49,33 @@ private:
LowCanClient(LowCanClient &&) = delete;
LowCanClient &operator=(LowCanClient &&) = delete;
- const int kNumEvent_ = 4;
const std::vector<const char*> kEventName_{
"vehicle.speed",
"transmission_gear_position",
"headlamp_status",
- "parking_brake_status"
+ "parking_brake_status",
+ "accelerator.pedal.position",
};
int vehicle_speed_;
int trans_gear_pos_;
- json_bool parking_brake_status_;
json_bool headlamp_status_;
+ json_bool parking_brake_status_;
+ double accel_pedal_pos_;
+ std::string prv_lamp_state_;
+ std::string crr_lamp_state_;
std::string prv_parking_brake_state_;
std::string crr_parking_brake_state_;
+ std::string prv_accel_pedal_state_;
+ std::string crr_accel_pedal_state_;
std::string prv_car_state_;
std::string crr_car_state_;
- std::string prv_lamp_state_;
- std::string crr_lamp_state_;
+ bool is_changed_lamp_state_;
bool is_changed_parking_brake_state_;
+ bool is_changed_accel_pedal_state_;
bool is_changed_car_state_;
- bool is_changed_lamp_state_;
};
} // namespace wm