1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Minor touch ups

This commit is contained in:
jflyper 2016-10-29 13:40:27 +09:00
parent 853e830c6f
commit 1aaf2d9d47
4 changed files with 13 additions and 7 deletions

View file

@ -470,7 +470,7 @@ void cmsMenuChange(displayPort_t *pDisplay, void *ptr)
void cmsMenuBack(displayPort_t *pDisplay)
{
// becasue pids and rates meybe stored in profiles we need some thicks to manipulate it
// becasue pids and rates may be stored in profiles we need some thicks to manipulate it
// hack to save pid profile
if (currentMenu == &menuPid[0])
cmsx_PidWriteback();

View file

@ -390,10 +390,6 @@ void osdInit(void)
}
}
#ifdef CMS
cmsDeviceRegister(osdCmsInit);
#endif
sprintf(string_buffer, "BF VERSION: %s", FC_VERSION_STRING);
max7456Write(5, 6, string_buffer);
max7456Write(7, 7, STARTUP_HELP_TEXT1);
@ -403,6 +399,10 @@ void osdInit(void)
max7456RefreshAll();
refreshTimeout = 4 * REFRESH_1S;
#ifdef CMS
cmsDeviceRegister(osdCmsInit);
#endif
}
/**
@ -637,6 +637,8 @@ void osdUpdate(uint32_t currentTime)
// OSD specific CMS functions
//
uint8_t shiftdown;
int osdMenuBegin(void)
{
osdResetAlarms();
@ -662,7 +664,7 @@ int osdClearScreen(void)
int osdWrite(uint8_t x, uint8_t y, char *s)
{
max7456Write(x, y, s);
max7456Write(x, y + shiftdown, s);
return 0;
}
@ -704,7 +706,8 @@ screenFnVTable_t osdVTable = {
void osdCmsInit(displayPort_t *pPort)
{
pPort->rows = max7456GetRowsCount();
shiftdown = masterConfig.osdProfile.row_shiftdown;
pPort->rows = max7456GetRowsCount() - shiftdown;
pPort->cols = 30;
pPort->buftime = 1; // Very fast
pPort->bufsize = 50000; // Very large

View file

@ -52,6 +52,8 @@ typedef struct {
uint16_t alt_alarm;
uint8_t video_system;
uint8_t row_shiftdown;
osd_unit_t units;
} osd_profile_t;

View file

@ -943,6 +943,7 @@ const clivalue_t valueTable[] = {
#ifdef OSD
{ "osd_video_system", VAR_UINT8 | MASTER_VALUE, &masterConfig.osdProfile.video_system, .config.minmax = { 0, 2 } },
{ "osd_row_shiftdown", VAR_UINT8 | MASTER_VALUE, &masterConfig.osdProfile.row_shiftdown, .config.minmax = { 0, 1 } },
{ "osd_units", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.osdProfile.units, .config.lookup = { TABLE_UNIT } },
{ "osd_rssi_alarm", VAR_UINT8 | MASTER_VALUE, &masterConfig.osdProfile.rssi_alarm, .config.minmax = { 0, 100 } },