Subversion Repositories FlightCtrl

Rev

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

Rev 1407 Rev 1419
Line 55... Line 55...
55
//           if(RemoteTasten & KEY4) TestInt++;
55
//           if(RemoteTasten & KEY4) TestInt++;
56
           break;
56
           break;
57
    case 1:
57
    case 1:
58
          if(EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)
58
          if(EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)
59
           {
59
           {
60
           LCD_printfxy(0,0,"Hoehe:     %5i",(int)(HoehenWert/5));
60
           LCD_printfxy(0,0,"Height:  %5i",(int)(HoehenWert/5));
61
           LCD_printfxy(0,1,"SollHoehe: %5i",(int)(SollHoehe/5));
61
           LCD_printfxy(0,1,"Setpoint:%5i",(int)(SollHoehe/5));
62
           LCD_printfxy(0,2,"Luftdruck: %5i",MessLuftdruck);
62
           LCD_printfxy(0,2,"Pressure:%5i",MessLuftdruck);
63
           LCD_printfxy(0,3,"Off      : %5i",OCR0A);
63
           LCD_printfxy(0,3,"Offset:  %5i",OCR0A);
64
           }
64
           }
65
           else
65
           else
66
           {
66
           {
-
 
67
           LCD_printfxy(0,0,"Height control");
67
           LCD_printfxy(0,1,"Keine ");
68
           LCD_printfxy(0,1,"DISABLED");
68
           LCD_printfxy(0,2,"Höhenregelung");
69
           LCD_printfxy(0,2,"Height control");
-
 
70
           LCD_printfxy(0,3,"DISABLED");
69
           }
71
           }
Line 70... Line 72...
70
 
72
 
71
           break;
73
           break;
72
    case 2:
74
    case 2:
73
           LCD_printfxy(0,0,"akt. Lage");
75
           LCD_printfxy(0,0,"act. bearing");
74
           LCD_printfxy(0,1,"Nick:      %5i",IntegralNick/1024);
76
           LCD_printfxy(0,1,"Nick:      %5i",IntegralNick/1024);
75
           LCD_printfxy(0,2,"Roll:      %5i",IntegralRoll/1024);
77
           LCD_printfxy(0,2,"Roll:      %5i",IntegralRoll/1024);
76
           LCD_printfxy(0,3,"Kompass:   %5i",KompassValue);
78
           LCD_printfxy(0,3,"Compass:   %5i",KompassValue);
77
           break;
79
           break;
78
    case 3:
80
    case 3:
79
           LCD_printfxy(0,0,"K1:%4i  K2:%4i ",PPM_in[1],PPM_in[2]);
81
           LCD_printfxy(0,0,"K1:%4i  K2:%4i ",PPM_in[1],PPM_in[2]);
80
           LCD_printfxy(0,1,"K3:%4i  K4:%4i ",PPM_in[3],PPM_in[4]);
82
           LCD_printfxy(0,1,"K3:%4i  K4:%4i ",PPM_in[3],PPM_in[4]);
Line 89... Line 91...
89
           break;
91
           break;
90
    case 5:
92
    case 5:
91
           LCD_printfxy(0,0,"Gyro - Sensor");
93
           LCD_printfxy(0,0,"Gyro - Sensor");
92
          if(PlatinenVersion == 10)
94
          if(PlatinenVersion == 10)
93
          {
95
          {
94
           LCD_printfxy(0,1,"Nick %4i (%3i.%i)",AdWertNick - AdNeutralNick/8, AdNeutralNick/8, AdNeutralNick%8);
96
           LCD_printfxy(0,1,"Nick%4i (%3i.%i)",AdWertNick - AdNeutralNick/8, AdNeutralNick/8, AdNeutralNick%8);
95
           LCD_printfxy(0,2,"Roll %4i (%3i.%i)",AdWertRoll - AdNeutralRoll/8, AdNeutralRoll/8, AdNeutralRoll%8);
97
           LCD_printfxy(0,2,"Roll%4i (%3i.%i)",AdWertRoll - AdNeutralRoll/8, AdNeutralRoll/8, AdNeutralRoll%8);
96
           LCD_printfxy(0,3,"Gier %4i (%3i)",AdNeutralGier - AdWertGier, AdNeutralGier);
98
           LCD_printfxy(0,3,"Gier%4i (%3i)",AdNeutralGier - AdWertGier, AdNeutralGier);
97
          }
99
          }
