From 836d4fc1228ebd5c4793f405ce45dc270d0ca251 Mon Sep 17 00:00:00 2001 From: Jeff Wang Date: Fri, 5 Apr 2019 02:10:10 -0400 Subject: [PATCH] fix emulator lcd/calculator thread startup race --- qt_gui/calculator.cpp | 6 +++--- src/main.c | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/qt_gui/calculator.cpp b/qt_gui/calculator.cpp index c864d8e..b7ba099 100644 --- a/qt_gui/calculator.cpp +++ b/qt_gui/calculator.cpp @@ -8,12 +8,12 @@ Calculator::Calculator(QObject *parent) : lcd_thread(*this), m_lcdText("calculator initial text") { - qDebug() << "Starting calculator thread"; - calc_thread.start(); - qDebug() << "calculator thread started"; qDebug() << "Starting lcd thread"; lcd_thread.start(); qDebug() << "lcd thread started"; + qDebug() << "Starting calculator thread"; + calc_thread.start(); + qDebug() << "calculator thread started"; updateLcd(); } diff --git a/src/main.c b/src/main.c index 7e681e4..1e79870 100644 --- a/src/main.c +++ b/src/main.c @@ -172,7 +172,10 @@ int main() ExpBuf[0] = 0; ExpBuf[1] = 0; - LCD_OutString("STC RPN Calculator v1.00", 32); + LCD_OutString("STC RPN Calculator v1.01", 32); +#ifdef DESKTOP + LcdAvailable.release(); +#endif #ifdef DEBUG_UPTIME i = 0;