Handle INT1712 1 interrupts in MotorOn state. This can happen if you abort an operation during a posfault retry or immediately after a run/drive command.

Handle TimeOut events during Idle state.  These have been observed to occur when a scan skips a point because of a drive failure.

r2237 | ffr | 2007-11-07 15:41:21 +1100 (Wed, 07 Nov 2007) | 4 lines
This commit is contained in:
Ferdi Franceschini
2007-11-07 15:41:21 +11:00
committed by Douglas Clowes
parent d6f484f6dc
commit 1c181fb68f

View File

@@ -1677,7 +1677,12 @@ static void DMCState_Idle(pDMC2280Driv self, pEvtEvent event) {
}
break;
case eTimeoutEvent:
/* TODO handle message timeout */
/* TODO handle message timeout, I don't know what to do here, maybe this'll work. ferdi */
strncpy(self->lastCmd, event->event.msg.cmd->out_buf, CMDLEN);
self->errorCode = MOTCMDTMO;
self->driver_status = HWFault;
change_state(self, DMCState_MotorHalt);
return;
break;
}
unhandled_event(self, event);
@@ -1775,7 +1780,7 @@ static void DMCState_MotorStart(pDMC2280Driv self, pEvtEvent event) {
}
} while (0);
break;
/* TODO: handle halt command */
/* TODO: handle halt command, can we get a HALT between this and MotorOn? ferdi */
case eTimeoutEvent:
/* TODO handle message timeout */
break;
@@ -1882,7 +1887,15 @@ static void DMCState_MotorOn(pDMC2280Driv self, pEvtEvent event) {
}
} while (0);
break;
/* TODO: handle halt command */
/* TODO: handle halt command, Hey Doug is this right? ferdi */
case eCommandEvent:
switch (event->event.cmd.cmd_type) {
case CMD_HALT:
/* handle halt command, send message */
change_state(self, DMCState_MotorHalt);
return;
}
break;
case eTimeoutEvent:
/* TODO handle message timeout */
break;
@@ -2250,7 +2263,7 @@ static void DMCState_MotorStop(pDMC2280Driv self, pEvtEvent event) {
/* TODO: handle run command */
return;
case CMD_HALT:
/* TODO: handle halt command */
/* TODO: handle halt command, can we get a HALT between this and MotorOff? ferdi */
return;
}
break;
@@ -2284,7 +2297,7 @@ static void DMCState_MotorOff(pDMC2280Driv self, pEvtEvent event) {
/* TODO: handle run command */
return;
case CMD_HALT:
/* TODO: handle halt command */
/* TODO: handle halt command, can we get a HALT between this and Idle? ferdi */
return;
}
break;