98
          else
100
          else
99
          if((PlatinenVersion == 11) || (PlatinenVersion == 20))
101
          if((PlatinenVersion == 11) || (PlatinenVersion == 20))
100
          {
102
          {
101
           LCD_printfxy(0,1,"Nick %4i (%3i.%x)",AdWertNick - AdNeutralNick/8, AdNeutralNick/16, (AdNeutralNick%16)/2);
103
           LCD_printfxy(0,1,"Nick %4i (%3i.%x)",AdWertNick - AdNeutralNick/8, AdNeutralNick/16, (AdNeutralNick%16)/2);
102
           LCD_printfxy(0,2,"Roll %4i (%3i.%x)",AdWertRoll - AdNeutralRoll/8, AdNeutralRoll/16, (AdNeutralRoll%16)/2);
104
           LCD_printfxy(0,2,"Roll %4i (%3i.%x)",AdWertRoll - AdNeutralRoll/8, AdNeutralRoll/16, (AdNeutralRoll%16)/2);
103
           LCD_printfxy(0,3,"Gier %4i (%3i)",AdNeutralGier - AdWertGier, AdNeutralGier/2);
105
           LCD_printfxy(0,3,"Yaw  %4i (%3i)",AdNeutralGier - AdWertGier, AdNeutralGier/2);
104
          }
106
          }
105
          else
107
          else
106
          if(PlatinenVersion == 13)
108
          if(PlatinenVersion == 13)
107
          {
109
          {
108
           LCD_printfxy(0,1,"Nick %4i (%3i)(%3i)",AdWertNick - AdNeutralNick/8, AdNeutralNick/16,AnalogOffsetNick);
110
           LCD_printfxy(0,1,"Nick %4i (%3i)(%3i)",AdWertNick - AdNeutralNick/8, AdNeutralNick/16,AnalogOffsetNick);
109
           LCD_printfxy(0,2,"Roll %4i (%3i)(%3i)",AdWertRoll - AdNeutralRoll/8, AdNeutralRoll/16,AnalogOffsetRoll);
111
           LCD_printfxy(0,2,"Roll %4i (%3i)(%3i)",AdWertRoll - AdNeutralRoll/8, AdNeutralRoll/16,AnalogOffsetRoll);
110
           LCD_printfxy(0,3,"Gier %4i (%3i)(%3i)",AdNeutralGier - AdWertGier, AdNeutralGier/2,AnalogOffsetGier);
112
           LCD_printfxy(0,3,"Yaw  %4i (%3i)(%3i)",AdNeutralGier - AdWertGier, AdNeutralGier/2,AnalogOffsetGier);
111
          }
113
          }
112
           break;
114
           break;
113
    case 6:
115
    case 6:
114
           LCD_printfxy(0,0,"ACC - Sensor");
116
           LCD_printfxy(0,0,"ACC - Sensor");
115
           LCD_printfxy(0,1,"Nick %4i (%3i)",AdWertAccNick,NeutralAccX);
117
           LCD_printfxy(0,1,"Nick %4i (%3i)",AdWertAccNick,NeutralAccX);
116
           LCD_printfxy(0,2,"Roll %4i (%3i)",AdWertAccRoll,NeutralAccY);
118
           LCD_printfxy(0,2,"Roll %4i (%3i)",AdWertAccRoll,NeutralAccY);
117
           LCD_printfxy(0,3,"Hoch %4i (%3i)",Mittelwert_AccHoch/*accumulate_AccHoch / messanzahl_AccHoch*/,(int)NeutralAccZ);
