Wednesday, January 12, 2011

Cleaning up code.

  • Today I'm working on cleaning up the code (now that it is working again) to remove unnecessary diagnostic code & flushes. However, since I already have the 7-segment output facility, I'm going to use that instead to display the clock discrepancies & display genuine error codes.
  • That is basically done now; at present the system alternates between displaying the discrepancy after receiving the PPS pulse, and displaying "yo" after receiving NMEA text data from the GPS to retransmit.
  • Emailed Gordon to remind him to process the data file from last month, which is available now. I also have another file now that I collected over the last couple of days, which might be worth looking at.
  • Next up: [ ] Rejigger the UART from the Wi-Fi board to see if I can have it generate an IRQ; if so, then we can do a remote command processor. I have to think carefully however about how to manage the concurrency - we need to make sure that certain operations like serial output are atomic. Perhaps I should use an RTOS like MicroC/OS-II, which provides concurrent programming abstractions like threads, semaphores, etc. Or, I could maybe just roll my own minimal facility for serializing serial output. Hmm... Let's not get ahead of ourselves here; at this point I'm not even sure how to enable a serial receive interrupt in the context of HAL and the default UART driver. I might have to write my own driver! It might be simpler/preferable to just set up a polling loop to just constantly do nonblocking reads on both UARTs.

No comments:

Post a Comment