diff --git a/iflytop_canbus_protocol.hpp b/iflytop_canbus_protocol.hpp index c4455d5..2d935d4 100644 --- a/iflytop_canbus_protocol.hpp +++ b/iflytop_canbus_protocol.hpp @@ -1,7 +1,7 @@ #pragma once #include -#define PROTOCOL_VERSION 4 +#define PROTOCOL_VERSION 5 #define HEART_OVERTIME (30 * 1000) #pragma pack(1) @@ -213,8 +213,44 @@ typedef enum { * 压力传感器数据上报 * ***********************************************************************************************************************/ kcmd_pressure_sensor_bus_read_data = 400, // cmd:subid ack:pressure(0.1pa) - kcmd_pressure_sensor_bus_set_report_period_ms = 401, // cmd:subid,period +#if 0 + kcmd_pressure_sensor_bus_set_report_period_ms = 401, // cmd:period kreport_pressure_data = 450, // report:subid pressure(0.1pa) +#endif + + /*********************************************************************************************************************** + * MINI_PWM风机控制 * + ***********************************************************************************************************************/ + /** + * @brief 风机控制 + * 打开/关闭 + * 安全继电器控制 + * 电流上报 + */ + kcmd_mini_pwm_blower_ctrl = 500, // cmd: speed(0-100) + kcmd_mini_pwm_blower_read_fbcount = 501, // cmd: valve_state + + /*********************************************************************************************************************** + * 加热片控制 * + ***********************************************************************************************************************/ + /** + * @brief 加热片控制 + * 打开/关闭 + * 安全继电器控制 + * 是否支持读取温度 + * + * 电流上报 + * 温度上报 + */ + kcmd_heater_ctrl = 600, // cmd: power(0-100) + kcmd_heater_ctrl_safe_valve = 601, // cmd: valve_state + kcmd_heater_read_electric_current = 602, // report:electric_current(ma) + kcmd_heater_read_temperature_data = 603, // report:temperature(0.01) + + /*********************************************************************************************************************** + * H2O2传感器数值上报 * + ***********************************************************************************************************************/ + kreport_h2o2_sensor_data = 750, // report:subid h2o2_sensor_data #if 0