119
           LCD_printfxy(0,3,"Z    %4i (%3i)",Mittelwert_AccHoch/*accumulate_AccHoch / messanzahl_AccHoch*/,(int)NeutralAccZ);
118
           break;
120
           break;
119
    case 7:
121
    case 7:
120
           LCD_printfxy(0,1,"Voltage:   %5i",UBat);
122
           LCD_printfxy(0,0,"Volt. & receiver");
-
 
123
           LCD_printfxy(0,1,"UBat:   %5i.%1iV",UBat/10, UBat%10);
121
           LCD_printfxy(0,2,"RC-Level:  %5i",SenderOkay);
124
           LCD_printfxy(0,2,"RC-Level:  %5i",SenderOkay);
122
           LCD_printfxy(0,3,"RC-Channels:%4i",Channels-1);
125
           LCD_printfxy(0,3,"RC-Channels:%4i",Channels-1);
123
           break;
126
           break;
124
    case 8:
127
    case 8:
125
           LCD_printfxy(0,0,"Kompass       ");
128
           LCD_printfxy(0,0,"Compass");
126
           LCD_printfxy(0,1,"Richtung:  %5i",KompassRichtung);
129
           LCD_printfxy(0,1,"Heading:  %5i",KompassRichtung);
127
           LCD_printfxy(0,2,"Messwert:  %5i",KompassValue);
130
           LCD_printfxy(0,2,"Value:    %5i",KompassValue);
128
           LCD_printfxy(0,3,"Start:     %5i",KompassStartwert);
131
           LCD_printfxy(0,3,"Start:    %5i",KompassStartwert);
129
           break;
132
           break;
130
    case 9:
133
    case 9:
131
           LCD_printfxy(0,0,"Poti1:  %3i",Poti[0]);
134
           LCD_printfxy(0,0,"Poti1:  %3i",Poti[0]);
132
           LCD_printfxy(0,1,"Poti2:  %3i",Poti[1]);
135
           LCD_printfxy(0,1,"Poti2:  %3i",Poti[1]);
133
           LCD_printfxy(0,2,"Poti3:  %3i",Poti[2]);
136
           LCD_printfxy(0,2,"Poti3:  %3i",Poti[2]);
Line 140... Line 143...
140
           LCD_printfxy(0,3,"Poti8:  %3i",Poti[7]);
143
           LCD_printfxy(0,3,"Poti8:  %3i",Poti[7]);
141
           break;
144
           break;
142
    case 11:
145
    case 11:
143
           LCD_printfxy(0,0,"Servo  " );
146
           LCD_printfxy(0,0,"Servo  " );
144
           LCD_printfxy(0,1,"Setpoint  %3i",Parameter_ServoNickControl);
147
           LCD_printfxy(0,1,"Setpoint  %3i",Parameter_ServoNickControl);
145
           LCD_printfxy(0,2,"Stellung: %3i",ServoNickValue);
148
           LCD_printfxy(0,2,"Position: %3i",ServoNickValue);
146
           LCD_printfxy(0,3,"Range:%3i-%3i",EE_Parameter.ServoNickMin,EE_Parameter.ServoNickMax);
149
           LCD_printfxy(0,3,"Range:%3i-%3i",EE_Parameter.ServoNickMin,EE_Parameter.ServoNickMax);
147
           break;
150
           break;
148
    case 12:
151
    case 12:
149
           LCD_printfxy(0,0,"ExternControl  " );
152
           LCD_printfxy(0,0,"ExternControl  " );
150
           LCD_printfxy(0,1,"Ni:%4i  Ro:%4i ",ExternControl.Nick,ExternControl.Roll);
153
           LCD_printfxy(0,1,"Ni:%4i  Ro:%4i ",ExternControl.Nick,ExternControl.Roll);
151
           LCD_printfxy(0,2,"Gs:%4i  Gi:%4i ",ExternControl.Gas,ExternControl.Gier);
