Split ACU HK #256
@ -158,17 +158,17 @@ ReturnValue_t RadiationSensorHandler::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
int16_t tempRaw = ((packet[offset] & 0x0f) << 8) | packet[offset + 1];
|
int16_t tempRaw = ((packet[offset] & 0x0f) << 8) | packet[offset + 1];
|
||||||
dataset.temperatureCelcius = tempRaw * 0.125;
|
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;
|
||||||
dataset.ain1 = (*(packet + offset) << 8 | *(packet + offset + 1));
|
dataset.ain1 = (*(packet + offset) << 8) | *(packet + offset + 1);
|
||||||
offset += 6;
|
offset += 6;
|
||||||
dataset.ain4 = (*(packet + offset) << 8 | *(packet + offset + 1));
|
dataset.ain4 = (*(packet + offset) << 8) | *(packet + offset + 1);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
dataset.ain5 = (*(packet + offset) << 8 | *(packet + offset + 1));
|
dataset.ain5 = (*(packet + offset) << 8) | *(packet + offset + 1);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
dataset.ain6 = (*(packet + offset) << 8 | *(packet + offset + 1));
|
dataset.ain6 = (*(packet + offset) << 8) | *(packet + offset + 1);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
dataset.ain7 = (*(packet + offset) << 8 | *(packet + offset + 1));
|
dataset.ain7 = (*(packet + offset) << 8) | *(packet + offset + 1);
|
||||||
dataset.setValidity(true, true);
|
dataset.setValidity(true, true);
|
||||||
if (printPeriodicData) {
|
if (printPeriodicData) {
|
||||||
sif::info << "Radiation sensor temperature: " << dataset.temperatureCelcius << " °C"
|
sif::info << "Radiation sensor temperature: " << dataset.temperatureCelcius << " °C"
|
||||||
|
Loading…
Reference in New Issue
Block a user