bugfix: fix api when meshrf is disabled (#99)

This commit is contained in:
dman776 2021-05-05 12:53:19 -05:00 committed by GitHub
parent 8117fcc74f
commit 209f9dc3f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -76,12 +76,15 @@ end
function getStatusMeshRF()
local info={}
info['ssid']=aredn_info.getSSID()
info['device']=aredn_info.getMeshRadioDevice()
info['channel']=aredn_info.getChannel(info['device'])
info['chanbw']=aredn_info.getChannelBW(info['device'])
info['band']=aredn_info.getBand(info['device'])
info['frequency']=aredn_info.getFreq(info['device'])
local dev = aredn_info.getMeshRadioDevice()
if dev ~= "" then
info['device']= dev
info['ssid']=aredn_info.getSSID()
info['channel']=aredn_info.getChannel(info['device'])
info['chanbw']=aredn_info.getChannelBW(info['device'])
info['band']=aredn_info.getBand(info['device'])
info['frequency']=aredn_info.getFreq(info['device'])
end
return info
end