fix(command):修复一些规范性问题,无实质修改。

This commit is contained in:
2026-07-28 20:21:06 +08:00
parent 15cf25a9e0
commit 86351a7bcb
2 changed files with 9 additions and 7 deletions
+5 -3
View File
@@ -491,15 +491,17 @@ void handle_command(const uint8_t *frame, uint8_t len) {
return;
case 5u: // M5 stop actuator output
{
uint32_t p_val = 0;
bool has_p = find_parameter_value(cmd, cmd_len, 'P', &p_val);
if (!has_p || p_val > (uint32_t)ACTUATOR_CH2) {
send_response(RESP_TYPE_PARAM_ERR, s_report_status_err, sizeof(s_report_status_err));
return;
}
SEGGER_RTT_printf(0, "[COMMAND] M5 Command(STOP): Actuator Channel=%u \n", p_val);
actuator_stop((actuator_channel_t)p_val);
send_response(RESP_TYPE_OK, s_report_status_ok, sizeof(s_report_status_ok));
SEGGER_RTT_printf(0, "[COMMAND] M5 Command(STOP): Actuator Channel=%u \n", p_val);
actuator_stop((actuator_channel_t)p_val);
send_response(RESP_TYPE_OK, s_report_status_ok, sizeof(s_report_status_ok));
}
return;
/* ==========================================