kopia lustrzana https://github.com/OpenRTX/OpenRTX
Renamed MDx display, keyboard and spiFlash drivers to MD3x to adapt the changes made to meson.build also to MD-9600. Fixed missing API change in ui_main.
rodzic
c77aebebad
commit
cdaf3f38dd
27
meson.build
27
meson.build
|
@ -79,9 +79,6 @@ def = {'DONT_USE_CMSIS_INIT': ''}
|
|||
mdx_src = ['platform/drivers/ADC/ADC1_MDx.c',
|
||||
'platform/drivers/GPS/GPS_MDx.cpp',
|
||||
'platform/drivers/NVM/W25Qx.c',
|
||||
'platform/drivers/NVM/spiFlash_MDx.c',
|
||||
'platform/drivers/display/HX8353_MDx.cpp',
|
||||
'platform/drivers/keyboard/keyboard_MDx.c',
|
||||
'platform/drivers/tones/toneGenerator_MDx.cpp']
|
||||
|
||||
##
|
||||
|
@ -200,9 +197,12 @@ endif
|
|||
## TYT MD-3x0 family
|
||||
##
|
||||
md3x0_src = src + mdx_src + stm32f405_src + ['platform/drivers/NVM/nvmem_MD3x0.c',
|
||||
'platform/drivers/NVM/spiFlash_MD3x.c',
|
||||
'platform/drivers/baseband/SKY72310.c',
|
||||
'platform/drivers/baseband/radio_MD3x0.c',
|
||||
'platform/drivers/baseband/HR_C5000.c',
|
||||
'platform/drivers/keyboard/keyboard_MD3x.c',
|
||||
'platform/drivers/display/HX8353_MD3x.cpp',
|
||||
'platform/targets/MD-3x0/platform.c']
|
||||
|
||||
md3x0_inc = inc + stm32f405_inc + ['platform/targets/MD-3x0']
|
||||
|
@ -212,8 +212,11 @@ md3x0_def = def + stm32f405_def + {'PLATFORM_MD3x0': '', 'timegm': 'mktime'}
|
|||
## TYT MD-UV380
|
||||
##
|
||||
mduv3x0_src = src + mdx_src + stm32f405_src + ['platform/drivers/NVM/nvmem_MDUV3x0.c',
|
||||
'platform/drivers/baseband/radio_UV3x0.c',
|
||||
'platform/drivers/NVM/spiFlash_MD3x.c',
|
||||
'platform/targets/MD-UV3x0/platform.c',
|
||||
'platform/drivers/keyboard/keyboard_MD3x.c',
|
||||
'platform/drivers/display/HX8353_MD3x.cpp',
|
||||
'platform/drivers/baseband/radio_UV3x0.c',
|
||||
'platform/drivers/baseband/AT1846S_UV3x0.c',
|
||||
'platform/drivers/baseband/HR_C6000_UV3x0.c',
|
||||
'platform/drivers/baseband/interfaces_UV3x0.c']
|
||||
|
@ -224,16 +227,12 @@ mduv3x0_def = def + stm32f405_def + {'PLATFORM_MDUV3x0': '', 'timegm': 'mktime'}
|
|||
##
|
||||
## TYT MD-9600
|
||||
##
|
||||
md9600_src = src + stm32f405_src + ['platform/targets/MD-9600/platform.c',
|
||||
'platform/drivers/display/ST7567_MD9600.c',
|
||||
'platform/drivers/keyboard/keyboard_MD9600.c',
|
||||
'platform/drivers/tones/toneGenerator_MDx.c',
|
||||
'platform/drivers/NVM/nvmem_MD9600.c',
|
||||
'platform/drivers/baseband/radio_MD9600.c',
|
||||
'platform/drivers/NVM/W25Qx.c',
|
||||
'platform/drivers/ADC/ADC1_MDx.c',
|
||||
'platform/drivers/GPS/GPS_MDx.cpp',
|
||||
'platform/drivers/NVM/spiFlash_MD9600.c']
|
||||
md9600_src = src + mdx_src + stm32f405_src + ['platform/targets/MD-9600/platform.c',
|
||||
'platform/drivers/display/ST7567_MD9600.c',
|
||||
'platform/drivers/keyboard/keyboard_MD9600.c',
|
||||
'platform/drivers/baseband/radio_MD9600.c',
|
||||
'platform/drivers/NVM/nvmem_MD9600.c',
|
||||
'platform/drivers/NVM/spiFlash_MD9600.c']
|
||||
|
||||
md9600_inc = inc + stm32f405_inc + ['platform/targets/MD-9600']
|
||||
md9600_def = def + stm32f405_def + {'PLATFORM_MD9600': ''}
|
||||
|
|
|
@ -41,9 +41,8 @@ void _ui_drawMainTop()
|
|||
#endif
|
||||
// If the radio has no built-in battery, print input voltage
|
||||
#ifdef BAT_NONE
|
||||
char volt_buf[6] = "";
|
||||
snprintf(volt_buf, sizeof(volt_buf), "%.1fV", last_state.v_bat);
|
||||
gfx_print(layout.top_pos, volt_buf, layout.top_font, TEXT_ALIGN_RIGHT, color_white);
|
||||
gfx_print(layout.top_pos, layout.top_font, TEXT_ALIGN_RIGHT,
|
||||
color_white,"%.1fV", last_state.v_bat);
|
||||
#else
|
||||
// Otherwise print battery icon on top bar, use 4 px padding
|
||||
uint16_t bat_width = SCREEN_WIDTH / 9;
|
||||
|
@ -56,11 +55,11 @@ void _ui_drawMainTop()
|
|||
switch(last_state.channel.mode)
|
||||
{
|
||||
case FM:
|
||||
gfx_print(layout.top_pos, layout.top_font, TEXT_ALIGN_LEFT,
|
||||
gfx_print(layout.top_pos, layout.top_font, TEXT_ALIGN_LEFT,
|
||||
color_white, "FM");
|
||||
break;
|
||||
case DMR:
|
||||
gfx_print(layout.top_pos, layout.top_font, TEXT_ALIGN_LEFT,
|
||||
gfx_print(layout.top_pos, layout.top_font, TEXT_ALIGN_LEFT,
|
||||
color_white, "DMR");
|
||||
break;
|
||||
}
|
||||
|
@ -70,21 +69,21 @@ void _ui_drawZoneChannel()
|
|||
{
|
||||
// Print Zone name
|
||||
if(!last_state.zone_enabled)
|
||||
gfx_print(layout.line1_pos, layout.line1_font, TEXT_ALIGN_LEFT,
|
||||
gfx_print(layout.line1_pos, layout.line1_font, TEXT_ALIGN_LEFT,
|
||||
color_white, "zone: All channels");
|
||||
else
|
||||
gfx_print(layout.line1_pos, layout.line1_font, TEXT_ALIGN_LEFT,
|
||||
gfx_print(layout.line1_pos, layout.line1_font, TEXT_ALIGN_LEFT,
|
||||
color_white, "zone: %.13s", last_state.zone.name);
|
||||
// Print Channel name
|
||||
gfx_print(layout.line2_pos, layout.line2_font, TEXT_ALIGN_LEFT,
|
||||
color_white, " %03d: %.12s",
|
||||
gfx_print(layout.line2_pos, layout.line2_font, TEXT_ALIGN_LEFT,
|
||||
color_white, " %03d: %.12s",
|
||||
last_state.channel_index, last_state.channel.name);
|
||||
}
|
||||
|
||||
void _ui_drawFrequency()
|
||||
{
|
||||
// Print big numbers frequency
|
||||
gfx_print(layout.line3_pos, layout.line3_font, TEXT_ALIGN_CENTER,
|
||||
gfx_print(layout.line3_pos, layout.line3_font, TEXT_ALIGN_CENTER,
|
||||
color_white, "%03lu.%05lu",
|
||||
(unsigned long)last_state.channel.rx_frequency/1000000,
|
||||
(unsigned long)last_state.channel.rx_frequency%1000000/10);
|
||||
|
|
Ładowanie…
Reference in New Issue