Skip to content
Snippets Groups Projects
Commit 16f094a1 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

ADC: minor fix to the ADC Ch6() code

we don't need to add count any more, as floating point maths doesn't
need to round up
parent 3a325541
No related branches found
No related tags found
No related merge requests found
......@@ -228,7 +228,7 @@ uint32_t AP_ADC_ADS7844::Ch6(const uint8_t *channel_numbers, float *result)
// division. That costs us 36 bytes of stack, but I think its
// worth it.
for (i = 0; i < 6; i++) {
result[i] = (sum[i] + count[i]) / (float)count[i];
result[i] = sum[i] / (float)count[i];
}
// return number of microseconds since last call
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment