Try to defer HWIdle notification until the motor is really idle
r3620 | dcl | 2012-06-27 15:11:04 +1000 (Wed, 27 Jun 2012) | 1 line
This commit is contained in:
@@ -2545,7 +2545,13 @@ static void DMCState_OffTimer(pDMC2280Driv self, pEvtEvent event) {
|
||||
case eStateEvent:
|
||||
if (self->run_flag == 0) {
|
||||
if (self->driver_status == HWBusy)
|
||||
self->driver_status = HWIdle;
|
||||
/*
|
||||
* To allow the airpads to come down before counting, we defer
|
||||
* notification if there is no motor off delay and creeping is on. We
|
||||
* should not need to reposition in motor.c in these circumstances.
|
||||
*/
|
||||
if (self->motOffDelay > 0 || self->creep_offset == 0.0)
|
||||
self->driver_status = HWIdle;
|
||||
if (self->motOffDelay) {
|
||||
DMC_SetTimer(self, self->motOffDelay);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user