mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
some graphic fixes and ntsc defines
This commit is contained in:
parent
d8753b3815
commit
7f1e392e83
@ -2121,25 +2121,25 @@ void updateGraphics() {
|
||||
|
||||
/* Print Number of detected video Lines */
|
||||
sprintf(temp,"Lines:%4d",PIOS_Video_GetOSDLines());
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 2)),APPLY_VDEADBAND(5), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 8)),APPLY_VDEADBAND(5), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
|
||||
/* Print ADC voltage */
|
||||
//sprintf(temp,"Rssi:%4dV",(int)(PIOS_ADC_PinGet(4)*3000/4096));
|
||||
//write_string(temp, (GRAPHICS_WIDTH_REAL - 2),15, 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
sprintf(temp,"Rssi:%4.2fV",(PIOS_ADC_PinGet(4)*3.0f/4096.0f));
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 2)),APPLY_VDEADBAND(15), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 8)),APPLY_VDEADBAND(15), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
|
||||
/* Print CPU temperature */
|
||||
sprintf(temp,"Temp:%4.2fC",(PIOS_ADC_PinGet(6)*0.29296875f-264));
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 2)),APPLY_VDEADBAND(25), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 8)),APPLY_VDEADBAND(25), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
|
||||
/* Print ADC voltage FLIGHT*/
|
||||
sprintf(temp,"FltV:%4.2fV",(PIOS_ADC_PinGet(2)*3.0f*6.1f/4096.0f));
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 2)),APPLY_VDEADBAND(35), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 8)),APPLY_VDEADBAND(35), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
|
||||
/* Print ADC voltage VIDEO*/
|
||||
sprintf(temp,"VidV:%4.2fV",(PIOS_ADC_PinGet(3)*3.0f*6.1f/4096.0f));
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 2)),APPLY_VDEADBAND(45), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
write_string(temp, APPLY_HDEADBAND((GRAPHICS_RIGHT - 8)),APPLY_VDEADBAND(45), 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
|
||||
|
||||
/* Print ADC voltage RSSI */
|
||||
//sprintf(temp,"Curr:%4dA",(int)(PIOS_ADC_PinGet(0)*300*61/4096));
|
||||
|
@ -76,9 +76,16 @@ extern void PIOS_Vsync_ISR();
|
||||
#define GRAPHICS_HDEADBAND 32
|
||||
#define GRAPHICS_VDEADBAND 0
|
||||
|
||||
#define PAL
|
||||
|
||||
// Real OSD size
|
||||
#define GRAPHICS_WIDTH_REAL (336+GRAPHICS_HDEADBAND)
|
||||
#define GRAPHICS_HEIGHT_REAL (270+GRAPHICS_VDEADBAND)
|
||||
#ifdef PAL
|
||||
#define GRAPHICS_WIDTH_REAL (336+GRAPHICS_HDEADBAND)
|
||||
#define GRAPHICS_HEIGHT_REAL (270+GRAPHICS_VDEADBAND)
|
||||
#else
|
||||
#define GRAPHICS_WIDTH_REAL (320+GRAPHICS_HDEADBAND)
|
||||
#define GRAPHICS_HEIGHT_REAL (225+GRAPHICS_VDEADBAND)
|
||||
#endif
|
||||
|
||||
//draw area
|
||||
#define GRAPHICS_TOP 0
|
||||
|
Loading…
Reference in New Issue
Block a user