#include <pthread.h>
#define READ_TIMEOUT 2 // 2 seconds for ReadChar
-#define TRACE_COKE 1
+#define TRACE_COKE 0
// === IMPORTS ===
// == CODE ===
int Coke_InitHandler()
{
+ CompileRegex(&gCoke_StatusRegex, "^slot\\s+([0-9]+)\\s+([^:]+):([a-zA-Z]+)\\s*", REG_EXTENDED);
+
printf("connecting to coke machine...\n");
giCoke_SerialFD = InitSerial(gsCoke_SerialPort, 9600);
AddPeriodicFunction(Coke_int_UpdateSlotStatuses);
- CompileRegex(&gCoke_StatusRegex, "^slot\\s+([0-9]+)\\s+([^:]+):([a-zA-Z]+)\\s*", REG_EXTENDED);
return 0;
}
while( (dest = va_arg(args, char **)) )
{
- printf(" dest = %p\n", dest);
// Trim leading spaces
while( *ArgStr == ' ' || *ArgStr == '\t' )
ArgStr ++;