feat: harden seat intent and expand HIL coverage
This commit is contained in:
@@ -915,14 +915,22 @@ bool SeatMotor_CalibrateRange(motor_mode_t mode,
|
||||
uint32_t commandSequence)
|
||||
{
|
||||
motor_calibration_result_t result;
|
||||
uint8_t dutyPercent;
|
||||
|
||||
if((false == SeatMotor_ModeValid(mode)) || (0ul == legTimeoutMs))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/* The connected four-axis bench needs the same verified loaded duty used
|
||||
* by normal absolute moves and known-range homing. The protocol minimum
|
||||
* (50%) cannot reliably start M0/M1 at a loaded endpoint; using it makes
|
||||
* the first quiet window look like an endpoint and invalidates an
|
||||
* otherwise healthy calibration. Hall endpoint, timeout and current
|
||||
* protections remain active throughout both legs. */
|
||||
dutyPercent = SeatMotor_DefaultDutyPercent(mode);
|
||||
if((false == SeatMotor_PrepareNewTask(mode, commandSequence)) ||
|
||||
(MOTOR_API_SUCCESS != Motor_SetFixedDutyPercent(
|
||||
mode, MOTOR_SPEED_MIN_DUTY_PERCENT)))
|
||||
mode, dutyPercent)))
|
||||
{
|
||||
SeatMotor_SetFailed(mode, SEAT_MOTOR_RESULT_CALIBRATION_FAILED);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user