local function run(event)
lcd.drawRectangle(0, 0, 212, 20)
-- Schalter abfragen
local failsafe = getValue("sf")
local iocmode = getValue("sg")
local flightmode = getValue("se")
-- Ausgabe des Timers
local timer = model.getTimer(0)
lcd.drawPixmap(148, 2, "/SCRIPTS/BMP/timer_1.bmp")
lcd.drawTimer(162, 2, timer.value, DBLSIZE)
-- Anzeige Flugmodus
if (flightmode > 0) and (failsafe < 0) then
lcd.drawText(5, 2, "MANUAL", DBLSIZE)
end
if (flightmode > -1024) and (flightmode < 1024) and (failsafe < 0) then
lcd.drawText(5, 2, "ATTI", DBLSIZE)
end
if (flightmode < 0) and (iocmode > -1024) and (iocmode <1024) and (failsafe < 0) then
lcd.drawText(5, 2, "GPS", DBLSIZE)
lcd.drawText(45, 2, "IOC\30Off",0)
end
if (flightmode < 0) and (iocmode < 0) and (failsafe < 0) then
lcd.drawText(5, 2, "GPS", DBLSIZE)
lcd.drawText(45, 2, "IOC\30Home",0)
end
if (flightmode < 0) and (iocmode > 0) and (failsafe < 0) then
lcd.drawText(5, 2, "GPS", DBLSIZE)
lcd.drawText(45, 2, "IOC\30Course", 0)
end
if failsafe > 0 then
lcd.drawText(5, 4, "RETURN TO HOME", BLINK+MIDSIZE)
end
end
return { run=run }