sus handler update

This commit is contained in:
Robin Müller 2022-02-18 12:46:58 +01:00
parent b6f3b838b7
commit 16680663fd

View File

@ -102,10 +102,10 @@ ReturnValue_t SusHandler::buildCommandFromCommand(DeviceCommandId_t deviceComman
}
case (SUS::START_INT_TIMED_CONVERSIONS): {
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
//cmdBuffer[0] = max1227::buildResetByte(true);
cmdBuffer[0] = SUS::CONVERSION;
cmdBuffer[0] = max1227::buildResetByte(true);
cmdBuffer[1] = SUS::CONVERSION;
rawPacket = cmdBuffer;
rawPacketLen = 1;
rawPacketLen = 2;
break;
}
case (SUS::READ_INT_TIMED_CONVERSIONS): {
@ -196,7 +196,8 @@ ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8
}
case (SUS::READ_EXT_TIMED_TEMPS): {
PoolReadGuard readSet(&dataset);
dataset.temperatureCelcius = static_cast<int16_t>(((packet[23] & 0x0f) << 8) | packet[24]) * 0.125;
dataset.temperatureCelcius =
static_cast<int16_t>(((packet[23] & 0x0f) << 8) | packet[24]) * 0.125;
comState = ComStates::EXT_CLOCKED_CONVERSIONS;
break;
}