[Horus] Refactoring continued
This commit is contained in:
@@ -514,10 +514,10 @@ void menuTelemetryArduPilot1(uint8_t event)
|
||||
title ('1');
|
||||
lcd_puts (5*FW, 1*FH, PSTR(" Latitude")); // line 1 column 5
|
||||
// first buffer into line 2 column 2
|
||||
lcd_putsAtt (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcd_puts (5*FW, 4*FH, PSTR(" Longitude")); // line 4 column 5
|
||||
// second buffer into line 5 column 2
|
||||
lcd_putsAtt (1*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
lcdDrawText (1*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuTelemetryArduPilot2(uint8_t event)
|
||||
@@ -539,9 +539,9 @@ void menuTelemetryArduPilot2(uint8_t event)
|
||||
initval (1, PACK_POS, CRT);
|
||||
title ('2');
|
||||
lcd_puts (1*FW, 1*FH, PSTR(" Ground speed"));
|
||||
lcd_putsAtt (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcd_puts (1*FW, 4*FH, PSTR(" Climb rate") );
|
||||
lcd_putsAtt (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuTelemetryArduPilot3(uint8_t event)
|
||||
@@ -563,9 +563,9 @@ void menuTelemetryArduPilot3(uint8_t event)
|
||||
initval (1, PACK_POS, ALH);
|
||||
title ('3');
|
||||
lcd_puts (1*FW, 1*FH, PSTR(" Altitude"));
|
||||
lcd_putsAtt (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcd_puts (1*FW, 4*FH, PSTR(" Altitude Hold") );
|
||||
lcd_putsAtt (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuTelemetryArduPilot4(uint8_t event)
|
||||
@@ -587,9 +587,9 @@ void menuTelemetryArduPilot4(uint8_t event)
|
||||
initval (1, PACK_POS, BER);
|
||||
title ('4');
|
||||
lcd_puts (1*FW, 1*FH, PSTR(" Course"));
|
||||
lcd_putsAtt (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcd_puts (1*FW, 4*FH, PSTR(" Bearing"));
|
||||
lcd_putsAtt (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuTelemetryArduPilot5(uint8_t event)
|
||||
@@ -613,9 +613,9 @@ void menuTelemetryArduPilot5(uint8_t event)
|
||||
initval (1, PACK_POS, DST);
|
||||
title ('5');
|
||||
lcd_puts (1*FW, 1*FH, PSTR(" Way Point # "));
|
||||
lcd_putsAtt (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcd_puts (1*FW, 4*FH, PSTR(" Distance "));
|
||||
lcd_putsAtt (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuTelemetryArduPilot6(uint8_t event)
|
||||
@@ -639,9 +639,9 @@ void menuTelemetryArduPilot6(uint8_t event)
|
||||
initval (1, PACK_ATT, THH);
|
||||
title ('6');
|
||||
lcd_puts (1*FW, 1*FH, PSTR(" Air Speed "));
|
||||
lcd_putsAtt (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcd_puts (1*FW, 4*FH, PSTR(" Climb Rate "));
|
||||
lcd_putsAtt (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuTelemetryArduPilot7(uint8_t event)
|
||||
@@ -665,9 +665,9 @@ void menuTelemetryArduPilot7(uint8_t event)
|
||||
initval (1, PACK_ATT, PCH);
|
||||
title ('7');
|
||||
lcd_puts (1*FW, 1*FH, PSTR(" Roll Angle"));
|
||||
lcd_putsAtt (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcd_puts (1*FW, 4*FH, PSTR(" Pitch Angle"));
|
||||
lcd_putsAtt (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuTelemetryArduPilot8(uint8_t event)
|
||||
@@ -691,14 +691,14 @@ void menuTelemetryArduPilot8(uint8_t event)
|
||||
initval (1, PACK_WPC, WPC);
|
||||
title ('8');
|
||||
lcd_puts (1*FW, 1*FH, PSTR(" ArduPilot Mode"));
|
||||
lcd_putsAtt (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcd_puts (1*FW, 4*FH, PSTR(" RTL Distance"));
|
||||
lcd_putsAtt (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void title(char x)
|
||||
{
|
||||
lcd_putsAtt (0, 0, PSTR(" ARDU PILOT Mega ?/8 "), INVERS);
|
||||
lcdDrawText (0, 0, PSTR(" ARDU PILOT Mega ?/8 "), INVERS);
|
||||
lcdDrawChar(17*FW, 0*FH, x, INVERS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user