Thread Tools
This thread is privately moderated by vulturetec, who may elect to delete unwanted replies.
Aug 08, 2020, 10:31 AM
ƃuᴉʇɐǝʞ ʇʇoɔs
vulturetec's Avatar
Thread OP
Discussion

X10 Flight log widget


Flight-Time logger Widget for OpenTX/Horus X10

This Horus X10/OpenTX widget is based on my Taranis flight-time logger, written to work under OpenTX 2.3.9 on the FrSky Horus X10/X10s as a full-size widget.

The widget keeps track of the number of flights and flight time on individual models. The logging data is stored in GVARs and therefore will remain intact as long as the GVARs 8 & 9 (on all flight modes) are not changed. The logger data can be backed up along with the model setup using companion.

When used with a variometer flights are automatically counted when the aircraft is above a specified height above the ground for specified length of time. The flight ends and the flight time calculated when the aircraft drops below that same height for another specified length of time. Alternatively a toggle switch can be used to manually start and stop flights (ie: a toggle used for normal flight-timers).

Requirements:
  • Originally written for use with OpenTX 2.3.9 on a FrSky Horus X10/X10s - it may work on other platforms but has not been tested.
  • v1.x is intended to be used only as a full-size widget with trims visible, running it in a smaller window may not work.
  • For fully automatic operation the script relies on telemetry data from a variometer (VARI-N, VARI-H, or G-RX6, G-RX8, etc) with the sensor's altitude reset before takeoff. In some situations the sensor calibration may cause it to immediately show very high readings at power-up, if that happens the telemetry should be reset immediately or false flight times may be recorded. Manual operation can be configured that will use a toggle switch input instead of altitude.
  • The widget uses GVAR7, GVAR8, and GVAR9 to store flight data and therefore will conflict with other scripts/widgets/setups that use those GVARs.

Limitations:

The flight times currently cannot exceed 1024 hours. This may be revised in future versions. However, the flight counter is not restricted to 1024 flights (it has been tested to over 1,000,000 flights)


Configuration:
The script is loaded on to the SD card into the WIDGETS directory, then a telemetry page needs to be configured to use it.

The first few lines of the script contain variables that can be configured:
  • flight_initiate_time = [seconds] : The number of seconds the model must be at or above the "height_trigger" for the flight to start. This should be set to at least several seconds. In manual-trigger mode this specifies how long the toggle must be "on" before the flight is considered "started".
  • flight_terminate_time = [seconds] : The number of seconds the model must be below the "height_trigger" for the flight to end. Like the initiate time, this should be set to at least several seconds. In manual-trigger mode this specifies how long the toggle must be "off" before the flight is considered "ended".
  • date_format = [0/1] : Specifies the format of the "last day" date . 0 = "mm-dd", 1 = "dd-mm"


Installation:
  • Copy the LOGR directory (and in it the main.lua file) to the WIDGETS directory on the radio's SD card.
  • Set up a widget page
    • Long-press TELE
    • Click PgUp/Dn until you reach a new widget page (screen will say "Add a main view")
    • Click ENTER
    • Select the full-size widget on the top row (full-size is default)
    • Scroll to highlight "Setup Widgets" and click ENTER
    • A blank full-size widget will appear, click ENTER
    • Scroll through the available widgets with the scroll-wheel until you find "flight-log", then click ENTER
    • Click ENTER again to bring up a menu that says "Select Widget/Widget Settings/Remove Widget"
    • Use the scroll wheel to highlight the "Widget Settings" option then click ENTER
    • The Widget Settings screen lets you change a number of options, change them to suit your installation:
      • COLOR: Change the color of the widget text [default=white]
      • MANUAL: CHECKED = manually start/stop logging using a toggle, UNCHECKED = use altitude to start/end flights [default=UNCHECKED]
      • SWITCH = specify the switch used if manually start/stopping logging (not needed if using altitude) [default=SF]
      • HEIGHT = Height that triggers/stops logging when not using a manual switch [default=30]
    • click RTN until the radio is back to the normally displaced widget screen
    • Copy the radio setup into Companion and save it

This concludes the widget installation. If the LOGR widget is blank or shows the word "DISABLED" try turning the radio off then on again.

Script:

