Skip to content

system.voltageRange

since 1.5.16

Return the Radio voltage range.

local min = system.voltageRange()

Parameters

None.

Returns

min (number) and max (number)

Real-world usage

Called 2 times across 2 open-source Ethos Lua projects. A few short excerpts:
function utils.getTxBatteryVoltageRange()
  if system and system.voltageRange then
    local vmin, vmax = system.voltageRange()
    if vmin and vmax and vmin < vmax then return vmin, vmax end
  end
  return 7.2, 8.4
end

src/rfsuite/widgets/dashboard/context.lua:1315