Motion Control Updates
This commit is contained in:
parent
471d018bfe
commit
cc1bdaa82f
5 changed files with 132 additions and 41 deletions
14
main.cpp
14
main.cpp
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue