![](/media/cache/group/download_IjbieK2.png.50x50_q85.png)
demo new haven display
Dependencies: LCD Menu ButtonCtrl TimeManagement EventLog AddressMap emic2
ESCM 2000 Control and Display application provides interface for the LPC1768 processor boards with the ECSM 2000 system.
This application implements SW interface : - RX 485 Receive from physical system - RX 485 Interface to send toECOM / ESCM board - CAN Interface to send to ECOM / ESCM board - 4x40 LCD with menu controls - RTC configuration -EMIC2 Sound Card - GPIO Extender to push buttons etc
Diff: ESCMControlApp.cpp
- Revision:
- 7:0244f1a26545
- Parent:
- 6:010ceb99f7b0
- Child:
- 8:f15a5358883c
--- a/ESCMControlApp.cpp Tue Sep 17 13:48:57 2019 +0000 +++ b/ESCMControlApp.cpp Tue Sep 17 14:24:27 2019 +0000 @@ -59,13 +59,14 @@ // --------------------------------------------------------------------- RealTimeClock rtc; -/* for incoming messages */ -CircularBuffer<event_t, 64> message_queue; - -/* for button presses */ +// --------------------------------------------------------------------- +// queue for button presses +// --------------------------------------------------------------------- CircularBuffer<event_t, 64> event_queue; -/* for playing sound */ +// --------------------------------------------------------------------- +// queue for playing sound +// --------------------------------------------------------------------- CircularBuffer<playbackMessage_t, 10> playback_queue; @@ -180,21 +181,6 @@ } /*************************************************************************/ -void ESCMControlApp::processMessageQueue () -{ - event_t e; - - if (message_queue.empty()) - return; - - while (!message_queue.empty()) { - message_queue.pop(e); - tx485Message(e.event); - ThisThread::sleep_for(100); - } -} - -/*************************************************************************/ void ESCMControlApp::processSoundQueue () { playbackMessage_t e; @@ -287,20 +273,6 @@ va_end(args); } -/*************************************************************************/ -void ESCMControlApp::postEvent (uint16_t address) -{ - event_t e; - - e.event = address; - - if (!message_queue.full()) { - message_queue.push(e); - } else { - printf("Message Queue Full\n"); - } -} - /************************************************************************* * The following function is called with a new event is received to