Subversion Repositories FlightCtrl

Rev

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

Rev 2531 Rev 2537
Line 1233... Line 1233...
1233
#define MD_CAL 2
1233
#define MD_CAL 2
1234
#define MD_SAV 3
1234
#define MD_SAV 3
1235
        static unsigned char mode=MD_OFF,cursor=MD_OFF;
1235
        static unsigned char mode=MD_OFF,cursor=MD_OFF;
Line 1236... Line 1236...
1236
 
1236
 
1237
        case 0: HoTT_printfxy(0,0,"ACC calibration");break;
1237
        case 0: HoTT_printfxy(0,0,"ACC calibration");break;
1238
        case 1: HoTT_printfxy(0,1,"       ACC  Stick");break;
1238
        case 1: HoTT_printfxy(0,2,"ACC:   N:%3i R:%3i ",NeutralAccX,NeutralAccY);
1239
    case 2: HoTT_printfxy(0,2,"Nick = %3i   %4i",NeutralAccX,ChannelNick);break;
1239
        case 2: HoTT_printfxy(0,3,"Stick:   (%i/%i)     ",ChannelNick,ChannelRoll);
-
 
1240
        case 3: if(ChannelNick || ChannelRoll)  HoTT_printfxy(7,3,"!!");
1240
    case 3: HoTT_printfxy(0,3,"Roll = %3i   %4i",NeutralAccY,ChannelRoll);break;
1241
                        break;
1241
        case 4: HoTT_printfxy(2,4,"Off");break;
1242
        case 4: HoTT_printfxy(2,4,"Off");break;
1242
    case 5: HoTT_printfxy(2,5,"Calibrate");break;
1243
    case 5: HoTT_printfxy(2,5,"Calibrate");break;
1243
        case 6: HoTT_printfxy(2,6,"Save");
1244
        case 6: HoTT_printfxy(2,6,"Save          ");
-
 
1245
                        if(mode == MD_SAV && cursor == MD_SAV)
-
 
1246
                         {
-
 
1247
                          HoTT_printfxy(7,6,"(SET)");
-
 
1248
                         }
-
 
1249
                        else if((mode == MD_CAL) && !((NC_GPS_ModeCharacter == ' ') || (NC_GPS_ModeCharacter == '/') || (NC_GPS_ModeCharacter == '-')))
-
 
1250
                         {
-
 
1251
                                HoTT_printfxy(2,6,"Swich GPS off!");   
1244
                        if(mode == MD_SAV && cursor == MD_SAV) HoTT_printfxy(7,6,"(SET)");
1252
                         }     
1245
                        break;
1253
                        break;
1246
    case 7:
1254
    case 7:
1247
    case 8: HoTT_printfxy(0,cursor+3,">");break;
1255
    case 8: HoTT_printfxy(0,cursor+3,">");break;
1248
    case 9: HoTT_printfxy(1,mode+3,"*");break;
1256
    case 9: HoTT_printfxy(1,mode+3,"*");break;
Line 1328... Line 1336...
1328
                                                        Hott_ClearLine(7);
1336
                                                        Hott_ClearLine(7);
1329
                                                        if(cursor == MD_SAV)
1337
                                                        if(cursor == MD_SAV)
1330
                                                        {
1338
                                                        {
1331
                                                                if(!MotorenEin)
1339
                                                                if(!MotorenEin)
1332
                                                                {
1340
                                                                {
1333
                                                                        SetParamWord(PID_ACC_NICK, (uint16_t)NeutralAccX);
-
 
1334
                                                                        SetParamWord(PID_ACC_ROLL, (uint16_t)NeutralAccY);
-
 
1335
                                                                        BoatNeutralNick = AdNeutralNick;
1341
/*                                                                      BoatNeutralNick = AdNeutralNick;
1336
                                                                        BoatNeutralRoll = AdNeutralRoll;
1342
                                                                        BoatNeutralRoll = AdNeutralRoll;
1337
                                                                        BoatNeutralGier = AdNeutralGier;
1343
                                                                        BoatNeutralGier = AdNeutralGier;
-
 
1344
                                                                        SetParamWord(PID_ACC_NICK, (uint16_t)NeutralAccX);
-
 
1345
                                                                        SetParamWord(PID_ACC_ROLL, (uint16_t)NeutralAccY);
1338
                                                                        SetParamWord(PID_GYRO_NICK,(uint16_t)BoatNeutralNick);
1346
                                                                        SetParamWord(PID_GYRO_NICK,(uint16_t)BoatNeutralNick);
1339
                                                                        SetParamWord(PID_GYRO_ROLL,(uint16_t)BoatNeutralRoll);
1347
                                                                        SetParamWord(PID_GYRO_ROLL,(uint16_t)BoatNeutralRoll);
1340
                                                                        SetParamWord(PID_GYRO_YAW,(uint16_t)BoatNeutralGier);
1348
                                                                        SetParamWord(PID_GYRO_YAW,(uint16_t)BoatNeutralGier);
-
 
1349
*/
-
 
1350
                                                                        StoreNeutralToEeprom();
1341
                                                                        HoTT_printfxy(7,6," okay ");
1351
                                                                        HoTT_printfxy(7,6," okay ");
1342
                                                                        HoTT_printfxy(1,mode+3," ");
1352
                                                                        HoTT_printfxy(1,mode+3," ");
1343
                                                                        mode = MD_OFF;
1353
                                                                        mode = MD_OFF;
1344
                                                                }
1354
                                                                }
1345
                                                                else
1355
                                                                else