25using ::apollo::drivers::canbus::Byte;
30 Lincoln *chassis_detail)
const {
31 chassis_detail->mutable_battery()->set_fuel_level(fuel_level(bytes, length));
34double Fuellevel72::fuel_level(
const std::uint8_t *bytes,
35 int32_t length)
const {
36 Byte high_frame(bytes + 1);
37 int32_t high = high_frame.get_byte(0, 8);
38 Byte low_frame(bytes);
39 int32_t low = low_frame.get_byte(0, 8);
40 int32_t value = (high << 8) | low;
47 const double fuel_level_coeff = 0.108696;
48 return value * fuel_level_coeff;
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
the class of (Fuellevel72) for lincoln vehicle)