Fixes #2607: Added support for 0.01V resolution to D series VFAS ID 0x39

This commit is contained in:
Damjan Adamic
2015-08-02 18:39:58 +02:00
parent 25d233e832
commit 121f7780c2
3 changed files with 13 additions and 1 deletions
+8 -1
View File
@@ -640,7 +640,14 @@ void processHubPacket(uint8_t id, int16_t value)
data = data * 60;
}
else if (id == VFAS_ID) {
data *= 10;
if (data >= VFAS_D_HIPREC_OFFSET) {
// incoming value has a resolution of 0.01V and added offset of VFAS_D_HIPREC_OFFSET
data -= VFAS_D_HIPREC_OFFSET;
}
else {
// incoming value has a resolution of 0.1V
data *= 10;
}
}
setTelemetryValue(TELEM_PROTO_FRSKY_D, id, 0, data, unit, precision);