fruchti
2f9c8f51c7
The MCU board now lets the printer pull in the carrier until the new paper in sensor is triggered for the first time and then starts the print like before. The new "initial feed" provides an alignment of the carrier which is exactly the same every time. Of course, the carrier now needs two markings.
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
// -fruchti 2015
|
|
|
|
#ifndef MAIN_H_
|
|
#define MAIN_H_
|
|
|
|
#include "config.h"
|
|
|
|
typedef enum
|
|
{
|
|
PowerOnWait, // Power-on test state with all outputs
|
|
// enabled
|
|
|
|
Idle, // Waiting for print job
|
|
|
|
AlignFeed, // Initial pulling in for proper align-
|
|
// ment of the carrier
|
|
|
|
ClutchDelay, // Delay before main carrier feed
|
|
|
|
WaitingForFeed, // Waits for the end of the carrier
|
|
// alignment mark
|
|
|
|
WaitingForPaperIn, // Waits for the paper in mark on the
|
|
// carrier
|
|
|
|
ExitOnDelay, // Wait for print to be completed
|
|
|
|
ManualPaperFeedOffDelay, // Various delays
|
|
PaperInOffDelay, // for disabling the
|
|
ExitOffDelay // sensor signals again
|
|
} State_t;
|
|
|
|
int main(void);
|
|
ISR(TIMER0_COMPA_vect);
|
|
ISR(INT0_vect);
|
|
ISR(INT1_vect);
|
|
|
|
#endif
|