Removed FlySky digital hall gimbal double value conversion (first using the FlySky factory calibration values min,mid and max to convert to 0 to 4095 and second to convert this value again into EdgeTX internal 11-bit range 0 to 2047).

This has the added benefit of precision increase and also avoiding unnecessary computation. Needed to change to uint32_t, as the jitter removal computation would otherwise go over the 16-bit range. As 16-bit computation can be left for "normal" sticks, added a special define just for FLYSKY_HALL_STICKS.

In addition this PR changes back the radio analogs diagnose page second column also for FlySky digital hall sticks to show +/- 100 again, as now with first and second column we already cover all internal ranges used.

Tested on RM TX16S with FlySky digital hall sticks.
This commit is contained in:
rotorman
2021-09-21 08:11:26 +02:00
committed by Risto
parent e51ffb110a
commit 9570f8595a
5 changed files with 25 additions and 110 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ class RadioAnalogsDiagsWindow: public Window {
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT, 2);
dc->drawText(x + 2 * 15 - 2, y, ":");
dc->drawNumber(x + 3 * 15 - 1, y, hall_raw_values[i], LEFT);
dc->drawNumber(x + ANA_OFFSET, y, hall_adc_values[i], RIGHT);
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT);
}
for (uint8_t i = FLYSKY_HALL_CHANNEL_COUNT; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {