Rev 2103 | Rev 2109 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2103 | Rev 2108 | ||
---|---|---|---|
Line 481... | Line 481... | ||
481 | ; // wait for previous frame to be sent |
481 | ; // wait for previous frame to be sent |
482 | sendOutData('I', FC_ADDRESS, 2, &tempchar, 2, (uint8_t *) &IMUConfig, sizeof(IMUConfig)); |
482 | sendOutData('I', FC_ADDRESS, 2, &tempchar, 2, (uint8_t *) &IMUConfig, sizeof(IMUConfig)); |
483 | break; |
483 | break; |
Line 484... | Line 484... | ||
484 | 484 | ||
485 | case 'j':// Save IMU configuration |
485 | case 'j':// Save IMU configuration |
486 | if (!isMotorRunning) // save settings only if motors are off |
486 | if (!isFlying) // save settings only if motors are off |
487 | { |
487 | { |
488 | if ((pRxData[0] == IMUCONFIG_REVISION) && (pRxData[1] == sizeof(IMUConfig))) { |
488 | if ((pRxData[0] == IMUCONFIG_REVISION) && (pRxData[1] == sizeof(IMUConfig))) { |
489 | memcpy(&IMUConfig, (uint8_t*) &pRxData[2], sizeof(IMUConfig)); |
489 | memcpy(&IMUConfig, (uint8_t*) &pRxData[2], sizeof(IMUConfig)); |
490 | IMUConfig_writeToEEprom(); |
490 | IMUConfig_writeToEEprom(); |
Line 518... | Line 518... | ||
518 | ; // wait for previous frame to be sent |
518 | ; // wait for previous frame to be sent |
519 | sendOutData('Q', FC_ADDRESS, 2, &tempchar, 3, (uint8_t *) &staticParams, sizeof(staticParams)); |
519 | sendOutData('Q', FC_ADDRESS, 2, &tempchar, 3, (uint8_t *) &staticParams, sizeof(staticParams)); |
520 | break; |
520 | break; |
Line 521... | Line 521... | ||
521 | 521 | ||
522 | case 's': // save settings |
522 | case 's': // save settings |
523 | if (!isMotorRunning) // save settings only if motors are off |
523 | if (!isFlying) // save settings only if motors are off |
524 | { |
524 | { |
525 | if ((pRxData[1] == EEPARAM_REVISION) && (pRxData[2] == sizeof(staticParams))) // check for setting to be in range and version of settings |
525 | if ((pRxData[1] == EEPARAM_REVISION) && (pRxData[2] == sizeof(staticParams))) // check for setting to be in range and version of settings |
526 | { |
526 | { |
527 | memcpy(&staticParams, (uint8_t*) &pRxData[3], sizeof(staticParams)); |
527 | memcpy(&staticParams, (uint8_t*) &pRxData[3], sizeof(staticParams)); |