mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Ghost widget logo color to match module led color (#8109)
This commit is contained in:
parent
024e695d4c
commit
9b3ee32c2c
4 changed files with 12 additions and 0 deletions
BIN
radio/sdcard/horus/WIDGETS/Ghost/img/green.png
Normal file
BIN
radio/sdcard/horus/WIDGETS/Ghost/img/green.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
radio/sdcard/horus/WIDGETS/Ghost/img/orange.png
Normal file
BIN
radio/sdcard/horus/WIDGETS/Ghost/img/orange.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
radio/sdcard/horus/WIDGETS/Ghost/img/red.png
Normal file
BIN
radio/sdcard/horus/WIDGETS/Ghost/img/red.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -16,6 +16,8 @@
|
||||||
---- #########################################################################
|
---- #########################################################################
|
||||||
|
|
||||||
local backgroundBitmap
|
local backgroundBitmap
|
||||||
|
local orangeLed
|
||||||
|
local greenLed
|
||||||
local offsetX
|
local offsetX
|
||||||
local offsetY
|
local offsetY
|
||||||
local sensors = {}
|
local sensors = {}
|
||||||
|
@ -45,6 +47,8 @@ end
|
||||||
local function create(zone, options)
|
local function create(zone, options)
|
||||||
local wgt = { zone=zone, options=options}
|
local wgt = { zone=zone, options=options}
|
||||||
backgroundBitmap = Bitmap.open("/WIDGETS/Ghost/img/background.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
|
offsetX = (wgt.zone.w - 178) / 2
|
||||||
offsetY = (wgt.zone.h - 148) / 2
|
offsetY = (wgt.zone.h - 148) / 2
|
||||||
return wgt
|
return wgt
|
||||||
|
@ -68,6 +72,14 @@ function refresh(wgt)
|
||||||
end
|
end
|
||||||
|
|
||||||
if getRSSI() ~= 0 then
|
if getRSSI() ~= 0 then
|
||||||
|
if getValue("RFMD") == "Pure" then
|
||||||
|
if orangeLed ~= nil then
|
||||||
|
lcd.drawBitmap(orangeLed, wgt.zone.x + offsetX + 143, wgt.zone.y + offsetY)
|
||||||
|
end
|
||||||
|
elseif greenLed ~= nil then
|
||||||
|
lcd.drawBitmap(greenLed, wgt.zone.x + offsetX + 143, wgt.zone.y + offsetY)
|
||||||
|
end
|
||||||
|
|
||||||
getValues(wgt)
|
getValues(wgt)
|
||||||
|
|
||||||
-- RF Mode/Band
|
-- RF Mode/Band
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue