diff --git a/coprocessorjs.c b/coprocessorjs.c index 56cb380..2229c9d 100644 --- a/coprocessorjs.c +++ b/coprocessorjs.c @@ -236,6 +236,9 @@ void readSerialPort(char* output) { writeSerialPortDebug(boutRefNum, "readSerialPort, enter loop"); #endif + // wait a moment for the buffer to fill + wait(0.01); + while (!done) { if (loopCounter++ > MAX_RECIEVE_LOOP_ITERATIONS) { @@ -339,6 +342,14 @@ void readSerialPort(char* output) { // writeSerialPortDebug(boutRefNum, "\n"); #endif + done = true; + } else { + + #ifdef DEBUGGING + writeSerialPortDebug(boutRefNum, "receive loop complete, but terminator is missing"); + writeSerialPortDebug(boutRefNum, tempOutput); + #endif + done = true; } } diff --git a/dist/MessagesForMacintosh.dsk b/dist/MessagesForMacintosh.dsk index d25b03c..e449bc1 100644 Binary files a/dist/MessagesForMacintosh.dsk and b/dist/MessagesForMacintosh.dsk differ diff --git a/dist/MessagesForMacintosh.zip b/dist/MessagesForMacintosh.zip index cbdf5cf..97aa97a 100644 Binary files a/dist/MessagesForMacintosh.zip and b/dist/MessagesForMacintosh.zip differ