mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Minor touch ups
This commit is contained in:
parent
853e830c6f
commit
1aaf2d9d47
4 changed files with 13 additions and 7 deletions
|
@ -470,7 +470,7 @@ void cmsMenuChange(displayPort_t *pDisplay, void *ptr)
|
||||||
|
|
||||||
void cmsMenuBack(displayPort_t *pDisplay)
|
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
|
// hack to save pid profile
|
||||||
if (currentMenu == &menuPid[0])
|
if (currentMenu == &menuPid[0])
|
||||||
cmsx_PidWriteback();
|
cmsx_PidWriteback();
|
||||||
|
|
|
@ -390,10 +390,6 @@ void osdInit(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CMS
|
|
||||||
cmsDeviceRegister(osdCmsInit);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sprintf(string_buffer, "BF VERSION: %s", FC_VERSION_STRING);
|
sprintf(string_buffer, "BF VERSION: %s", FC_VERSION_STRING);
|
||||||
max7456Write(5, 6, string_buffer);
|
max7456Write(5, 6, string_buffer);
|
||||||
max7456Write(7, 7, STARTUP_HELP_TEXT1);
|
max7456Write(7, 7, STARTUP_HELP_TEXT1);
|
||||||
|
@ -403,6 +399,10 @@ void osdInit(void)
|
||||||
max7456RefreshAll();
|
max7456RefreshAll();
|
||||||
|
|
||||||
refreshTimeout = 4 * REFRESH_1S;
|
refreshTimeout = 4 * REFRESH_1S;
|
||||||
|
|
||||||
|
#ifdef CMS
|
||||||
|
cmsDeviceRegister(osdCmsInit);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -637,6 +637,8 @@ void osdUpdate(uint32_t currentTime)
|
||||||
// OSD specific CMS functions
|
// OSD specific CMS functions
|
||||||
//
|
//
|
||||||
|
|
||||||
|
uint8_t shiftdown;
|
||||||
|
|
||||||
int osdMenuBegin(void)
|
int osdMenuBegin(void)
|
||||||
{
|
{
|
||||||
osdResetAlarms();
|
osdResetAlarms();
|
||||||
|
@ -662,7 +664,7 @@ int osdClearScreen(void)
|
||||||
|
|
||||||
int osdWrite(uint8_t x, uint8_t y, char *s)
|
int osdWrite(uint8_t x, uint8_t y, char *s)
|
||||||
{
|
{
|
||||||
max7456Write(x, y, s);
|
max7456Write(x, y + shiftdown, s);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -704,7 +706,8 @@ screenFnVTable_t osdVTable = {
|
||||||
|
|
||||||
void osdCmsInit(displayPort_t *pPort)
|
void osdCmsInit(displayPort_t *pPort)
|
||||||
{
|
{
|
||||||
pPort->rows = max7456GetRowsCount();
|
shiftdown = masterConfig.osdProfile.row_shiftdown;
|
||||||
|
pPort->rows = max7456GetRowsCount() - shiftdown;
|
||||||
pPort->cols = 30;
|
pPort->cols = 30;
|
||||||
pPort->buftime = 1; // Very fast
|
pPort->buftime = 1; // Very fast
|
||||||
pPort->bufsize = 50000; // Very large
|
pPort->bufsize = 50000; // Very large
|
||||||
|
|
|
@ -52,6 +52,8 @@ typedef struct {
|
||||||
uint16_t alt_alarm;
|
uint16_t alt_alarm;
|
||||||
|
|
||||||
uint8_t video_system;
|
uint8_t video_system;
|
||||||
|
uint8_t row_shiftdown;
|
||||||
|
|
||||||
osd_unit_t units;
|
osd_unit_t units;
|
||||||
} osd_profile_t;
|
} osd_profile_t;
|
||||||
|
|
||||||
|
|
|
@ -943,6 +943,7 @@ const clivalue_t valueTable[] = {
|
||||||
|
|
||||||
#ifdef OSD
|
#ifdef OSD
|
||||||
{ "osd_video_system", VAR_UINT8 | MASTER_VALUE, &masterConfig.osdProfile.video_system, .config.minmax = { 0, 2 } },
|
{ "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_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 } },
|
{ "osd_rssi_alarm", VAR_UINT8 | MASTER_VALUE, &masterConfig.osdProfile.rssi_alarm, .config.minmax = { 0, 100 } },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue