fix emulator lcd/calculator thread startup race

This commit is contained in:
Jeff Wang 2019-04-05 02:10:10 -04:00
parent 8da85b8b6d
commit 836d4fc122
2 changed files with 7 additions and 4 deletions

View File

@ -8,12 +8,12 @@ Calculator::Calculator(QObject *parent) :
lcd_thread(*this), lcd_thread(*this),
m_lcdText("calculator initial text") m_lcdText("calculator initial text")
{ {
qDebug() << "Starting calculator thread";
calc_thread.start();
qDebug() << "calculator thread started";
qDebug() << "Starting lcd thread"; qDebug() << "Starting lcd thread";
lcd_thread.start(); lcd_thread.start();
qDebug() << "lcd thread started"; qDebug() << "lcd thread started";
qDebug() << "Starting calculator thread";
calc_thread.start();
qDebug() << "calculator thread started";
updateLcd(); updateLcd();
} }

View File

@ -172,7 +172,10 @@ int main()
ExpBuf[0] = 0; ExpBuf[0] = 0;
ExpBuf[1] = 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 #ifdef DEBUG_UPTIME
i = 0; i = 0;