154
           LCD_printfxy(0,2,"Gs:%4i  Gi:%4i ",ExternControl.Gas,ExternControl.Gier);
152
           LCD_printfxy(0,3,"Hi:%4i  Cf:%4i ",ExternControl.Hight,ExternControl.Config);
155
           LCD_printfxy(0,3,"Hi:%4i  Cf:%4i ",ExternControl.Hight,ExternControl.Config);
153
           break;
156
           break;
154
    case 13:
157
    case 13:
155
           LCD_printfxy(0,0,"BL-Ctrl Errors " );
158
           LCD_printfxy(0,0,"BL-Ctrl Errors " );
156
           LCD_printfxy(0,1," %3d  %3d  %3d  %3d ",MotorError[0],MotorError[1],MotorError[2],MotorError[3]);
159
           LCD_printfxy(0,1,"%3d %3d %3d %3d ",MotorError[0],MotorError[1],MotorError[2],MotorError[3]);
157
           LCD_printfxy(0,2," %3d  %3d  %3d  %3d ",MotorError[4],MotorError[5],MotorError[6],MotorError[7]);
160
           LCD_printfxy(0,2,"%3d %3d %3d %3d ",MotorError[4],MotorError[5],MotorError[6],MotorError[7]);
158
           LCD_printfxy(0,3," %3d  %3d  %3d  %3d ",MotorError[8],MotorError[9],MotorError[10],MotorError[11]);
161
           LCD_printfxy(0,3,"%3d %3d %3d %3d ",MotorError[8],MotorError[9],MotorError[10],MotorError[11]);
159
           break;
162
           break;
160
    case 14:
163
    case 14:
161
           LCD_printfxy(0,0,"BL-Ctrl found " );
164
           LCD_printfxy(0,0,"BL-Ctrl found " );
162
           LCD_printfxy(0,1," %c   %c   %c   %c ",MotorPresent[0] + '-',MotorPresent[1] + '-',MotorPresent[2] + '-',MotorPresent[3] + '-');
165
           LCD_printfxy(0,1," %c   %c   %c   %c ",MotorPresent[0] + '-',MotorPresent[1] + '-',MotorPresent[2] + '-',MotorPresent[3] + '-');
163
           LCD_printfxy(0,2," %c   %c   %c   %c ",MotorPresent[4] + '-',MotorPresent[5] + '-',MotorPresent[6] + '-',MotorPresent[7] + '-');
166
           LCD_printfxy(0,2," %c   %c   %c   %c ",MotorPresent[4] + '-',MotorPresent[5] + '-',MotorPresent[6] + '-',MotorPresent[7] + '-');
Line 166... Line 169...
166
                   if(MotorPresent[10]) LCD_printfxy(8,3,"11");
169
                   if(MotorPresent[10]) LCD_printfxy(8,3,"11");
167
                   if(MotorPresent[11]) LCD_printfxy(12,3,"12");
170
                   if(MotorPresent[11]) LCD_printfxy(12,3,"12");
168
           break;
171
           break;
169
    case 15:
172
    case 15:
170
           LCD_printfxy(0,0,"Flight-Time  " );
173
           LCD_printfxy(0,0,"Flight-Time  " );
171
           LCD_printfxy(0,1,"      %5umin",FlugMinuten);
174
           LCD_printfxy(0,1,"Total:%5umin",FlugMinutenGesamt);
172
           LCD_printfxy(0,2,"Total:%5umin",FlugMinutenGesamt);
175
           LCD_printfxy(0,2,"Act:  %5umin",FlugMinuten);
173
           LCD_printfxy(13,3,"(reset)");
176
           LCD_printfxy(13,3,"(reset)");
174
                   if(RemoteKeys & KEY4)
177
                   if(RemoteKeys & KEY4)
175
             {
178
             {
176
               FlugMinuten = 0;
179
               FlugMinuten = 0;
177
               eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES2],FlugMinuten / 256);
180
               eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES2],FlugMinuten / 256);