v1.10.0 #220
@ -126,7 +126,8 @@ ReturnValue_t RadiationSensorHandler::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
case RAD_SENSOR::READ_CONVERSIONS: {
|
case RAD_SENSOR::READ_CONVERSIONS: {
|
||||||
uint8_t offset = 0;
|
uint8_t offset = 0;
|
||||||
PoolReadGuard readSet(&dataset);
|
PoolReadGuard readSet(&dataset);
|
||||||
dataset.temperatureCelcius = (*(packet + offset) << 8 | *(packet + offset + 1)) * 0.125;
|
int16_t tempRaw = ((packet[offset] & 0x0f) << 8) | packet[offset + 1];
|
||||||
|
dataset.temperatureCelcius = tempRaw * 0.125;
|
||||||
offset += 2;
|
offset += 2;
|
||||||
dataset.ain0 = (*(packet + offset) << 8 | *(packet + offset + 1));
|
dataset.ain0 = (*(packet + offset) << 8 | *(packet + offset + 1));
|
||||||
offset += 2;
|
offset += 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user