Add copy min/max to outputs (#7396)

* Add copy min/max to outputs

* Also copy ppm center
This commit is contained in:
3djc
2020-02-18 14:11:52 +04:00
committed by GitHub
parent c2e5e4f566
commit 18b5fbf33e
18 changed files with 45 additions and 0 deletions
+19
View File
@@ -1725,6 +1725,25 @@ void copyTrimsToOffset(uint8_t ch)
storageDirty(EE_MODEL);
}
void copyMinMaxToOutputs(uint8_t ch)
{
LimitData *ld = limitAddress(ch);
int16_t min = ld->min;
int16_t max = ld->max;
int16_t center = ld->ppmCenter;
pauseMixerCalculations();
for (uint8_t chan = 0; chan < MAX_OUTPUT_CHANNELS; chan++) {
ld = limitAddress(chan);
ld->min = min;
ld->max = max;
ld->ppmCenter = center;
}
resumeMixerCalculations();
storageDirty(EE_MODEL);
}
#if defined(STARTUP_ANIMATION)