[Horus] Extra trims added (#3393)

This commit is contained in:
Andre Bernet
2016-04-02 16:45:43 +04:00
parent 27d37f7b78
commit 1f6a711d24
24 changed files with 257 additions and 59 deletions
+3 -3
View File
@@ -1355,7 +1355,7 @@ void alert(const pm_char * t, const pm_char * s MESSAGE_SOUND_ARG)
}
#if defined(GVARS)
int8_t trimGvar[NUM_STICKS] = { -1, -1, -1, -1 };
int8_t trimGvar[NUM_STICKS+NUM_AUX_TRIMS] = { -1, -1, -1, -1 };
#endif
#if defined(CPUARM)
@@ -1737,7 +1737,7 @@ uint16_t s_sum_samples_thr_10s;
void evalTrims()
{
uint8_t phase = mixerCurrentFlightMode;
for (uint8_t i=0; i<NUM_STICKS; i++) {
for (uint8_t i=0; i<NUM_STICKS+NUM_AUX_TRIMS; i++) {
// do trim -> throttle trim if applicable
int16_t trim = getTrimValue(phase, i);
#if !defined(VIRTUALINPUTS)
@@ -2467,7 +2467,7 @@ void moveTrimsToOffsets() // copy state of 3 primary to subtrim
}
// reset all trims, except throttle (if throttle trim)
for (uint8_t i=0; i<NUM_STICKS; i++) {
for (uint8_t i=0; i<NUM_STICKS+NUM_AUX_TRIMS; i++) {
if (i!=THR_STICK || !g_model.thrTrim) {
int16_t original_trim = getTrimValue(mixerCurrentFlightMode, i);
for (uint8_t phase=0; phase<MAX_FLIGHT_MODES; phase++) {