Motion Control Updates

This commit is contained in:
IMback 2017-09-22 21:40:29 +02:00
parent 471d018bfe
commit cc1bdaa82f
5 changed files with 132 additions and 41 deletions

View file

@ -10,14 +10,18 @@ int main()
{
DDRB = 0xFF;
sei();
Serial serial;
sei();
/*serial.write("UVOS plotter interface\n");
serial.write(1250);
serial.putChar('\n');*/
Plotter plotter(&PORTB, PB4);
Plotter plotter(&PORTB, PB4, &serial);
HpglParser parser(&plotter);
//serial.putString("UVOS plotter interface\n");
while(true)
{
if(serial.dataIsWaiting())
@ -26,11 +30,11 @@ int main()
int parseRetrun = parser.add(ch);
if(parseRetrun == 1)
{
serial.putString("ok\n");
serial.write("ok\n");
}
else if(parseRetrun == 2)
{
serial.putString("overrun!, ok\n");
serial.write("overrun!, ok\n");
}
}
}