Signed-off-by: huhui <huhui@sharkgulf.com>
@@ -84,6 +84,11 @@ static void process_ext_command(foc_cmd_body_t *command) {
}else if (epm_dir == 2) {
mc_command_epm_move(EPM_Dir_Forward);
}
+
+ u16 cruise_spd = decode_u16((u8 *)command->data + 3);
+ if ((cruise_spd > 0) && (cruise_spd != 0xFFFF)) {
+ PMSM_FOC_Set_CruiseSpeed((float)cruise_spd);
+ }
u8 response[8] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
response[0] &= 0xFC;
response[0] |= (mc_is_start()?1:2);