25using ::apollo::drivers::canbus::Byte;
30 Lincoln *chassis_detail)
const {
31 chassis_detail->mutable_ems()->set_engine_rpm(
engine_rpm(bytes, length));
32 chassis_detail->mutable_gas()->set_accelerator_pedal(
34 chassis_detail->mutable_gas()->set_accelerator_pedal_rate(
39 int32_t length)
const {
40 Byte frame_high(bytes + 1);
41 int32_t high = frame_high.get_byte(0, 8);
42 Byte frame_low(bytes + 0);
43 int32_t low = frame_low.get_byte(0, 8);
44 int32_t value = (high << 8) | low;
49 int32_t length)
const {
50 Byte frame_high(bytes + 3);
51 int32_t high = frame_high.get_byte(0, 2);
52 Byte frame_low(bytes + 2);
53 int32_t low = frame_low.get_byte(0, 8);
54 int32_t value = (high << 8) | low;
59 int32_t length)
const {
60 Byte frame(bytes + 4);
61 int32_t x = frame.get_byte(0, 8);
double acc_pedal_percent(const std::uint8_t *bytes, int32_t length) const
calculate acc pedal percent based on byte array.
double acc_pedal_rate(const std::uint8_t *bytes, int32_t length) const
calculate acc pedal rate based on byte array.
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
double engine_rpm(const std::uint8_t *bytes, int32_t length) const
calculate engine rpm based on byte array.
the class of Throttleinfo75 (for lincoln vehicle)