![](/media/cache/profiles/2012_sf_avc_095.jpg.50x50_q85.jpg)
2018 revision to classic DataBus AVC code.
Dependencies: LSM303DLM Servo SerialGraphicLCD L3G4200D IncrementalEncoder SimpleShell
Diff: main.cpp
- Revision:
- 38:6fec81f85221
- Parent:
- 37:b8259500dbd3
- Child:
- 39:465213249f71
diff -r b8259500dbd3 -r 6fec81f85221 main.cpp --- a/main.cpp Wed Jan 02 18:20:47 2019 +0000 +++ b/main.cpp Wed Jan 02 18:40:29 2019 +0000 @@ -111,6 +111,7 @@ // GPS Ublox6 ublox; EventQueue gpsQueue(8 * EVENTS_EVENT_SIZE); +EventQueue lcdQueue(8 * EVENTS_EVENT_SIZE); // Callback for gps parse data ready void gps_callback() { @@ -120,7 +121,8 @@ ublox.read(d.latitude, d.longitude, d.course, d.speed, d.hdop, d.svcount); d.timestamp = Kernel::get_ms_count(); logQueue.call(&logger, &Logger::log_gps, d); - //lcdQueue.call ... + //lcdQueue.call(&display, &Display::gps, d); + display.gps(d); } // ISR for GPS serial, passes off to thread @@ -276,6 +278,10 @@ display.status("config load error"); } + printf("Starting display...\n"); + Thread lcdThread(osPriorityLow, 2048, 0, "lcd"); + lcdThread.start(callback(&lcdQueue, &EventQueue::dispatch_forever)); + printf("Starting buttons...\n"); display.status("Starting buttons"); lbutton.fall(buttonQueue.event(button_event));