comparison main.c @ 331:5de3fc71ce48

- Make the python work on openwrt - main.c: Stay awake for testing print CRC as unsigned
author Matt Johnston <matt@ucc.asn.au>
date Wed, 06 Jun 2012 23:05:35 +0800
parents 7ac6b8846eea
children d3e5934fe55c
comparison
equal deleted inserted replaced
330:7ac6b8846eea 331:5de3fc71ce48
34 #define VALUE_NOSENSOR -9000 34 #define VALUE_NOSENSOR -9000
35 #define VALUE_BROKEN -8000 35 #define VALUE_BROKEN -8000
36 36
37 // limited to uint16_t for now 37 // limited to uint16_t for now
38 #define COMMS_WAKE 3600 38 #define COMMS_WAKE 3600
39 #define WAKE_SECS 30 39 #define WAKE_SECS 250 // XXX testing
40 40
41 #define BAUD 19200 41 #define BAUD 19200
42 #define UBRR ((F_CPU)/8/(BAUD)-1) 42 #define UBRR ((F_CPU)/8/(BAUD)-1)
43 43
44 #define PORT_LED PORTC 44 #define PORT_LED PORTC
247 fprintf_P(crc_stdout, PSTR(" %6d"), measurements[n][s]); 247 fprintf_P(crc_stdout, PSTR(" %6d"), measurements[n][s]);
248 } 248 }
249 fputc('\n', crc_stdout); 249 fputc('\n', crc_stdout);
250 } 250 }
251 fprintf_P(crc_stdout, PSTR("END\n")); 251 fprintf_P(crc_stdout, PSTR("END\n"));
252 fprintf_P(stdout, PSTR("CRC=%d\n"), crc_out); 252 fprintf_P(stdout, PSTR("CRC=%hu\n"), crc_out);
253 } 253 }
254 254
255 static void 255 static void
256 cmd_clear() 256 cmd_clear()
257 { 257 {
743 743
744 setup_tick_counter(); 744 setup_tick_counter();
745 745
746 sei(); 746 sei();
747 747
748 need_comms = 1;
749
748 #if 0 750 #if 0
749 for (;;) 751 for (;;)
750 { 752 {
751 do_comms(); 753 do_comms();
752 } 754 }