Rev 2097 | Rev 2159 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2097 | Rev 2158 | ||
---|---|---|---|
Line 475... | Line 475... | ||
475 | } |
475 | } |
476 | motorTestActive = 255; |
476 | motorTestActive = 255; |
477 | externalControlActive = 255; |
477 | externalControlActive = 255; |
478 | break; |
478 | break; |
Line 479... | Line 479... | ||
479 | 479 | ||
- | 480 | case 'n':// Read motor mixer |
|
- | 481 | tempchar[0] = EEMIXER_REVISION; |
|
480 | case 'n':// "Get Mixer Table |
482 | tempchar[1] = sizeof(MotorMixer_t); |
481 | while (!txd_complete) |
483 | while (!txd_complete) |
482 | ; // wait for previous frame to be sent |
484 | ; // wait for previous frame to be sent |
483 | sendOutData('N', FC_ADDRESS, 1, (uint8_t *) &mixerMatrix, sizeof(mixerMatrix)); |
485 | sendOutData('N', FC_ADDRESS, 2, &tempchar, 2, (uint8_t *)&motorMixer, sizeof(motorMixer)); |
Line 484... | Line 486... | ||
484 | break; |
486 | break; |
485 | 487 | ||
486 | case 'm':// "Set Mixer Table |
488 | case 'm':// "Set Mixer Table |
487 | if (pRxData[0] == EEMIXER_REVISION) { |
489 | if (pRxData[0] == EEMIXER_REVISION && (pRxData[1] == sizeof(MotorMixer_t))) { |
488 | memcpy(&mixerMatrix, (uint8_t*) pRxData, sizeof(mixerMatrix)); |
490 | memcpy(&motorMixer, (uint8_t*)pRxData[2], sizeof(motorMixer)); |
489 | mixerMatrix_writeToEEProm(); |
491 | motorMixer_writeToEEProm(); |
490 | while (!txd_complete) |
492 | while (!txd_complete) |
491 | ; // wait for previous frame to be sent |
493 | ; // wait for previous frame to be sent |
492 | tempchar[0] = 1; |
494 | tempchar[0] = 1; |