1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

Ghost widget logo color to match module led color (#8109)

This commit is contained in:
3djc 2020-11-21 16:42:08 +01:00 committed by GitHub
parent 024e695d4c
commit 9b3ee32c2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -16,6 +16,8 @@
---- #########################################################################
local backgroundBitmap
local orangeLed
local greenLed
local offsetX
local offsetY
local sensors = {}
@ -45,6 +47,8 @@ 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")
offsetX = (wgt.zone.w - 178) / 2
offsetY = (wgt.zone.h - 148) / 2
return wgt
@ -68,6 +72,14 @@ function refresh(wgt)
end
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)
-- RF Mode/Band