24using ::apollo::drivers::canbus::Byte;
33 static const uint32_t PERIOD = 20 * 1000;
38 set_p_brake_pedal_en_ctrl(data, brake_pedal_en_ctrl_);
39 set_p_brake_pedal_cmd(data, brake_pedal_cmd_);
50 brake_pedal_en_ctrl_ = brake_pedal_en_ctrl;
59void Brakecommand111::set_p_brake_pedal_en_ctrl(
62 int x = brake_pedal_en_ctrl;
64 Byte to_set(data + 0);
65 to_set.set_value(x, 0, 8);
69 brake_pedal_cmd_ = brake_pedal_cmd;
77void Brakecommand111::set_p_brake_pedal_cmd(uint8_t* data,
78 int brake_pedal_cmd) {
79 brake_pedal_cmd = ProtocolData::BoundedValue(0, 100, brake_pedal_cmd);
80 int x = brake_pedal_cmd;
82 Byte to_set(data + 1);
83 to_set.set_value(
static_cast<uint8_t
>(x), 0, 8);
Brakecommand111 * set_brake_pedal_cmd(int brake_pedal_cmd)
uint32_t GetPeriod() const override
Brakecommand111 * set_brake_pedal_en_ctrl(Brake_command_111::Brake_pedal_en_ctrlType brake_pedal_en_ctrl)
void UpdateData(uint8_t *data) override
@ BRAKE_PEDAL_EN_CTRL_DISABLE