Note: Much of the embedded comments/documentation lines will by word-wrapped by the forum software. Copying the text and inserting them into a text editor should retain the correct formatting of the code - or just download the zipped .lua LOGR100_X10.zip.

Code:
-- Flight Logger Widget for Horus X10 - ver beta 1.0
-- Simple flight-logger for OpenTX 239 Horus X10
--
-- Aug-2020 - S.Keating www.scottkeating.net (vulturetec on rcg)
-- 
-- Configuration:
-- The following options are set in the radio's widget settings (not in the script):
--
-- height = [height] 				: 	The height above ground that will trigger a valid flight. 
--										The value is in the same units that the telemetry reports. 
--										For example, if the telemetry is configured to reports and display  in feet then set the height trigger in terms of feet. 
--
-- manual = [check/uncheck] 		: 	Forces the script to use a toggle to manually start and end flights using a switch. 
--										CHECKED/ON uses the switch specified by the [switch] widget setting, UNCHECKED/OFF uses altitude data. 
--										This option is intended to be used with a normal two-position toggle (switch "SF", for example)
--
-- switch = [manual switch]			:	Switch that turns logging time on and off when the [MANUAL] option is checked
--
-- --------------------------------------------------------
-- The following options can be set by editing this script:
--
-- flight_initiate_time = [seconds] : 	The number of seconds the model must be at or above the "height_trigger" for the flight to start. 
--										This should be set to at least several seconds. In manual-trigger mode this specifies how long the toggle 
--										must be "on" before the flight is considered "started".
-- flight_terminate_time = [seconds] : 	The number of seconds the model must be below the "height_trigger" for the flight to end. 
--										Like the initiate time, this should be set to at least several seconds. 
--										In manual-trigger mode this specifies how long the toggle must be "off" before the flight is considered "ended".
-- dateformat = [0/1] :				Format of the last day's flight date. 0 = mm-dd, 1 = dd-mm
--
local flight_initiate_time = 6	-- seconds required above the trigger height to initiate a flight
local flight_terminate_time = 7	-- seconds required below the trigger height to terminate a flight
local dateformat = 0			-- 0 = "mm-dd", 1 = "dd-mm"
local height_trigger 			-- height that triggers/terminates a flight (in the units the telemetry is set for)
local force_manual 				-- toggles forcing triggering flights with a manual switch
local mt_switch 				-- manual switch to use if "force_manual" is toggled on

-- script variables
local altitude					-- altitude 
local inflight = false			-- in-flight flag
local inflight_start = 0 		-- in-flight start timer
local inflight_end = 0			-- in-flight end-timer
local flight_count  			-- flight counter
local flightime_start = 0		-- flight time start-time
local flighttime_end = 0		-- flight time end-timer
local flighttime_total			-- flight time total
local flight_time_current = {}	-- current flight time HMS
local flight_time_today = {}	-- today's flight time HMS
local flight_total_time = {}	-- total flight time HMS
local flight_time_last = {}		-- last day's flight time HMS
local flight_count_today = 0	-- number of flights today
local flight_count_total = 0	-- total number of flights
local flight_count_last = 0		-- last day's flights
local fi_time = 0
local ft_time = 0
				
local flights_X = 225			-- display column for the flights
local times_X = 300				-- display column for the times
local chy = 20					-- spacing between lines
local row_headers = 2			-- display row for the column headers
local row_current = 3			-- display row for the current flight data
local row_today = 4				-- display row for today's data
local row_last_day = 5			-- display row for the last day's data
local row_total_flights = 6		-- display row for the total flight count 

local wx
local wy

local _options = {
  { "Color", COLOR, WHITE },
  { "Manual", BOOL, 1 },
  { "Switch", SOURCE, 115 },
  { "Height", VALUE, 5, 0, 1000 },
}
-- removed   { "Shadow", BOOL, 0 },

local function configMe(wgt)
-- configure some variables
    
	if (wgt == nil) then
      return
    end
  
	if (wgt.options.Manual == 1) then
    	force_manual = true
	else
		force_manual = false
	end
	
	if (wgt.options.height == nil) then
		height_trigger = 30
	else
		height_trigger = wgt.options.Height
	end
	
	if (wgt.options.switch == nil) then
		mt_switch="sf"
	else
		mt_switch = wgt.options.Switch
	end
	
end

