Skip to content

Latest commit

 

History

History
52 lines (30 loc) · 1.17 KB

getGeneralSettings.md

File metadata and controls

52 lines (30 loc) · 1.17 KB

getGeneralSettings()

Returns (some of) the general radio settings

@status current Introduced in 2.0.6, imperial added in TODO

Parameters

none

Return value

  • table with elements:
  • battMin (number) radio battery range - minimum value
  • battMax (number) radio battery range - maximum value
  • imperial (number) set to a value different from 0 if the radio is set to the IMPERIAL units

Examples

general/getGeneralSettings-example

local function run(e)
  local settings = getGeneralSettings()
  lcd.clear()
  lcd.drawText(1,1,"getGeneralSettings() example",0)
  lcd.drawText(1,11,"battMin: ", 0)
  lcd.drawText(lcd.getLastPos()+2,11,settings['battMin'],0)
  lcd.drawText(1,21,"battMax: ", 0)
  lcd.drawText(lcd.getLastPos()+2,21,settings['battMax'],0)
  lcd.drawText(1,31,"imperial: ", 0)
  lcd.drawText(lcd.getLastPos()+2,31,settings['imperial'],0)
end

return{run=run}