Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2097 → Rev 2158

/branches/dongfang_FC_rewrite/uart0.c
477,16 → 477,18
externalControlActive = 255;
break;
 
case 'n':// "Get Mixer Table
while (!txd_complete)
; // wait for previous frame to be sent
sendOutData('N', FC_ADDRESS, 1, (uint8_t *) &mixerMatrix, sizeof(mixerMatrix));
case 'n':// Read motor mixer
tempchar[0] = EEMIXER_REVISION;
tempchar[1] = sizeof(MotorMixer_t);
while (!txd_complete)
; // wait for previous frame to be sent
sendOutData('N', FC_ADDRESS, 2, &tempchar, 2, (uint8_t *)&motorMixer, sizeof(motorMixer));
break;
 
case 'm':// "Set Mixer Table
if (pRxData[0] == EEMIXER_REVISION) {
memcpy(&mixerMatrix, (uint8_t*) pRxData, sizeof(mixerMatrix));
mixerMatrix_writeToEEProm();
if (pRxData[0] == EEMIXER_REVISION && (pRxData[1] == sizeof(MotorMixer_t))) {
memcpy(&motorMixer, (uint8_t*)pRxData[2], sizeof(motorMixer));
motorMixer_writeToEEProm();
while (!txd_complete)
; // wait for previous frame to be sent
tempchar[0] = 1;