local function manual_trigger()
-- Check for a manual trigger

	if force_manual then
		if getValue(mt_switch)>0 then
			return 2
		else	
			return 1
		end
	end
	
	return 0
end

local function compdates()
-- Compare today's date against the date in memory, matched returns true
-- If the stored DAY is 0 then we force the date comparison to TRUE, which will happen
-- if the gvars for "today's" data is wiped for some reason. In that case the "last day's"
-- data would be unintentionally reset to zeros. 

	local datenow = getDateTime()
	local mm = model.getGlobalVariable(8,7)
	local dd = model.getGlobalVariable(8,8)
	local retval
	
	if mm == datenow.mon and dd == datenow.day then
			retval = true
	elseif dd == 0 then									
			retval = true
	else
			retval = false
	end
	
	return retval
end

local function checkinit()
-- reserves the GVARs in flight modes FM6-8 for our use
	for a = 6,7,8 do
		for b = 0,8 do
			if model.getGlobalVariable(a,b)==1025 then
				model.setGlobalVariable(a,b,0)
			end
		end
	end
	
end

local function creatett(tt,ttarray,rsarray)
-- tt = time value in seconds*100
-- ttarray = 3-element array representing time in h/m/s
-- rsarray = true/false; true=reset array times to zeros

	local fls
	local hh
	local hh1
	local mm
	local mm1
	local ss
	
	if rsarray then
		ttarray[1]=0
		ttarray[2]=0
		ttarray[3]=0
	end
	
	local fltot = math.floor(tt / 100)
	hh, mm = math.modf(fltot / 3600)
	mm = mm * 60
	mm, ss = math.modf((mm * 60) / 60)
	
	ss = (ss * 60) + ttarray[3]
	mm1, ss = math.modf(ss / 60)
	mm = mm + mm1 + ttarray[2]
	hh1, mm = math.modf(mm / 60)
	hh = hh + hh1 + ttarray[1]
	
	ttarray[1] = hh
	ttarray[2] = (mm * 60)
	ttarray[3] = (ss * 60)

end

local function calc_flight_totals(nsets,fc)
-- calculate flight count based on the nset and fc registers
	if nsets<0 then 
		nsets = 0
	end
	
	fc = fc + (nsets * 1024)
	
	return fc
end

local function check_sensor()
-- check to see if altitude sensor exists
-- if it doesn't, then set force_manual to true
-- initially if the force_manual flag is true then don't do anything
	
	-- if the logical switch (v2) is more than 0 then set force_manual to true
	if force_manual == false then
		if getls() == true then
			force_manual = true
		end
	end
	
	-- check for the sensor. If there isn't an alt sensor then set force_manual to true
	-- reserved for future implementation
end

local function show_time_string(ftarray)
-- format the ftarray into a nice formatted string for display
	local fls
	 fls = string.format("%02d", ftarray[1]) .. ":"
	 fls = fls .. string.format("%02d", ftarray[2]) .. ":"
	 fls = fls .. string.format("%02d",  ftarray[3])
	 
	 return fls
end

local function set_gvar_totalflights()
-- store the total flight count in the global variables (GVARs)
-- the flight count is stored in GV8 FM0 and FM1

	local nsets = math.floor(flight_count / 1024)
	local fc = flight_count - (1024 * nsets)
	
	model.setGlobalVariable(7,0,nsets )
	model.setGlobalVariable(7,1,flight_count)
	
end

local function set_gvar_flightslast()
-- store the flight count for the last day in the global variables (GVARs)
-- the flight count is stored in GV9 FM0 and FM1

	local nsets = math.floor(flight_count_last / 1024)
	local fc = flight_count_last - (1024 * nsets)
	
	model.setGlobalVariable(8,5,nsets )
	model.setGlobalVariable(8,6,flight_count_last)
	
end

local function set_gvar_flightstoday()
-- store the total flight count in the global variables (GVARs)
-- the flight count is stored in GV9 FM0 and FM1

	local nsets = math.floor(flight_count_today / 1024)
	local fc = flight_count_today - (1024 * nsets)
	
	model.setGlobalVariable(8,0,nsets )
	model.setGlobalVariable(8,1,flight_count_today)
	
end

local function get_gvar_totaltime()
-- retrieve the total flight time from the global variables (GVARs)
	flight_total_time[1] = model.getGlobalVariable(7,2)
	flight_total_time[2] = model.getGlobalVariable(7,3)
	flight_total_time[3] = model.getGlobalVariable(7,4)
