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
+4
View File
@@ -1280,8 +1280,12 @@ extern Clipboard clipboard;
#endif
#if !defined(SIMU)
#if defined(FLYSKY_HALL_STICKS)
extern uint32_t s_anaFilt[NUM_ANALOGS];
#else
extern uint16_t s_anaFilt[NUM_ANALOGS];
#endif
#endif
#if defined(JITTER_MEASURE)
extern JitterMeter<uint16_t> rawJitter[NUM_ANALOGS];