Skip to content

Commit 35e91f0

Browse files
tbreckleTobias Breckle
andauthored
Added support for faulty temperature sensor. (#109)
* Added support for faulty temperature sensor. * Updated boards reference. --------- Co-authored-by: Tobias Breckle <git@breckle.rocks>
1 parent ea17568 commit 35e91f0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

boards

src/appmainwindow.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,6 +1964,13 @@ void guiWindow::serialPort_readyRead()
19641964
{
19651965
unsigned int temp = serial.port.read(1).at(0);
19661966

1967+
if (temp == OF_Const::TEMPERATURE_SENSOR_ERROR_VALUE) {
1968+
// Sensor error.
1969+
ui->tmp36Label->setText("Temperature: FAULT");
1970+
ui->tmp36Label->setStyleSheet("color: white; background-color: #FF0000; font: bold");
1971+
break;
1972+
}
1973+
19671974
ui->tmp36Label->setText(QString("Temperature: %1°C").arg(temp));
19681975

19691976
if( temp > App_Common::settingsTable[App_Common::dataOrig][OF_Const::tempShutdown])

0 commit comments

Comments
 (0)