end

local function set_gvar_today()
-- store today's date in the GVAR 9, FM7 and FM8
	local datenow = getDateTime()
	model.setGlobalVariable(8,7,datenow.mon)
	model.setGlobalVariable(8,8,datenow.day)
end

local function set_gvar_resettoday()
-- reset today's totals (configures a new day)

	-- swap the last day's data to "last"
	model.setGlobalVariable(8,5,model.getGlobalVariable(8,0))
	model.setGlobalVariable(8,6,model.getGlobalVariable(8,1))
	model.setGlobalVariable(7,5,model.getGlobalVariable(8,2))
	model.setGlobalVariable(7,6,model.getGlobalVariable(8,3))
	model.setGlobalVariable(7,7,model.getGlobalVariable(8,4))
	model.setGlobalVariable(6,7,model.getGlobalVariable(8,7))
	model.setGlobalVariable(6,8,model.getGlobalVariable(8,8))
	
	-- configure a new day 
    set_gvar_today()				-- set today's date in memory
	model.setGlobalVariable(8,2,0)	-- set the flight time totals to 0
	model.setGlobalVariable(8,3,0)
	model.setGlobalVariable(8,4,0)
	model.setGlobalVariable(8,0,0)	-- set the flight counters to 0
	model.setGlobalVariable(8,1,0)
	
end

local function set_gvar_totaltime()
-- store the total flight time in the global variables (GVARs)
	model.setGlobalVariable(7,2,flight_total_time[1])
	model.setGlobalVariable(7,3,flight_total_time[2])
	model.setGlobalVariable(7,4,flight_total_time[3])
end

local function get_gvar_timelast()
-- retrieve the last day flight time from the global variables (GVARs)
	flight_time_last[1] = model.getGlobalVariable(7,5)
	flight_time_last[2] = model.getGlobalVariable(7,6)
	flight_time_last[3] = model.getGlobalVariable(7,7)
end
local function set_gvar_timetoday()
-- store today's flight times in the GVAR 9, FM2, FM3, and FM4
	model.setGlobalVariable(8,2,flight_time_today[1])
	model.setGlobalVariable(8,3,flight_time_today[2])
	model.setGlobalVariable(8,4,flight_time_today[3])
	set_gvar_today()				-- set today's date in memory
end

local function get_gvar_flightstoday()
-- retrieve the total flights today from the GVARs

	flight_count_today = calc_flight_totals(model.getGlobalVariable(8,0),model.getGlobalVariable(8,1))
	
end

local function get_gvar_timetoday()
-- get today's total time from the GVARs
	flight_time_today[1] = model.getGlobalVariable(8,2)
	flight_time_today[2] = model.getGlobalVariable(8,3)
	flight_time_today[3] = model.getGlobalVariable(8,4)
end

local function configuretoday()
-- configure things for today

	if (flight_count_today == 0) then
		return
	end

	if not compdates() then		-- if the stored date isn't today then do...
		set_gvar_resettoday()
	end
	
	get_gvar_flightstoday()		-- set today's flight counter
	get_gvar_timetoday()		-- set today's times
end

local function show_todays_times(wgt)
-- Display the total time flown today
	local flc=0
	
	lcd.drawText(times_X ,wgt.zone.y+(chy*row_today), show_time_string(flight_time_today) , 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)
		
end

local function show_todays_flights(wgt)
-- Display the number of flights today

	lcd.drawText(flights_X, wgt.zone.y+(chy*row_today), flight_count_today, 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)
end

local function show_current_flighttime(wgt)
-- Display the time for the last-flown flight

	if not inflight then
		lcd.drawText(times_X ,wgt.zone.y+(chy*row_current), show_time_string(flight_time_current) , 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)	
	else
		lcd.drawText(times_X ,wgt.zone.y+(chy*row_current), show_time_string(flight_time_current) , 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + BLINK)	

	end
end

local function show_last_times(wgt)
-- Show the last flight day's time

	lcd.drawText(times_X, wgt.zone.y+(chy*row_last_day), show_time_string(flight_time_last), 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)
	
end

local function show_last_flights(wgt)
-- Display the number of flights from the last flight day

	lcd.drawText(flights_X, wgt.zone.y+(chy*row_last_day), flight_count_last, 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)
