24using ::apollo::drivers::canbus::Byte;
33 static const uint32_t PERIOD = 20 * 1000;
38 set_p_throttle_pedal_en_ctrl(data, throttle_pedal_en_ctrl_);
39 set_p_throttle_pedal_cmd(data, throttle_pedal_cmd_);
44 throttle_pedal_en_ctrl_ =
46 throttle_pedal_cmd_ = 0;
51 throttle_pedal_en_ctrl_ = throttle_pedal_en_ctrl;
60void Throttlecommand110::set_p_throttle_pedal_en_ctrl(
63 int x = throttle_pedal_en_ctrl;
65 Byte to_set(data + 0);
66 to_set.set_value(
static_cast<uint8_t
>(x), 0, 8);
70 int throttle_pedal_cmd) {
71 throttle_pedal_cmd_ = throttle_pedal_cmd;
79void Throttlecommand110::set_p_throttle_pedal_cmd(uint8_t* data,
80 int throttle_pedal_cmd) {
81 throttle_pedal_cmd = ProtocolData::BoundedValue(0, 100, throttle_pedal_cmd);
82 int x = throttle_pedal_cmd;
84 Byte to_set(data + 1);
85 to_set.set_value(
static_cast<uint8_t
>(x), 0, 8);
uint32_t GetPeriod() const override
Throttlecommand110 * set_throttle_pedal_cmd(int throttle_pedal_cmd)
void UpdateData(uint8_t *data) override
Throttlecommand110 * set_throttle_pedal_en_ctrl(Throttle_command_110::Throttle_pedal_en_ctrlType throttle_pedal_en_ctrl)
Throttle_pedal_en_ctrlType
@ THROTTLE_PEDAL_EN_CTRL_DISABLE