Graupner HoTT: full telemetry (#7627)

This commit is contained in:
pascallanger
2020-05-30 12:11:36 +02:00
committed by GitHub
parent fe9750fc0c
commit fa1e6f087c
11 changed files with 742 additions and 133 deletions
@@ -90,6 +90,8 @@ void TelemetryItem::setValue(const TelemetrySensor & sensor, int32_t val, uint32
uint32_t data = uint32_t(newVal);
uint8_t cellsCount = (data >> 24);
uint8_t cellIndex = ((data >> 16) & 0x0F);
if (cellIndex >= MAX_CELLS)
return;
uint16_t cellValue = (data & 0xFFFF);
if (cellsCount == 0) {
cellsCount = (cellIndex >= cells.count ? cellIndex + 1 : cells.count);