From 70aa398b577b773f511140af2398a43e6927bf92 Mon Sep 17 00:00:00 2001 From: philmoz Date: Mon, 7 Oct 2024 09:43:42 +1100 Subject: [PATCH] Replace deprecated 'Bitmap'. --- .../c320x480/SCRIPTS/WIZARD/glider/wizard.lua | 26 ++++++++--------- .../c320x480/SCRIPTS/WIZARD/plane/wizard.lua | 26 ++++++++--------- sdcard/c320x480/WIDGETS/Flights/main.lua | 2 +- .../SCRIPTS/PRESETS/engine/lib_utils.lua | 6 ++-- .../c480x272/SCRIPTS/PRESETS/engine/main.lua | 10 +++---- .../TOOLS/FlightsHistory/FlightsHistory3.lua | 4 +-- .../SCRIPTS/TOOLS/FlightsHistory/main.lua | 4 +-- .../TOOLS/FrSky_S8R_S6R/S8R_calibrate.lua | 6 ++-- .../SCRIPTS/TOOLS/FrSky_S8R_S6R/S8R_setup.lua | 4 +-- .../SCRIPTS/TOOLS/Model Locator (by RSSI).lua | 2 +- .../c480x272/TEMPLATES/1.Wizard/1.Plane.lua | 28 +++++++++---------- .../c480x272/TEMPLATES/1.Wizard/2.Glider.lua | 28 +++++++++---------- sdcard/c480x272/TEMPLATES/1.Wizard/3.Wing.lua | 18 ++++++------ .../TEMPLATES/1.Wizard/4.Helicopter.lua | 24 ++++++++-------- .../TEMPLATES/1.Wizard/5.Multirotor.lua | 24 ++++++++-------- sdcard/c480x272/WIDGETS/Flights/main.lua | 2 +- sdcard/c480x272/WIDGETS/Ghost/main.lua | 6 ++-- .../SCRIPTS/TOOLS/Model Locator (by RSSI).lua | 2 +- .../c480x320/SCRIPTS/TOOLS/WizardLoader.lua | 8 +++--- sdcard/c480x320/SCRIPTS/WIZARD/glider.lua | 26 ++++++++--------- sdcard/c480x320/SCRIPTS/WIZARD/multirotor.lua | 24 ++++++++-------- sdcard/c480x320/SCRIPTS/WIZARD/plane.lua | 26 ++++++++--------- sdcard/c480x320/WIDGETS/Ghost/main.lua | 6 ++-- 23 files changed, 156 insertions(+), 156 deletions(-) diff --git a/sdcard/c320x480/SCRIPTS/WIZARD/glider/wizard.lua b/sdcard/c320x480/SCRIPTS/WIZARD/glider/wizard.lua index e36b9488..3fa4cfa1 100644 --- a/sdcard/c320x480/SCRIPTS/WIZARD/glider/wizard.lua +++ b/sdcard/c320x480/SCRIPTS/WIZARD/glider/wizard.lua @@ -24,11 +24,11 @@ local pages = {} local fields = {} -- load common Bitmaps -local ImgMarkBg = Bitmap.open("img/mark_bg.png") -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPlane = Bitmap.open("img/plane.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") +local ImgMarkBg = bitmap.open("img/mark_bg.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPlane = bitmap.open("img/plane.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") -- Change display attribute to current field @@ -144,7 +144,7 @@ local ImgEngine local function runMotorConfig(event) lcd.clear() if ImgEngine == nil then - ImgEngine = Bitmap.open("img/prop.png") + ImgEngine = bitmap.open("img/prop.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageDn, 455, 95) @@ -177,8 +177,8 @@ local ImgAilL local function runAilConfig(event) lcd.clear() if ImgAilR == nil then - ImgAilR = Bitmap.open("img/rail.png") - ImgAilL = Bitmap.open("img/lail.png") + ImgAilR = bitmap.open("img/rail.png") + ImgAilL = bitmap.open("img/lail.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -223,7 +223,7 @@ local ImgFlp local function runFlapsConfig(event) lcd.clear() if ImgFlp == nil then - ImgFlp = Bitmap.open("img/flap.png") + ImgFlp = bitmap.open("img/flap.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -271,9 +271,9 @@ local ImgTailRud local function runTailConfig(event) lcd.clear() if ImgTail == nil then - ImgTail = Bitmap.open("img/tail.png") - ImgVTail = Bitmap.open("img/vtail.png") - ImgTailRud = Bitmap.open("img/tailrud.png") + ImgTail = bitmap.open("img/tail.png") + ImgVTail = bitmap.open("img/vtail.png") + ImgTailRud = bitmap.open("img/tailrud.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -345,7 +345,7 @@ local ImgSummary local function runConfigSummary(event) lcd.clear() if ImgSummary == nil then - ImgSummary = Bitmap.open("img/summary.png") + ImgSummary = bitmap.open("img/summary.png") end fields = ConfigSummaryFields lcd.drawBitmap(BackgroundImg, 0, 0) diff --git a/sdcard/c320x480/SCRIPTS/WIZARD/plane/wizard.lua b/sdcard/c320x480/SCRIPTS/WIZARD/plane/wizard.lua index 22c71292..7206d6d2 100755 --- a/sdcard/c320x480/SCRIPTS/WIZARD/plane/wizard.lua +++ b/sdcard/c320x480/SCRIPTS/WIZARD/plane/wizard.lua @@ -24,11 +24,11 @@ local pages = {} local fields = {} -- load common Bitmaps -local ImgMarkBg = Bitmap.open("img/mark_bg.png") -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPlane = Bitmap.open("img/plane.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") +local ImgMarkBg = bitmap.open("img/mark_bg.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPlane = bitmap.open("img/plane.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") -- Change display attribute to current field @@ -144,7 +144,7 @@ local ImgEngine local function runMotorConfig(event) lcd.clear() if ImgEngine == nil then - ImgEngine = Bitmap.open("img/prop.png") + ImgEngine = bitmap.open("img/prop.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageDn, 455, 95) @@ -177,8 +177,8 @@ local ImgAilL local function runAilConfig(event) lcd.clear() if ImgAilR == nil then - ImgAilR = Bitmap.open("img/rail.png") - ImgAilL = Bitmap.open("img/lail.png") + ImgAilR = bitmap.open("img/rail.png") + ImgAilL = bitmap.open("img/lail.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -223,7 +223,7 @@ local ImgFlp local function runFlapsConfig(event) lcd.clear() if ImgFlp == nil then - ImgFlp = Bitmap.open("img/flap.png") + ImgFlp = bitmap.open("img/flap.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -271,9 +271,9 @@ local ImgTailRud local function runTailConfig(event) lcd.clear() if ImgTail == nil then - ImgTail = Bitmap.open("img/tail.png") - ImgVTail = Bitmap.open("img/vtail.png") - ImgTailRud = Bitmap.open("img/tailrud.png") + ImgTail = bitmap.open("img/tail.png") + ImgVTail = bitmap.open("img/vtail.png") + ImgTailRud = bitmap.open("img/tailrud.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -345,7 +345,7 @@ local ImgSummary local function runConfigSummary(event) lcd.clear() if ImgSummary == nil then - ImgSummary = Bitmap.open("img/summary.png") + ImgSummary = bitmap.open("img/summary.png") end fields = ConfigSummaryFields lcd.drawBitmap(BackgroundImg, 0, 0) diff --git a/sdcard/c320x480/WIDGETS/Flights/main.lua b/sdcard/c320x480/WIDGETS/Flights/main.lua index 4414f7e6..24888839 100644 --- a/sdcard/c320x480/WIDGETS/Flights/main.lua +++ b/sdcard/c320x480/WIDGETS/Flights/main.lua @@ -50,7 +50,7 @@ local app_name = "Flights" -- imports -local img = Bitmap.open("/WIDGETS/" .. app_name .. "/logo.png") +local img = bitmap.open("/WIDGETS/" .. app_name .. "/logo.png") -- const local default_flight_starting_duration = 30 -- 20 sec to detect fight success diff --git a/sdcard/c480x272/SCRIPTS/PRESETS/engine/lib_utils.lua b/sdcard/c480x272/SCRIPTS/PRESETS/engine/lib_utils.lua index 596af0ee..a9a44c4e 100644 --- a/sdcard/c480x272/SCRIPTS/PRESETS/engine/lib_utils.lua +++ b/sdcard/c480x272/SCRIPTS/PRESETS/engine/lib_utils.lua @@ -28,9 +28,9 @@ M.defaultChannel_0_THR = defaultChannel(M.STICK_NUMBER_THR) M.defaultChannel_0_RUD = defaultChannel(M.STICK_NUMBER_RUD) local script_folder = m_script_folder -local ImgBackground = Bitmap.open(script_folder .. "img/background.png") -local ImgPageUp = Bitmap.open(script_folder .. "img/pageup.png") -local ImgPageDn = Bitmap.open(script_folder .. "img/pagedn.png") +local ImgBackground = bitmap.open(script_folder .. "img/background.png") +local ImgPageUp = bitmap.open(script_folder .. "img/pageup.png") +local ImgPageDn = bitmap.open(script_folder .. "img/pagedn.png") ----------------------------------------------------------------- diff --git a/sdcard/c480x272/SCRIPTS/PRESETS/engine/main.lua b/sdcard/c480x272/SCRIPTS/PRESETS/engine/main.lua index d1b94168..9be57302 100644 --- a/sdcard/c480x272/SCRIPTS/PRESETS/engine/main.lua +++ b/sdcard/c480x272/SCRIPTS/PRESETS/engine/main.lua @@ -75,10 +75,10 @@ local STATE = { } local state = STATE.SPLASH -local ImgSplash = Bitmap.open(script_folder .. "img/splash.png") -local ImgSummary = Bitmap.open(script_folder .. "img/summary.png") -local ImgBackground = Bitmap.open(script_folder .. "img/background.png") -local ImgBackground2 = Bitmap.open(script_folder .. "img/background2.png") +local ImgSplash = bitmap.open(script_folder .. "img/splash.png") +local ImgSummary = bitmap.open(script_folder .. "img/summary.png") +local ImgBackground = bitmap.open(script_folder .. "img/background.png") +local ImgBackground2 = bitmap.open(script_folder .. "img/background2.png") --------------------------------------------------------------------------------------------------- local function getVer() @@ -131,7 +131,7 @@ local function on_change_preset_selection(i) log("Selected model-name: " .. dd_preset_folder_name) preset_info = m_utils.readMeta("/SCRIPTS/PRESETS/scripts/" .. dd_preset_folder_name .. "/meta.ini") - preset_info.icon = Bitmap.open("/SCRIPTS/PRESETS/scripts/" .. dd_preset_folder_name .. "/icon.png") + preset_info.icon = bitmap.open("/SCRIPTS/PRESETS/scripts/" .. dd_preset_folder_name .. "/icon.png") log("Category: %s", preset_info["category"]) log("preset_selection: %s", preset_info["name"]) diff --git a/sdcard/c480x272/SCRIPTS/TOOLS/FlightsHistory/FlightsHistory3.lua b/sdcard/c480x272/SCRIPTS/TOOLS/FlightsHistory/FlightsHistory3.lua index 646a5447..8810617e 100644 --- a/sdcard/c480x272/SCRIPTS/TOOLS/FlightsHistory/FlightsHistory3.lua +++ b/sdcard/c480x272/SCRIPTS/TOOLS/FlightsHistory/FlightsHistory3.lua @@ -68,8 +68,8 @@ local STATE = { } local state = STATE.SPLASH -local img_bg1 = Bitmap.open("/SCRIPTS/TOOLS/FlightsHistory/bg1.png") -local img_bg2 = Bitmap.open("/SCRIPTS/TOOLS/FlightsHistory/bg2.png") +local img_bg1 = bitmap.open("/SCRIPTS/TOOLS/FlightsHistory/bg1.png") +local img_bg2 = bitmap.open("/SCRIPTS/TOOLS/FlightsHistory/bg2.png") -- Instantiate a new GUI object local ctx1 = m_libgui.newGUI() diff --git a/sdcard/c480x272/SCRIPTS/TOOLS/FlightsHistory/main.lua b/sdcard/c480x272/SCRIPTS/TOOLS/FlightsHistory/main.lua index 6e91cfbd..dfdc5b58 100644 --- a/sdcard/c480x272/SCRIPTS/TOOLS/FlightsHistory/main.lua +++ b/sdcard/c480x272/SCRIPTS/TOOLS/FlightsHistory/main.lua @@ -38,8 +38,8 @@ local error_desc = nil local script_folder = "/SCRIPTS/TOOLS/FlightsHistory/" local function validate_image(file_name) - local img1 = Bitmap.open(script_folder .. file_name) - local w, h = Bitmap.getSize(img1) + local img1 = bitmap.open(script_folder .. file_name) + local w, h = bitmap.getSize(img1) if w == 0 and h == 0 then error_desc = "File not found: " .. script_folder .. file_name end diff --git a/sdcard/c480x272/SCRIPTS/TOOLS/FrSky_S8R_S6R/S8R_calibrate.lua b/sdcard/c480x272/SCRIPTS/TOOLS/FrSky_S8R_S6R/S8R_calibrate.lua index 6478d7cf..ae273f1d 100644 --- a/sdcard/c480x272/SCRIPTS/TOOLS/FrSky_S8R_S6R/S8R_calibrate.lua +++ b/sdcard/c480x272/SCRIPTS/TOOLS/FrSky_S8R_S6R/S8R_calibrate.lua @@ -134,7 +134,7 @@ local function refreshPage(event) local position = calibrationPositions[1 + calibrationStep] lcd.drawText(50, 50, "Place the receiver in the following position", TEXT_COLOR) if calibBitmaps[calibrationStep + 1] == nil then - calibBitmaps[calibrationStep + 1] = Bitmap.open(calibBitmapsFile[calibrationStep + 1]) + calibBitmaps[calibrationStep + 1] = bitmap.open(calibBitmapsFile[calibrationStep + 1]) end lcd.drawBitmap(calibBitmaps[calibrationStep + 1], 40, 70, 150) @@ -194,8 +194,8 @@ local function refreshPage(event) end else lcd.drawText(160, 50, "Calibration completed", 0) - lcd.drawBitmap(Bitmap.open("img/done.bmp"), 200, 100) - lcd.drawBitmap(Bitmap.open("img/done.png"), 310, 60) + lcd.drawBitmap(bitmap.open("img/done.bmp"), 200, 100) + lcd.drawBitmap(bitmap.open("img/done.png"), 310, 60) lcd.drawText(160, 220, "Hold [RTN] to exit", attr) end if calibrationStep > 6 and (event == EVT_VIRTUAL_ENTER or event == EVT_VIRTUAL_EXIT) then diff --git a/sdcard/c480x272/SCRIPTS/TOOLS/FrSky_S8R_S6R/S8R_setup.lua b/sdcard/c480x272/SCRIPTS/TOOLS/FrSky_S8R_S6R/S8R_setup.lua index 57296f6b..bafccc07 100644 --- a/sdcard/c480x272/SCRIPTS/TOOLS/FrSky_S8R_S6R/S8R_setup.lua +++ b/sdcard/c480x272/SCRIPTS/TOOLS/FrSky_S8R_S6R/S8R_setup.lua @@ -381,7 +381,7 @@ local function runConfigPage(event, touchState) if fields[1][4] ~= nil then if LCD_W == 480 then if wingBitmaps[1 + fields[1][4]] == nil then - wingBitmaps[1 + fields[1][4]] = Bitmap.open(wingBitmapsFile[1 + fields[1][4]]) + wingBitmaps[1 + fields[1][4]] = bitmap.open(wingBitmapsFile[1 + fields[1][4]]) end lcd.drawBitmap(wingBitmaps[1 + fields[1][4]], 10, 90) else @@ -391,7 +391,7 @@ local function runConfigPage(event, touchState) if fields[2][4] ~= nil then if LCD_W == 480 then if mountBitmaps[1 + fields[2][4]] == nil then - mountBitmaps[1 + fields[2][4]] = Bitmap.open(mountBitmapsFile[1 + fields[2][4]]) + mountBitmaps[1 + fields[2][4]] = bitmap.open(mountBitmapsFile[1 + fields[2][4]]) end lcd.drawBitmap(mountBitmaps[1 + fields[2][4]], 190, 110) else diff --git a/sdcard/c480x272/SCRIPTS/TOOLS/Model Locator (by RSSI).lua b/sdcard/c480x272/SCRIPTS/TOOLS/Model Locator (by RSSI).lua index e5dddb72..a0ff7de6 100644 --- a/sdcard/c480x272/SCRIPTS/TOOLS/Model Locator (by RSSI).lua +++ b/sdcard/c480x272/SCRIPTS/TOOLS/Model Locator (by RSSI).lua @@ -39,7 +39,7 @@ local delayMillis = 100 local nextPlayTime = getTime() -local img = Bitmap.open("/SCRIPTS/TOOLS/Model Locator (by RSSI).png") +local img = bitmap.open("/SCRIPTS/TOOLS/Model Locator (by RSSI).png") -------------------------------------------------------------- local function log(s) diff --git a/sdcard/c480x272/TEMPLATES/1.Wizard/1.Plane.lua b/sdcard/c480x272/TEMPLATES/1.Wizard/1.Plane.lua index 27f9cf79..d523b7da 100644 --- a/sdcard/c480x272/TEMPLATES/1.Wizard/1.Plane.lua +++ b/sdcard/c480x272/TEMPLATES/1.Wizard/1.Plane.lua @@ -31,11 +31,11 @@ local pages = {} chdir("/TEMPLATES/1.Wizard") -- load common Bitmaps -local ImgMarkBg = Bitmap.open("img/mark_bg.png") -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPlane = Bitmap.open("img/plane/plane.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") +local ImgMarkBg = bitmap.open("img/mark_bg.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPlane = bitmap.open("img/plane/plane.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") local STICK_NUMBER_AIL = 3 local STICK_NUMBER_ELE = 1 @@ -256,7 +256,7 @@ local ImgEngine local function runMotorConfig(event) lcd.clear() if ImgEngine == nil then - ImgEngine = Bitmap.open("img/plane/prop.png") + ImgEngine = bitmap.open("img/plane/prop.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageDn, 455, 95) @@ -306,8 +306,8 @@ local ImgAilL local function runAilConfig(event) lcd.clear() if ImgAilR == nil then - ImgAilR = Bitmap.open("img/plane/rail.png") - ImgAilL = Bitmap.open("img/plane/lail.png") + ImgAilR = bitmap.open("img/plane/rail.png") + ImgAilL = bitmap.open("img/plane/lail.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -355,7 +355,7 @@ local ImgFlp local function runFlapsConfig(event) lcd.clear() if ImgFlp == nil then - ImgFlp = Bitmap.open("img/plane/flap.png") + ImgFlp = bitmap.open("img/plane/flap.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -407,9 +407,9 @@ local ImgTailRud local function runTailConfig(event) lcd.clear() if ImgTail == nil then - ImgTail = Bitmap.open("img/plane/tail.png") - ImgVTail = Bitmap.open("img/plane/vtail.png") - ImgTailRud = Bitmap.open("img/plane/tail_rud.png") + ImgTail = bitmap.open("img/plane/tail.png") + ImgVTail = bitmap.open("img/plane/vtail.png") + ImgTailRud = bitmap.open("img/plane/tail_rud.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -476,7 +476,7 @@ local ImgFlp local function runGearConfig(event) lcd.clear() if ImgFlp == nil then - ImgFlp = Bitmap.open("img/plane/flap.png") + ImgFlp = bitmap.open("img/plane/flap.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -551,7 +551,7 @@ local ImgSummary local function runConfigSummary(event) lcd.clear() if ImgSummary == nil then - ImgSummary = Bitmap.open("img/summary.png") + ImgSummary = bitmap.open("img/summary.png") end lcd.drawBitmap(BackgroundImg, 0, 0) diff --git a/sdcard/c480x272/TEMPLATES/1.Wizard/2.Glider.lua b/sdcard/c480x272/TEMPLATES/1.Wizard/2.Glider.lua index 39df2dc8..0e68fb51 100644 --- a/sdcard/c480x272/TEMPLATES/1.Wizard/2.Glider.lua +++ b/sdcard/c480x272/TEMPLATES/1.Wizard/2.Glider.lua @@ -28,11 +28,11 @@ local pages = {} chdir("/TEMPLATES/1.Wizard") -- load common Bitmaps -local ImgMarkBg = Bitmap.open("img/mark_bg.png") -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPlane = Bitmap.open("img/glider/glider.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") +local ImgMarkBg = bitmap.open("img/mark_bg.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPlane = bitmap.open("img/glider/glider.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") local STICK_NUMBER_AIL = 3 local STICK_NUMBER_ELE = 1 @@ -253,7 +253,7 @@ local ImgEngine local function runMotorConfig(event) lcd.clear() if ImgEngine == nil then - ImgEngine = Bitmap.open("img/glider/prop.png") + ImgEngine = bitmap.open("img/glider/prop.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageDn, 455, 95) @@ -303,8 +303,8 @@ local ImgAilL local function runAilConfig(event) lcd.clear() if ImgAilR == nil then - ImgAilR = Bitmap.open("img/glider/rail.png") - ImgAilL = Bitmap.open("img/glider/lail.png") + ImgAilR = bitmap.open("img/glider/rail.png") + ImgAilL = bitmap.open("img/glider/lail.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -352,7 +352,7 @@ local ImgFlp local function runFlapsConfig(event) lcd.clear() if ImgFlp == nil then - ImgFlp = Bitmap.open("img/glider/flap.png") + ImgFlp = bitmap.open("img/glider/flap.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -404,9 +404,9 @@ local ImgTailRud local function runTailConfig(event) lcd.clear() if ImgTail == nil then - ImgTail = Bitmap.open("img/glider/tail.png") - ImgVTail = Bitmap.open("img/glider/vtail.png") - ImgTailRud = Bitmap.open("img/glider/tail_rud.png") + ImgTail = bitmap.open("img/glider/tail.png") + ImgVTail = bitmap.open("img/glider/vtail.png") + ImgTailRud = bitmap.open("img/glider/tail_rud.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -473,7 +473,7 @@ local ImgFlp local function runGearConfig(event) lcd.clear() if ImgFlp == nil then - ImgFlp = Bitmap.open("img/plane/flap.png") + ImgFlp = bitmap.open("img/plane/flap.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -548,7 +548,7 @@ local ImgSummary local function runConfigSummary(event) lcd.clear() if ImgSummary == nil then - ImgSummary = Bitmap.open("img/summary.png") + ImgSummary = bitmap.open("img/summary.png") end lcd.drawBitmap(BackgroundImg, 0, 0) diff --git a/sdcard/c480x272/TEMPLATES/1.Wizard/3.Wing.lua b/sdcard/c480x272/TEMPLATES/1.Wizard/3.Wing.lua index 871eedf3..05d4e0f8 100644 --- a/sdcard/c480x272/TEMPLATES/1.Wizard/3.Wing.lua +++ b/sdcard/c480x272/TEMPLATES/1.Wizard/3.Wing.lua @@ -31,11 +31,11 @@ local pages = {} chdir("/TEMPLATES/1.Wizard") -- load common Bitmaps -local ImgMarkBg = Bitmap.open("img/mark_bg.png") -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPlane = Bitmap.open("img/wing/plane.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") +local ImgMarkBg = bitmap.open("img/mark_bg.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPlane = bitmap.open("img/wing/plane.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") local STICK_NUMBER_AIL = 3 local STICK_NUMBER_ELE = 1 @@ -253,7 +253,7 @@ local ImgEngine local function runMotorConfig(event) lcd.clear() if ImgEngine == nil then - ImgEngine = Bitmap.open("img/wing/prop.png") + ImgEngine = bitmap.open("img/wing/prop.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageDn, 455, 95) @@ -307,8 +307,8 @@ local ImgAilL local function runElevronConfig(event) lcd.clear() if ImgAilR == nil then - ImgAilR = Bitmap.open("img/wing/rail.png") - ImgAilL = Bitmap.open("img/wing/lail.png") + ImgAilR = bitmap.open("img/wing/rail.png") + ImgAilL = bitmap.open("img/wing/lail.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -353,7 +353,7 @@ local ImgSummary local function runConfigSummary(event) lcd.clear() if ImgSummary == nil then - ImgSummary = Bitmap.open("img/summary.png") + ImgSummary = bitmap.open("img/summary.png") end lcd.drawBitmap(BackgroundImg, 0, 0) diff --git a/sdcard/c480x272/TEMPLATES/1.Wizard/4.Helicopter.lua b/sdcard/c480x272/TEMPLATES/1.Wizard/4.Helicopter.lua index 6182c2a5..6297e1ad 100644 --- a/sdcard/c480x272/TEMPLATES/1.Wizard/4.Helicopter.lua +++ b/sdcard/c480x272/TEMPLATES/1.Wizard/4.Helicopter.lua @@ -31,10 +31,10 @@ local Text_Color= lcd.setColor(CUSTOM_COLOR, BLACK) chdir("/TEMPLATES/1.Wizard") -- load common Bitmaps -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") -local ImgSummary = Bitmap.open("img/summary.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") +local ImgSummary = bitmap.open("img/summary.png") -- Change display attribute to current field local function addField(step) @@ -145,7 +145,7 @@ local function runTypeConfig(event) lcd.clear() lcd.drawBitmap(BackgroundImg,0,0) if TypeBackground == nil then - TypeBackground = Bitmap.open("img/helicopter/type.png") + TypeBackground = bitmap.open("img/helicopter/type.png") end fields = TypeFields lcd.drawBitmap(BackgroundImg,0,0) @@ -173,7 +173,7 @@ local function runStyleConfig(event) lcd.clear() if StyleBackground == nil then - StyleBackground = Bitmap.open("img/helicopter/style.png") + StyleBackground = bitmap.open("img/helicopter/style.png") end lcd.drawBitmap(BackgroundImg,0,0) lcd.drawBitmap(StyleBackground, 215, 0) @@ -198,7 +198,7 @@ local SwitchBackground local function runSwitchConfig(event) lcd.clear() if SwitchBackground == nil then - SwitchBackground = Bitmap.open("img/helicopter/switch.png") + SwitchBackground = bitmap.open("img/helicopter/switch.png") end lcd.drawBitmap(BackgroundImg,0,0) lcd.drawBitmap(SwitchBackground, 270, 0) @@ -230,7 +230,7 @@ local ThrBackground local function runThrConfig(event) lcd.clear() if ThrBackground == nil then - ThrBackground = Bitmap.open("img/helicopter/throttle.png") + ThrBackground = bitmap.open("img/helicopter/throttle.png") end lcd.drawBitmap(BackgroundImg,0,0) lcd.drawBitmap(ThrBackground, 215, 0) @@ -255,7 +255,7 @@ local CurveBackground local function runCurveConfig(event) lcd.clear() if CurveBackground == nil then - CurveBackground = Bitmap.open("img/helicopter/curve.png") + CurveBackground = bitmap.open("img/helicopter/curve.png") end lcd.drawBitmap(BackgroundImg,0,0) lcd.drawBitmap(CurveBackground, 200, 0) @@ -284,7 +284,7 @@ local AilerBackground local function runAilerConfig(event) lcd.clear() if AilerBackground == nil then - AilerBackground = Bitmap.open("img/helicopter/aileron.png") + AilerBackground = bitmap.open("img/helicopter/aileron.png") end lcd.drawBitmap(BackgroundImg,0,0) lcd.drawBitmap(AilerBackground, 220, 0) @@ -307,7 +307,7 @@ local EleBackground local function runEleConfig(event) lcd.clear() if EleBackground == nil then - EleBackground = Bitmap.open("img/helicopter/elevator.png") + EleBackground = bitmap.open("img/helicopter/elevator.png") end lcd.drawBitmap(BackgroundImg,0,0) lcd.drawBitmap(EleBackground, 220, 0) @@ -330,7 +330,7 @@ local RudBackground local function runRudConfig(event) lcd.clear() if RudBackground == nil then - RudBackground = Bitmap.open("img/helicopter/rudder.png") + RudBackground = bitmap.open("img/helicopter/rudder.png") end lcd.drawBitmap(BackgroundImg,0,0) lcd.drawBitmap(RudBackground, 220, 0) diff --git a/sdcard/c480x272/TEMPLATES/1.Wizard/5.Multirotor.lua b/sdcard/c480x272/TEMPLATES/1.Wizard/5.Multirotor.lua index 4baae01d..95097e00 100644 --- a/sdcard/c480x272/TEMPLATES/1.Wizard/5.Multirotor.lua +++ b/sdcard/c480x272/TEMPLATES/1.Wizard/5.Multirotor.lua @@ -34,10 +34,10 @@ local STICK_NUMBER_RUD = 0 chdir("/TEMPLATES/1.Wizard") -- load common Bitmaps -local ImgMarkBg = Bitmap.open("img/mark_bg.png") -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") +local ImgMarkBg = bitmap.open("img/mark_bg.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") -- Change display attribute to current field @@ -152,7 +152,7 @@ local ThrottleBackground local function runThrottleConfig(event) lcd.clear() if ThrottleBackground == nil then - ThrottleBackground = Bitmap.open("img/multirotor/throttle.png") + ThrottleBackground = bitmap.open("img/multirotor/throttle.png") end lcd.drawBitmap(ThrottleBackground, 0, 0) lcd.drawBitmap(ImgPageDn, 455, 95) @@ -173,7 +173,7 @@ local RollBackground local function runRollConfig(event) lcd.clear() if RollBackground == nil then - RollBackground = Bitmap.open("img/multirotor/roll.png") + RollBackground = bitmap.open("img/multirotor/roll.png") end lcd.drawBitmap(RollBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -195,7 +195,7 @@ local PitchBackground local function runPitchConfig(event) lcd.clear() if PitchBackground == nil then - PitchBackground = Bitmap.open("img/multirotor/pitch.png") + PitchBackground = bitmap.open("img/multirotor/pitch.png") end lcd.drawBitmap(PitchBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -217,7 +217,7 @@ local YawBackground local function runYawConfig(event) lcd.clear() if YawBackground == nil then - YawBackground = Bitmap.open("img/multirotor/yaw.png") + YawBackground = bitmap.open("img/multirotor/yaw.png") end lcd.drawBitmap(YawBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -239,7 +239,7 @@ local ArmBackground local function runArmConfig(event) lcd.clear() if ArmBackground == nil then - ArmBackground = Bitmap.open("img/multirotor/arm.png") + ArmBackground = bitmap.open("img/multirotor/arm.png") end lcd.drawBitmap(ArmBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -261,7 +261,7 @@ local BeeperBackground local function runBeeperConfig(event) lcd.clear() if BeeperBackground == nil then - BeeperBackground = Bitmap.open("img/multirotor/beeper.png") + BeeperBackground = bitmap.open("img/multirotor/beeper.png") end lcd.drawBitmap(BeeperBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -283,7 +283,7 @@ local ModeBackground local function runModeConfig(event) lcd.clear() if ModeBackground == nil then - ModeBackground = Bitmap.open("img/multirotor/mode.png") + ModeBackground = bitmap.open("img/multirotor/mode.png") end lcd.drawBitmap(ModeBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -319,7 +319,7 @@ local ImgSummary local function runConfigSummary(event) lcd.clear() if ImgSummary == nil then - ImgSummary = Bitmap.open("img/summary.png") + ImgSummary = bitmap.open("img/summary.png") end fields = ConfigSummaryFields lcd.drawBitmap(BackgroundImg, 0, 0) diff --git a/sdcard/c480x272/WIDGETS/Flights/main.lua b/sdcard/c480x272/WIDGETS/Flights/main.lua index d513ba23..670dfa83 100644 --- a/sdcard/c480x272/WIDGETS/Flights/main.lua +++ b/sdcard/c480x272/WIDGETS/Flights/main.lua @@ -73,7 +73,7 @@ local use_flights_history = 1 -- 0=do not write flights-history, -- imports -local img = Bitmap.open("/WIDGETS/" .. app_name .. "/logo.png") +local img = bitmap.open("/WIDGETS/" .. app_name .. "/logo.png") local LibLogClass = loadScript("/WIDGETS/" .. app_name .. "/lib_log.lua", "tcd") local m_log = LibLogClass(app_name, "/WIDGETS/" .. app_name) diff --git a/sdcard/c480x272/WIDGETS/Ghost/main.lua b/sdcard/c480x272/WIDGETS/Ghost/main.lua index ce5aeb5f..67a49fe8 100644 --- a/sdcard/c480x272/WIDGETS/Ghost/main.lua +++ b/sdcard/c480x272/WIDGETS/Ghost/main.lua @@ -46,9 +46,9 @@ end local function create(zone, options) local wgt = { zone=zone, options=options} - backgroundBitmap = Bitmap.open("/WIDGETS/Ghost/img/background.png") - orangeLed = Bitmap.open("/WIDGETS/Ghost/img/orange.png") - greenLed = Bitmap.open("/WIDGETS/Ghost/img/green.png") + backgroundBitmap = bitmap.open("/WIDGETS/Ghost/img/background.png") + orangeLed = bitmap.open("/WIDGETS/Ghost/img/orange.png") + greenLed = bitmap.open("/WIDGETS/Ghost/img/green.png") offsetX = (wgt.zone.w - 178) / 2 offsetY = (wgt.zone.h - 148) / 2 return wgt diff --git a/sdcard/c480x320/SCRIPTS/TOOLS/Model Locator (by RSSI).lua b/sdcard/c480x320/SCRIPTS/TOOLS/Model Locator (by RSSI).lua index 525f6f48..ab289057 100644 --- a/sdcard/c480x320/SCRIPTS/TOOLS/Model Locator (by RSSI).lua +++ b/sdcard/c480x320/SCRIPTS/TOOLS/Model Locator (by RSSI).lua @@ -39,7 +39,7 @@ local delayMillis = 100 local nextPlayTime = getTime() -local img = Bitmap.open("/SCRIPTS/TOOLS/Model Locator (by RSSI).png") +local img = bitmap.open("/SCRIPTS/TOOLS/Model Locator (by RSSI).png") -------------------------------------------------------------- local function log(s) diff --git a/sdcard/c480x320/SCRIPTS/TOOLS/WizardLoader.lua b/sdcard/c480x320/SCRIPTS/TOOLS/WizardLoader.lua index 76d58dbc..f6079feb 100644 --- a/sdcard/c480x320/SCRIPTS/TOOLS/WizardLoader.lua +++ b/sdcard/c480x320/SCRIPTS/TOOLS/WizardLoader.lua @@ -1,9 +1,9 @@ local toolName = "TNS|Wizard Loader|TNE" -local BackgroundImg = Bitmap.open("/SCRIPTS/WIZARD/img/background.png") -local planeIcon = Bitmap.open("/SCRIPTS/WIZARD/img/icons/plane.png") -local gliderIcon = Bitmap.open("/SCRIPTS/WIZARD/img/icons/glider.png") -local multirotorIcon = Bitmap.open("/SCRIPTS/WIZARD/img/icons/multirotor.png") +local BackgroundImg = bitmap.open("/SCRIPTS/WIZARD/img/background.png") +local planeIcon = bitmap.open("/SCRIPTS/WIZARD/img/icons/plane.png") +local gliderIcon = bitmap.open("/SCRIPTS/WIZARD/img/icons/glider.png") +local multirotorIcon = bitmap.open("/SCRIPTS/WIZARD/img/icons/multirotor.png") local w, h local selWizard = 1 diff --git a/sdcard/c480x320/SCRIPTS/WIZARD/glider.lua b/sdcard/c480x320/SCRIPTS/WIZARD/glider.lua index ef652a0c..5edce353 100644 --- a/sdcard/c480x320/SCRIPTS/WIZARD/glider.lua +++ b/sdcard/c480x320/SCRIPTS/WIZARD/glider.lua @@ -24,11 +24,11 @@ local pages = {} local fields = {} -- load common Bitmaps -local ImgMarkBg = Bitmap.open("img/mark_bg.png") -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPlane = Bitmap.open("img/glider/glider.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") +local ImgMarkBg = bitmap.open("img/mark_bg.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPlane = bitmap.open("img/glider/glider.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") -- Change display attribute to current field @@ -144,7 +144,7 @@ local ImgEngine local function runMotorConfig(event) lcd.clear() if ImgEngine == nil then - ImgEngine = Bitmap.open("img/glider/prop.png") + ImgEngine = bitmap.open("img/glider/prop.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageDn, 455, 95) @@ -176,8 +176,8 @@ local ImgAilL local function runAilConfig(event) lcd.clear() if ImgAilR == nil then - ImgAilR = Bitmap.open("img/glider/rail.png") - ImgAilL = Bitmap.open("img/glider/lail.png") + ImgAilR = bitmap.open("img/glider/rail.png") + ImgAilL = bitmap.open("img/glider/lail.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -222,7 +222,7 @@ local ImgFlp local function runFlapsConfig(event) lcd.clear() if ImgFlp == nil then - ImgFlp = Bitmap.open("img/glider/flap.png") + ImgFlp = bitmap.open("img/glider/flap.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -270,9 +270,9 @@ local ImgTailRud local function runTailConfig(event) lcd.clear() if ImgTail == nil then - ImgTail = Bitmap.open("img/glider/tail.png") - ImgVTail = Bitmap.open("img/glider/vtail.png") - ImgTailRud = Bitmap.open("img/glider/tail_rud.png") + ImgTail = bitmap.open("img/glider/tail.png") + ImgVTail = bitmap.open("img/glider/vtail.png") + ImgTailRud = bitmap.open("img/glider/tail_rud.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -344,7 +344,7 @@ local ImgSummary local function runConfigSummary(event) lcd.clear() if ImgSummary == nil then - ImgSummary = Bitmap.open("img/summary.png") + ImgSummary = bitmap.open("img/summary.png") end fields = ConfigSummaryFields lcd.drawBitmap(BackgroundImg, 0, 0) diff --git a/sdcard/c480x320/SCRIPTS/WIZARD/multirotor.lua b/sdcard/c480x320/SCRIPTS/WIZARD/multirotor.lua index c0c4f776..613ca25d 100644 --- a/sdcard/c480x320/SCRIPTS/WIZARD/multirotor.lua +++ b/sdcard/c480x320/SCRIPTS/WIZARD/multirotor.lua @@ -28,10 +28,10 @@ local fields = {} local switches = {"SA", "SB", "SC", "SD", "SE", "SF", "SG"} -- load common Bitmaps -local ImgMarkBg = Bitmap.open("img/mark_bg.png") -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") +local ImgMarkBg = bitmap.open("img/mark_bg.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") -- Change display attribute to current field @@ -146,7 +146,7 @@ local ThrottleBackground local function runThrottleConfig(event) lcd.clear() if ThrottleBackground == nil then - ThrottleBackground = Bitmap.open("img/multirotor/throttle.png") + ThrottleBackground = bitmap.open("img/multirotor/throttle.png") end lcd.drawBitmap(ThrottleBackground, 0, 0) lcd.drawBitmap(ImgPageDn, 455, 95) @@ -167,7 +167,7 @@ local RollBackground local function runRollConfig(event) lcd.clear() if RollBackground == nil then - RollBackground = Bitmap.open("img/multirotor/roll.png") + RollBackground = bitmap.open("img/multirotor/roll.png") end lcd.drawBitmap(RollBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -189,7 +189,7 @@ local PitchBackground local function runPitchConfig(event) lcd.clear() if PitchBackground == nil then - PitchBackground = Bitmap.open("img/multirotor/pitch.png") + PitchBackground = bitmap.open("img/multirotor/pitch.png") end lcd.drawBitmap(PitchBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -211,7 +211,7 @@ local YawBackground local function runYawConfig(event) lcd.clear() if YawBackground == nil then - YawBackground = Bitmap.open("img/multirotor/yaw.png") + YawBackground = bitmap.open("img/multirotor/yaw.png") end lcd.drawBitmap(YawBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -233,7 +233,7 @@ local ArmBackground local function runArmConfig(event) lcd.clear() if ArmBackground == nil then - ArmBackground = Bitmap.open("img/multirotor/arm.png") + ArmBackground = bitmap.open("img/multirotor/arm.png") end lcd.drawBitmap(ArmBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -255,7 +255,7 @@ local BeeperBackground local function runBeeperConfig(event) lcd.clear() if BeeperBackground == nil then - BeeperBackground = Bitmap.open("img/multirotor/beeper.png") + BeeperBackground = bitmap.open("img/multirotor/beeper.png") end lcd.drawBitmap(BeeperBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -277,7 +277,7 @@ local ModeBackground local function runModeConfig(event) lcd.clear() if ModeBackground == nil then - ModeBackground = Bitmap.open("img/multirotor/mode.png") + ModeBackground = bitmap.open("img/multirotor/mode.png") end lcd.drawBitmap(ModeBackground, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -313,7 +313,7 @@ local ImgSummary local function runConfigSummary(event) lcd.clear() if ImgSummary == nil then - ImgSummary = Bitmap.open("img/summary.png") + ImgSummary = bitmap.open("img/summary.png") end fields = ConfigSummaryFields lcd.drawBitmap(BackgroundImg, 0, 0) diff --git a/sdcard/c480x320/SCRIPTS/WIZARD/plane.lua b/sdcard/c480x320/SCRIPTS/WIZARD/plane.lua index 321ad153..f1f197df 100644 --- a/sdcard/c480x320/SCRIPTS/WIZARD/plane.lua +++ b/sdcard/c480x320/SCRIPTS/WIZARD/plane.lua @@ -24,11 +24,11 @@ local pages = {} local fields = {} -- load common Bitmaps -local ImgMarkBg = Bitmap.open("img/mark_bg.png") -local BackgroundImg = Bitmap.open("img/background.png") -local ImgPlane = Bitmap.open("img/plane/plane.png") -local ImgPageUp = Bitmap.open("img/pageup.png") -local ImgPageDn = Bitmap.open("img/pagedn.png") +local ImgMarkBg = bitmap.open("img/mark_bg.png") +local BackgroundImg = bitmap.open("img/background.png") +local ImgPlane = bitmap.open("img/plane/plane.png") +local ImgPageUp = bitmap.open("img/pageup.png") +local ImgPageDn = bitmap.open("img/pagedn.png") -- Change display attribute to current field @@ -144,7 +144,7 @@ local ImgEngine local function runMotorConfig(event) lcd.clear() if ImgEngine == nil then - ImgEngine = Bitmap.open("img/plane/prop.png") + ImgEngine = bitmap.open("img/plane/prop.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageDn, 455, 95) @@ -176,8 +176,8 @@ local ImgAilL local function runAilConfig(event) lcd.clear() if ImgAilR == nil then - ImgAilR = Bitmap.open("img/plane/rail.png") - ImgAilL = Bitmap.open("img/plane/lail.png") + ImgAilR = bitmap.open("img/plane/rail.png") + ImgAilL = bitmap.open("img/plane/lail.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -222,7 +222,7 @@ local ImgFlp local function runFlapsConfig(event) lcd.clear() if ImgFlp == nil then - ImgFlp = Bitmap.open("img/plane/flap.png") + ImgFlp = bitmap.open("img/plane/flap.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -270,9 +270,9 @@ local ImgTailRud local function runTailConfig(event) lcd.clear() if ImgTail == nil then - ImgTail = Bitmap.open("img/plane/tail.png") - ImgVTail = Bitmap.open("img/plane/vtail.png") - ImgTailRud = Bitmap.open("img/plane/tail_rud.png") + ImgTail = bitmap.open("img/plane/tail.png") + ImgVTail = bitmap.open("img/plane/vtail.png") + ImgTailRud = bitmap.open("img/plane/tail_rud.png") end lcd.drawBitmap(BackgroundImg, 0, 0) lcd.drawBitmap(ImgPageUp, 0, 95) @@ -344,7 +344,7 @@ local ImgSummary local function runConfigSummary(event) lcd.clear() if ImgSummary == nil then - ImgSummary = Bitmap.open("img/summary.png") + ImgSummary = bitmap.open("img/summary.png") end fields = ConfigSummaryFields lcd.drawBitmap(BackgroundImg, 0, 0) diff --git a/sdcard/c480x320/WIDGETS/Ghost/main.lua b/sdcard/c480x320/WIDGETS/Ghost/main.lua index 1e1c5c06..a53fbc46 100644 --- a/sdcard/c480x320/WIDGETS/Ghost/main.lua +++ b/sdcard/c480x320/WIDGETS/Ghost/main.lua @@ -46,9 +46,9 @@ end local function create(zone, options) local wgt = { zone=zone, options=options} - backgroundBitmap = Bitmap.open("/WIDGETS/Ghost/img/background.png") - orangeLed = Bitmap.open("/WIDGETS/Ghost/img/orange.png") - greenLed = Bitmap.open("/WIDGETS/Ghost/img/green.png") + backgroundBitmap = bitmap.open("/WIDGETS/Ghost/img/background.png") + orangeLed = bitmap.open("/WIDGETS/Ghost/img/orange.png") + greenLed = bitmap.open("/WIDGETS/Ghost/img/green.png") offsetX = (wgt.zone.w - 178) / 2 offsetY = (wgt.zone.h - 148) / 2 return wgt