Split ACU HK #256

Merged
meierj merged 16 commits from mueller/split-acu-hk into develop 2022-05-25 15:23:19 +02:00
Showing only changes of commit 5df905182c - Show all commits

View File

@ -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"