end

local function show_flights(wgt)
-- total flights

	lcd.drawText(flights_X,wgt.zone.y+(chy*row_total_flights), flight_count, 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)
		
end

local function show_total_flighttime(wgt)
-- Show the total flight time

	lcd.drawText(times_X,wgt.zone.y+(chy*row_total_flights), show_time_string(flight_total_time), 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)

end

local function get_gvar_totalflights()
-- retrieve the total flight count from the global variables (GVARs)
-- the flight count is stored in GV8 FM0 and FM1

	flight_count = calc_flight_totals(model.getGlobalVariable(7,0),model.getGlobalVariable(7,1))
		
end

local function get_gvar_flightslast()
-- retrieve the total flights from the last day from the GVARs

	flight_count_last = calc_flight_totals(model.getGlobalVariable(8,5),model.getGlobalVariable(8,6))
	
end

local function start_flight_trigger(altitude)
-- check for inflight-start status
	if manual_trigger() == 0 and altitude>height_trigger then
		return true
	elseif manual_trigger() == 2 then
		return true
	end
	
	return false
end
local function end_flight_trigger(altitude)
-- check for inflight-end status
	
	if manual_trigger() == 0 and altitude<height_trigger then
		return true
	elseif manual_trigger() == 1 then
		return true
	end
	
	return false
	
end

local function infT(wgt)
	local timediff
	
	altitude = getValue('Alt')
	
-- new-flight start-check
	if not inflight then	
		if start_flight_trigger(altitude) then								-- If the model is above the height_trigger then

			if inflight_start == 0 then										-- set the time the trigger was first detected
				inflight_start = getTime()	
				flighttime_start = inflight_start			
			else
				if (getTime() - inflight_start) > fi_time then 				-- If the start-time has already been noted, then if the model has been above the trigger height long enough count it as a flight
					inflight = true											-- And set "inflight" to true, noting that the model is currently in "a flight"
					flight_count = flight_count + 1			
					flight_count_today = flight_count_today + 1
					inflight_end = 0	
				end
			end
		else
			inflight_start = 0												-- Any time the altitude is below the trigger_height while not in "a flight" then reset the in-flight start time to 0
		end
	end
	
-- end-of-flight check
	if inflight then														-- If currently in a "flight", check for flight termination
		if end_flight_trigger(altitude) then								-- a flight terminates when the model drops below the trigger height
			if inflight_end == 0 then										-- and stays below that height for a specified time
			inflight_end = getTime()
				flighttime_end = inflight_end
			else
				if getTime() - inflight_end > ft_time  then					-- once the specified time elapses,
					inflight = false										-- terminate the flight officially					
					-- Calculate the actual flight-time
					timediff = flighttime_end - flighttime_start			-- calculate the length of the flight in seconds
					creatett(timediff,flight_time_current,true)				-- load the current flight time (HMS)
					creatett(timediff,flight_total_time,false)				-- load the total flight time (HMS)
					creatett(timediff,flight_time_today,false)				-- load today's flight time (HMS)
										
					-- Store the totals in the GVARs
					set_gvar_totalflights()				
					set_gvar_totaltime()
					set_gvar_flightstoday()
					set_gvar_timetoday()
					
					-- reset variables for the next flight 
					inflight_start = 0						
					inflight_end = 0
					flighttime_end = 0
					flighttime_start = 0		
				end
			end
		else	
			inflight_end = 0				
		end
	end
	
end


local function create(zone, options)
-- Create the widget
  local wgt = {
    zone = zone,
    options = options,
    counter = 0,
    shadowed = 0,
	no_telem_blink = 0,
 }

	checkinit()
	flight_time_current[1]=0
	flight_time_current[2]=0
	flight_time_current[3]=0

	fi_time = (flight_initiate_time * 100) - 1
	ft_time = (flight_terminate_time * 100) - 1
	
    get_gvar_totalflights()
	get_gvar_totaltime()
	
	get_gvar_timelast()
	get_gvar_flightslast()
	
	
	check_sensor()
	configuretoday()
	
	wx = wgt.zone.x
	wy = wgt.zone.y
	
	return wgt
end

local function round(num, numDecimalPlaces)
-- round the value num to the specified decimal places
  local mult = 10^(numDecimalPlaces or 0)
  return math.floor(num * mult + 0.5) / mult
