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() function getStatusMeshRF()
local info={} local info={}
info['ssid']=aredn_info.getSSID() local dev = aredn_info.getMeshRadioDevice()
info['device']=aredn_info.getMeshRadioDevice() if dev ~= "" then
info['channel']=aredn_info.getChannel(info['device']) info['device']= dev
info['chanbw']=aredn_info.getChannelBW(info['device']) info['ssid']=aredn_info.getSSID()
info['band']=aredn_info.getBand(info['device']) info['channel']=aredn_info.getChannel(info['device'])
info['frequency']=aredn_info.getFreq(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 return info
end end