电机最大旋转角度限定100度
财位指令旋转电机以后返回原位
This commit is contained in:
@@ -47,7 +47,8 @@
|
||||
/* Liveness safety bound for the fixed two-cycle wealth spin intro (not the
|
||||
* animation length). On timeout the worker proceeds to reveal + rotate anyway. */
|
||||
#define CONTROL_PLANE_SPIN_INTRO_TIMEOUT_MS 6000
|
||||
#define CONTROL_PLANE_COMMAND_ROTATION_DEG 45.0f
|
||||
#define CONTROL_PLANE_COMMAND_ROTATION_DEG 100.0f
|
||||
#define CONTROL_PLANE_COMMAND_RETURN_DELAY_MS 5000
|
||||
|
||||
#if (configSUPPORT_STATIC_ALLOCATION == 1) && \
|
||||
((defined(CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) && CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) || \
|
||||
@@ -716,8 +717,14 @@ static esp_err_t control_plane_apply_wealth_direction(size_t direction_index,
|
||||
|
||||
(void)direction_index;
|
||||
|
||||
float current_angle = domain_get_current_angle();
|
||||
return control_plane_rotate_to_angle(current_angle + CONTROL_PLANE_COMMAND_ROTATION_DEG);
|
||||
float start_angle = domain_get_current_angle();
|
||||
esp_err_t rotate_err = control_plane_rotate_to_angle(start_angle + CONTROL_PLANE_COMMAND_ROTATION_DEG);
|
||||
if (rotate_err != ESP_OK) {
|
||||
return rotate_err;
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(CONTROL_PLANE_COMMAND_RETURN_DELAY_MS));
|
||||
return control_plane_rotate_to_angle(start_angle);
|
||||
}
|
||||
|
||||
static esp_err_t control_plane_run_model_calibration_motion(void)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#define PLATFORM_STEPPER_DECEL_STEPS 48
|
||||
#define PLATFORM_STEPPER_STEPS_PER_REV 4128.0f
|
||||
#define PLATFORM_STEPPER_POWER_OFF_WAIT_MS 1000
|
||||
#define PLATFORM_STEPPER_MAX_ROTATION_DEG 330.0f
|
||||
#define PLATFORM_STEPPER_MAX_ROTATION_DEG 100.0f
|
||||
#define PLATFORM_GPIO_LOW_BANK_MAX_PIN 31
|
||||
#define PLATFORM_GPIO_HIGH_BANK_OFFSET 32
|
||||
|
||||
|
||||
Reference in New Issue
Block a user