end

local function update(wgt, options)
-- This function allow updates when you change widgets settings
  if (wgt == nil) then
    return
  end

  wgt.options = options

	configMe(wgt)
	
end

local function background(wgt)
-- This function runs in the background
  if (wgt == nil) then
    return
  end
	configMe(wgt)
	infT(wgt)
	
end

local function centerpoint(crs,wgt)
-- return the center reference point of the widget

  if (wgt == nil) then
    return
  end

	local c = round(wgt.zone.x+(wgt.zone.w / 2),0)
	local chx = 10
	local x = c - ((crs*chx)/2)
	
	return x
	
end

local function titleline(wgt)
-- show the title line 
	local minfo = model.getInfo()
	local mname = minfo.name
	local hdrline = mname .. " Flight Log"
	local sp = string.len(hdrline)
	
	if force_manual then 
	   hdrline = mname .. " Flight Log*"
	end
	
	lcd.drawText(centerpoint(18,wgt),wgt.zone.y*1, hdrline, 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)
	
	return
end

local function columnheaders(wgt)
-- show the top column titles/headers

	lcd.drawText(flights_X-20,wgt.zone.y+(chy*row_headers), "Flights", 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)
	lcd.drawText(times_X,wgt.zone.y+(chy*row_headers), "Time", 0 + CUSTOM_COLOR + LEFT + wgt.shadowed + wgt.no_telem_blink)
	
	return
end

local function leftcol(wgt)
-- show the left column
	local chx = 140	-- right edge of column 1
	local mm = model.getGlobalVariable(6,7)	
	local dd = model.getGlobalVariable(6,8)
	local dStr = "-----"
	
	
	lcd.drawText(chx,wgt.zone.y+(chy*row_current), "Last Flight", 0 + CUSTOM_COLOR + RIGHT + wgt.shadowed + wgt.no_telem_blink)
	lcd.drawText(chx,wgt.zone.y+(chy*row_today), "Today", 0 + CUSTOM_COLOR + RIGHT + wgt.shadowed + wgt.no_telem_blink)
	lcd.drawText(chx,wgt.zone.y+(chy*row_total_flights), "Total", 0 + CUSTOM_COLOR + RIGHT + wgt.shadowed + wgt.no_telem_blink)
	
	if mm == 0 or dd == 0 then
		dStr = "-----"
	else
		if dateformat == 0 then
			dStr = string.format("%02d",mm) .. "-" .. string.format("%02d",dd)
		else
			dStr = string.format("%02d",dd) .. "-" .. string.format("%02d",mm)
		end
	end
	lcd.drawText(chx,wgt.zone.y+(chy*row_last_day), dStr, 0 + CUSTOM_COLOR + RIGHT + wgt.shadowed + wgt.no_telem_blink)
	
	return
end

local function refresh(wgt)

  if (wgt == nil) then
    return
  end
  
  if wgt.options.Shadow == 1 then
    wgt.shadowed = SHADOWED
  else
    wgt.shadowed = 0
  end

	configMe(wgt)

	lcd.setColor( CUSTOM_COLOR, wgt.options.Color )  
  
	titleline(wgt)	-- show the title/header line
	columnheaders(wgt)	-- show the column headers/titles
	leftcol(wgt)	-- show the left column text
	
	get_gvar_timetoday()
	
	show_flights(wgt) -- show flights
	show_current_flighttime(wgt)
	show_total_flighttime(wgt)
	
	show_todays_flights(wgt)
	show_todays_times(wgt)
	
	show_last_flights(wgt)
	show_last_times(wgt)
	
	infT(wgt)
	
end

return { name = "flight-log",  options = _options, create = create, update = update, background = background, refresh = refresh }
Last edited by vulturetec; Aug 09, 2020 at 01:49 PM.
Sign up now
to remove ads between posts


Quick Reply
Message:
Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion new widget for horus and T16 on opentx bobcolo Radios 5 Mar 21, 2020 11:43 AM
Help! OpenTX Lua Widget, SHADOWED and BLINK not working on Horus Hobby4Life Radios 0 Aug 12, 2019 06:26 AM
Discussion OpenTX - Is there a way to change the text name of Value Widget on X10S? KiloOne Radios 0 Jun 20, 2019 09:38 AM