if( giCoke_SerialFD == -1 )
return -2;
+ // Flush the input buffer
+ {
+ char tmpbuf[512];
+ read(giCoke_SerialFD, tmpbuf, sizeof(tmpbuf));
+ }
+
// Wait for a prompt
ret = 0;
do {
// Can't dispense if the machine is not connected
if( giCoke_SerialFD == -1 )
return -2;
+
+ // Flush the input buffer
+ {
+ char tmpbuf[512];
+ read(giCoke_SerialFD, tmpbuf, sizeof(tmpbuf));
+ }
// Wait for prompt
i = 0;