8,10 → 8,10 |
#include "main.h" |
#include "eeprom.h" |
|
char DisplayBuff[80] = "Hello World"; |
char DisplayBuff[80]; |
unsigned char DispPtr = 0; |
|
unsigned char MaxMenue = 17; |
unsigned char MaxMenue = 16; |
unsigned char MenuePunkt = 0; |
unsigned char RemoteKeys = 0; |
|
34,6 → 34,7 |
|
void Menu(void) |
{ |
char i; |
if(RemoteKeys & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue;} |
if(RemoteKeys & KEY2) { if(MenuePunkt == MaxMenue) MenuePunkt = 0; else MenuePunkt++;} |
if((RemoteKeys & KEY1) && (RemoteKeys & KEY2)) MenuePunkt = 0; |
81,10 → 82,7 |
LCD_printfxy(0,3,"Compass: %5i",KompassValue); |
break; |
case 3: |
LCD_printfxy(0,0,"K1:%4i K2:%4i ",PPM_in[1],PPM_in[2]); |
LCD_printfxy(0,1,"K3:%4i K4:%4i ",PPM_in[3],PPM_in[4]); |
LCD_printfxy(0,2,"K5:%4i K6:%4i ",PPM_in[5],PPM_in[6]); |
LCD_printfxy(0,3,"K7:%4i K8:%4i ",PPM_in[7],PPM_in[8]); |
for(i=0;i<8;i+=2) LCD_printfxy(0,i/2,"K%i:%4i K%i:%4i ",i,PPM_in[1],i+1,PPM_in[2]); |
break; |
case 4: |
LCD_printfxy(0,0,"Ni:%4i Ro:%4i ",PPM_in[EE_Parameter.Kanalbelegung[K_NICK]],PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]]); |
140,16 → 138,10 |
LCD_printfxy(0,3,"Soll: %5i",KompassSollWert); |
break; |
case 10: |
LCD_printfxy(0,0,"Poti1: %3i",Poti[0]); |
LCD_printfxy(0,1,"Poti2: %3i",Poti[1]); |
LCD_printfxy(0,2,"Poti3: %3i",Poti[2]); |
LCD_printfxy(0,3,"Poti4: %3i",Poti[3]); |
for(i=0;i<4;i++) LCD_printfxy(0,i,"Poti%i: %3i",i+1,Poti[i]); |
break; |
case 11: |
LCD_printfxy(0,0,"Poti5: %3i",Poti[4]); |
LCD_printfxy(0,1,"Poti6: %3i",Poti[5]); |
LCD_printfxy(0,2,"Poti7: %3i",Poti[6]); |
LCD_printfxy(0,3,"Poti8: %3i",Poti[7]); |
for(i=0;i<4;i++) LCD_printfxy(0,i,"Poti%i: %3i",i+5,Poti[i+4]); |
break; |
case 12: |
LCD_printfxy(0,0,"Servo " ); |
157,25 → 149,24 |
LCD_printfxy(0,2,"Position: %3i",ServoNickValue/4); |
LCD_printfxy(0,3,"Range:%3i-%3i",EE_Parameter.ServoNickMin,EE_Parameter.ServoNickMax); |
break; |
case 13: |
/* case 13: |
LCD_printfxy(0,0,"ExternControl " ); |
LCD_printfxy(0,1,"Ni:%4i Ro:%4i ",ExternControl.Nick,ExternControl.Roll); |
LCD_printfxy(0,2,"Gs:%4i Gi:%4i ",ExternControl.Gas,ExternControl.Gier); |
LCD_printfxy(0,3,"Hi:%4i Cf:%4i ",ExternControl.Hight,ExternControl.Config); |
break; |
case 14: |
*/ |
case 13: |
LCD_printfxy(0,0,"BL-Ctrl Errors " ); |
LCD_printfxy(0,1,"%3d %3d %3d %3d ",Motor[0].State & MOTOR_STATE_ERROR_MASK,Motor[1].State & MOTOR_STATE_ERROR_MASK,Motor[2].State & MOTOR_STATE_ERROR_MASK,Motor[3].State & MOTOR_STATE_ERROR_MASK); |
LCD_printfxy(0,2,"%3d %3d %3d %3d ",Motor[4].State & MOTOR_STATE_ERROR_MASK,Motor[5].State & MOTOR_STATE_ERROR_MASK,Motor[6].State & MOTOR_STATE_ERROR_MASK,Motor[7].State & MOTOR_STATE_ERROR_MASK); |
LCD_printfxy(0,3,"%3d %3d %3d %3d ",Motor[8].State & MOTOR_STATE_ERROR_MASK,Motor[9].State & MOTOR_STATE_ERROR_MASK,Motor[10].State & MOTOR_STATE_ERROR_MASK,Motor[11].State & MOTOR_STATE_ERROR_MASK); |
for(i=1;i<4;i++) |
LCD_printfxy(0,i,"%3d %3d %3d %3d ",Motor[i*4].State & MOTOR_STATE_ERROR_MASK,Motor[i*4+1].State & MOTOR_STATE_ERROR_MASK,Motor[i*4+2].State & MOTOR_STATE_ERROR_MASK,Motor[i*4+3].State & MOTOR_STATE_ERROR_MASK); |
break; |
case 15: |
case 14: |
LCD_printfxy(0,0,"BL Temperature" ); |
LCD_printfxy(0,1,"%3i %3i %3i %3i ",Motor[0].Temperature,Motor[1].Temperature,Motor[2].Temperature,Motor[3].Temperature); |
LCD_printfxy(0,2,"%3i %3i %3i %3i ",Motor[4].Temperature,Motor[5].Temperature,Motor[6].Temperature,Motor[7].Temperature); |
LCD_printfxy(0,3,"%3i %3i %3i %3i ",Motor[8].Temperature,Motor[9].Temperature,Motor[10].Temperature,Motor[11].Temperature); |
for(i=1;i<4;i++) |
LCD_printfxy(0,i,"%3d %3d %3d %3d ",Motor[i*4].Temperature,Motor[i*4+1].Temperature,Motor[i*4+2].Temperature,Motor[i*4+3].Temperature); |
break; |
case 16: |
case 15: |
LCD_printfxy(0,0,"BL-Ctrl found " ); |
LCD_printfxy(0,1," %c %c %c %c ",'-' + 4 * (Motor[0].State>>7),'-' + 5 * (Motor[1].State>>7),'-' + 6 * (Motor[2].State>>7),'-' + 7 * (Motor[3].State>>7)); |
LCD_printfxy(0,2," %c %c %c %c ",'-' + 8 * (Motor[4].State>>7),'-' + 9 * (Motor[5].State>>7),'-' + 10 * (Motor[6].State>>7),'-' + 11 * (Motor[7].State>>7)); |
184,7 → 175,7 |
if(Motor[10].State>>7) LCD_printfxy(8,3,"11"); |
if(Motor[11].State>>7) LCD_printfxy(12,3,"12"); |
break; |
case 17: |
case 16: |
LCD_printfxy(0,0,"Flight-Time " ); |
LCD_printfxy(0,1,"Total:%5umin",FlugMinutenGesamt); |
LCD_printfxy(0,2,"Act: %5umin",FlugMinuten); |