Changed temperature parsing
This commit is contained in:
@@ -118,12 +118,12 @@ void MainWindow::handlePackage(int index)
|
||||
parameterModel_->setItem(0, 1, new QStandardItem(QString::number(inputVoltage)));
|
||||
|
||||
quint16 coolantTemperatureIndex = (message->getByte(4) << 2) + ((message->getByte(7) & 0x30) >> 4);
|
||||
if (coolantTemperatureIndex > 4095)
|
||||
if (coolantTemperatureIndex > 1023)
|
||||
{
|
||||
coolantTemperatureIndex = 0;
|
||||
}
|
||||
|
||||
quint16 coolantTemperature = FlashTdegr[coolantTemperatureIndex] - 55;
|
||||
qint16 coolantTemperature = FlashTdegr[coolantTemperatureIndex << 2] - 55;
|
||||
parameterModel_->setItem(5, 1, new QStandardItem(QString::number(coolantTemperature)));
|
||||
|
||||
quint16 outputPhaseCurrent = (message->getByte(3) << 2) + ((message->getByte(7) & 0x0C) >> 2);
|
||||
|
||||
Reference in New Issue
Block a user