Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1741 → Rev 1742

/branches/MartinW_Jeti+/jetimenu.c
97,18 → 97,21
//1
void Menu_Current(uint8_t key)
{ //0123456789ABCDEF
JetiBox_printfxy(0,0,"%3i %3i %3i %3i", Motor[0].Current-12, Motor[1].Current-12, Motor[2].Current-12, Motor[3].Current-12);
JetiBox_printfxy(0,1,"%3i %3i %3i %3i", Motor[4].Current-12, Motor[5].Current-12, Motor[6].Current-12, Motor[7].Current-12);
if(RequiredMotors <= 4)
{
JetiBox_printfxy(0,1,"Currents ");
}
else
if(RequiredMotors <= 6)
{
JetiBox_printfxy(8,1,"%3i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10);
}
 
JetiBox_printfxy(0,0,"%3i %3i %3i %3i", Motor[0].Current-12, Motor[1].Current-12, Motor[2].Current-12, Motor[3].Current-12);
JetiBox_printfxy(0,1,"%3i %3i %3i %3i", Motor[4].Current-12, Motor[5].Current-12, Motor[6].Current-12, Motor[7].Current-12);
if(RequiredMotors <= 4)
{
JetiBox_printfxy(0,1,"Currents ");
}
else
if(RequiredMotors <= 6)
{
JetiBox_printfxy(8,1,"%3i.%1iA ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10);
}
 
}
//1
//1
168,13 → 171,29
if(key== JETIBOX_KEY_UP) PPM_in[14] = PPM_in[14]+5;
if(key== JETIBOX_KEY_DOWN) PPM_in[14] = PPM_in[14]-5;
}
void Menu_hoeheD(uint8_t key)
{ //0123456789ABCDEF
 
JetiBox_printfxy(0,0,">%3i=HD",EE_Parameter.Luftdruck_D);
JetiBox_printfxy(0,1," %3i=HP",EE_Parameter.Hoehe_P);
if(key== JETIBOX_KEY_UP) EE_Parameter.Luftdruck_D = EE_Parameter.Luftdruck_D+1;
if(key== JETIBOX_KEY_DOWN) EE_Parameter.Luftdruck_D = EE_Parameter.Luftdruck_D-1;
}
void Menu_hoeheP(uint8_t key)
{ //0123456789ABCDEF
 
JetiBox_printfxy(0,0," %3i=HD",EE_Parameter.Luftdruck_D);
JetiBox_printfxy(0,1,">%3i=HP",EE_Parameter.Hoehe_P);
if(key== JETIBOX_KEY_UP) EE_Parameter.Hoehe_P = EE_Parameter.Hoehe_P+1;
if(key== JETIBOX_KEY_DOWN) EE_Parameter.Hoehe_P = EE_Parameter.Hoehe_P-1;
}
//#define JETIBOX_KEY_UP 0x2F
//#define JETIBOX_KEY_DOWN 0x4F
//unsigned char Parameter_Luftdruck_D = 48; // Wert : 0-250
//unsigned char Parameter_Hoehe_P = 16; // Wert : 0-32
//CHK_POTI_MM(Parameter_Luftdruck_D,EE_Parameter.Luftdruck_D,0,100);
//CHK_POTI_MM(Parameter_Hoehe_P,EE_Parameter.Hoehe_P,0,100);
//1
 
 
 
// -----------------------------------------------------------
// the menu topology
// -----------------------------------------------------------
198,7 → 217,7
 
const MENU_ENTRY JetiBox_Menu[] PROGMEM=
{ // l r u d pHandler links rechts up down
{9, 1, 0, 0, &Menu_Status }, // 0 ///
{11, 1, 0, 0, &Menu_Status }, // 0 ///
{0, 2, 1, 1, &Menu_Temperature }, // 1
{1, 3, 2, 2, &Menu_Battery }, // 2
{2, 4, 3, 3, &Menu_PosInfo }, // 3
208,10 → 227,10
{5, 7, 6, 6, &Menu_Integal }, // 6 ///
{6, 8, 7, 7, &Menu_Info }, // 7 ///
{7, 9, 8, 8, &Menu_spoti1 }, // 8 ///
{8, 0, 9, 9, &Menu_spoti2 }, // 9 ///
 
{8, 10, 9, 9, &Menu_spoti2 }, // 9 ///
{9, 11, 10, 10, &Menu_hoeheD }, // 10 ///
{10, 0, 11, 11, &Menu_hoeheP }, // 11 ///
//1
};
 
233,16 → 252,10
case JETIBOX_KEY_RIGHT:
item = pgm_read_byte(&JetiBox_Menu[item].right); //trigger to right menu item
break;
case JETIBOX_KEY_UP:
jetivalue1=jetivalue1+5;
case JETIBOX_KEY_UP:
item = pgm_read_byte(&JetiBox_Menu[item].up); //trigger to up menu item
break;
case JETIBOX_KEY_DOWN:
jetivalue1=jetivalue1-5;
item = pgm_read_byte(&JetiBox_Menu[item].down); //trigger to down menu item
break;
default: