Subversion Repositories FlightCtrl

Rev

Rev 2099 | Rev 2103 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2099 Rev 2102
Line 79... Line 79...
79
#endif
79
#endif
Line 80... Line 80...
80
 
80
 
81
// keep lables in flash to save 512 bytes of sram space
81
// keep lables in flash to save 512 bytes of sram space
82
const prog_uint8_t ANALOG_LABEL[32][16] = {
82
const prog_uint8_t ANALOG_LABEL[32][16] = {
83
                //1234567890123456
83
                //1234567890123456
84
                "AnglePitch      ", //0
84
                "Gyro P          ", //0
85
                "AngleRoll       ",
85
                "Gyro R          ",
86
                "AngleYaw        ",
86
                "Gyro Y          ",
87
                "GyroPitch       ",
87
                "Attitude P      ",
88
                "GyroRoll        ",
88
                "Attitude R      ",
89
                "GyroYaw         ", //5
89
                "Attitude Y      ", //5
90
                "PitchTerm       ",
90
                "Target P        ",
91
                "RollTerm        ",
91
                "Target R        ",
92
                "ThrottleTerm    ",
92
                "Target Y        ",
93
                "YawTerm         ",
93
                "Error P         ",
94
                "heightP         ", //10
94
                "Error R         ", //10
95
                "heightI         ",
95
                "Error Y         ",
96
        "heightD         ",
96
        "Term P          ",
97
                "gyroActivity    ",
97
                "Term R          ",
98
                "ca              ",
98
                "Term Y          ",
99
                "GActivityDivider", //15
99
                "FlightMode      ", //15
100
                "NaviMode        ",
100
                "RC P            ",
101
                "NaviStatus      ",
101
                "RC Thr          ",
102
        "NaviStickP      ",
102
        "ServoFinal P    ",
103
                "NaviStickR      ",
103
                "ServoFinal T    ",
104
                "control act wghd", //20
104
                "control act wghd", //20
105
                "acc vector wghd ",
105
                "acc vector wghd ",
106
                "Height[dm]      ",
106
                "Height[dm]      ",
107
                "dHeight         ",
107
                "dHeight         ",
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 (!(MKFlags & MKFLAG_MOTOR_RUN)) // save settings only if motors are off
486
          if (!isMotorRunning) // 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 (!(MKFlags & MKFLAG_MOTOR_RUN)) // save settings only if motors are off
523
                        if (!isMotorRunning) // 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));