Rev 2157 | Rev 2164 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2157 | Rev 2158 | ||
---|---|---|---|
Line 147... | Line 147... | ||
147 | } |
147 | } |
Line 148... | Line 148... | ||
148 | 148 | ||
149 | /***************************************************/ |
149 | /***************************************************/ |
150 | /* MixerTable */ |
150 | /* MixerTable */ |
151 | /***************************************************/ |
151 | /***************************************************/ |
152 | void mixerMatrix_writeToEEProm(void) { |
152 | void motorMixer_writeToEEProm(void) { |
153 | writeChecksummedBlock(EEMIXER_REVISION, (uint8_t*)&mixerMatrix, EEPROM_ADR_MIXER_TABLE, sizeof(MixerMatrix_t)); |
153 | writeChecksummedBlock(EEMIXER_REVISION, (uint8_t*)&motorMixer, EEPROM_ADR_MIXER_TABLE, sizeof(MotorMixer_t)); |
Line 154... | Line 154... | ||
154 | } |
154 | } |
155 | 155 | ||
156 | void mixerMatrix_readOrDefault(void) { |
156 | void motorMixer_readOrDefault(void) { |
157 | // load mixer table |
157 | // load mixer table |
158 | if (readChecksummedBlock(EEMIXER_REVISION, (uint8_t*)&mixerMatrix, EEPROM_ADR_MIXER_TABLE, sizeof(MixerMatrix_t))) { |
158 | if (readChecksummedBlock(EEMIXER_REVISION, (uint8_t*)&motorMixer, EEPROM_ADR_MIXER_TABLE, sizeof(MotorMixer_t))) { |
159 | printf("\n\rwriting default mixerMatrix"); |
159 | printf("\n\rwriting default motor mixer"); |
160 | mixerMatrix_default(); // Quadro |
160 | motorMixer_default(); // Quadro |
161 | mixerMatrix_writeToEEProm(); |
161 | motorMixer_writeToEEProm(); |
162 | } |
162 | } |
163 | // determine motornumber |
163 | // determine motornumber |
164 | requiredMotors = 0; |
164 | requiredMotors = 0; |
165 | for (uint8_t i=0; i<MAX_MOTORS; i++) { |
165 | for (uint8_t i=0; i<MAX_MOTORS; i++) { |
166 | if (mixerMatrix.motor[i][MIX_THROTTLE]) |
166 | if (motorMixer.matrix[i][MIX_THROTTLE]) |
Line 167... | Line 167... | ||
167 | requiredMotors++; |
167 | requiredMotors++; |
168 | } |
168 | } |
169 | 169 | ||
Line 170... | Line 170... | ||
170 | printf("\n\rMixer-Config: '%s' (%u Motors)",mixerMatrix.name, requiredMotors); |
170 | printf("\n\rMixer-Config: '%s' (%u Motors)", motorMixer.name, requiredMotors); |
171 | printf("\n\r==================================="); |
171 | printf("\n\r==================================="); |