Fixes #1508 - Needs another non regression test
This commit is contained in:
@@ -3095,6 +3095,12 @@ ISR(USART0_UDRE_vect)
|
|||||||
|
|
||||||
void instantTrim()
|
void instantTrim()
|
||||||
{
|
{
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
int16_t anas_0[NUM_INPUTS];
|
||||||
|
evalInputs(e_perout_mode_notrainer | e_perout_mode_nosticks);
|
||||||
|
memcpy(anas_0, anas, sizeof(anas_0));
|
||||||
|
#endif
|
||||||
|
|
||||||
evalInputs(e_perout_mode_notrainer);
|
evalInputs(e_perout_mode_notrainer);
|
||||||
|
|
||||||
for (uint8_t stick=0; stick<NUM_STICKS; stick++) {
|
for (uint8_t stick=0; stick<NUM_STICKS; stick++) {
|
||||||
@@ -3107,7 +3113,7 @@ void instantTrim()
|
|||||||
ExpoData * ed = expoAddress(e);
|
ExpoData * ed = expoAddress(e);
|
||||||
if (!EXPO_VALID(ed)) break; // end of list
|
if (!EXPO_VALID(ed)) break; // end of list
|
||||||
if (ed->srcRaw-MIXSRC_Rud == stick) {
|
if (ed->srcRaw-MIXSRC_Rud == stick) {
|
||||||
delta = anas[ed->chn];
|
delta = anas[ed->chn] - anas_0[ed->chn];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user