From 0978a0e500e57eae8fc847beb7d4fe6851aa94c5 Mon Sep 17 00:00:00 2001 From: 3djc <3djc@gh.com> Date: Thu, 16 May 2024 14:51:38 +0200 Subject: [PATCH 1/2] feat: add 480x320 support --- src/SCRIPTS/BF/TEMPLATES/480x320.lua | 7 ++++++ src/SCRIPTS/BF/radios.lua | 32 ++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 src/SCRIPTS/BF/TEMPLATES/480x320.lua diff --git a/src/SCRIPTS/BF/TEMPLATES/480x320.lua b/src/SCRIPTS/BF/TEMPLATES/480x320.lua new file mode 100644 index 0000000..cf01908 --- /dev/null +++ b/src/SCRIPTS/BF/TEMPLATES/480x320.lua @@ -0,0 +1,7 @@ +return { + margin = 5, + indent = 15, + lineSpacing = 22, + listSpacing = { line = 20, field = 170 }, + tableSpacing = { row = 25, col = 60, header = 20 }, +} diff --git a/src/SCRIPTS/BF/radios.lua b/src/SCRIPTS/BF/radios.lua index 13eecaa..2e7abf2 100644 --- a/src/SCRIPTS/BF/radios.lua +++ b/src/SCRIPTS/BF/radios.lua @@ -109,7 +109,35 @@ local supportedRadios = } }, }, - ["320x480"] = + ["480x320"] = + { + msp = { + template = "TEMPLATES/480x320.lua", + highRes = true, + MenuBox = { x=120, y=100, w=200, x_offset=68, h_line=20, h_offset=6 }, + SaveBox = { x=120, y=100, w=180, x_offset=12, h=60, h_offset=12 }, + NoTelem = { 192, LCD_H - 28, "No Telemetry", (TEXT_COLOR or 0) + INVERS + BLINK }, + textSize = 0, + yMinLimit = 35, + yMaxLimit = 280, + }, + cms = { + rows = 9, + cols = 32, + pixelsPerRow = 24, + pixelsPerChar = 14, + xIndent = 14, + yOffset = 32, + textSize = MIDSIZE, + refresh = { + event = EVT_VIRTUAL_ENTER, + text = "Refresh: [ENT]", + top = 1, + left = 300, + } + }, + }, + ["320x480"] = { msp = { template = "TEMPLATES/320x480.lua", @@ -128,4 +156,4 @@ local supportedRadios = local resolution = LCD_W.."x"..LCD_H local radio = assert(supportedRadios[resolution], resolution.." not supported") -return radio +return radio \ No newline at end of file From a999c65d5c10c5d5a0e12517a87953c8e13682c7 Mon Sep 17 00:00:00 2001 From: 3djc <3djc@gh.com> Date: Thu, 16 May 2024 15:22:46 +0200 Subject: [PATCH 2/2] chore:EOF line --- src/SCRIPTS/BF/radios.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SCRIPTS/BF/radios.lua b/src/SCRIPTS/BF/radios.lua index 2e7abf2..b6d5e22 100644 --- a/src/SCRIPTS/BF/radios.lua +++ b/src/SCRIPTS/BF/radios.lua @@ -156,4 +156,4 @@ local supportedRadios = local resolution = LCD_W.."x"..LCD_H local radio = assert(supportedRadios[resolution], resolution.." not supported") -return radio \ No newline at end of file +return radio