generated from hulk/gd32e23x_template_cmake_vscode
fix(command):修复一些规范性问题,无实质修改。
This commit is contained in:
+5
-3
@@ -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;
|
||||
|
||||
/* ==========================================
|
||||
|
||||
Reference in New Issue
Block a user