gluon-config-mode gluon-core: fix incorrect gluon.platform reference
The is_outdoor function is placed inside the gluon.platform module, not the platform_info module. Currently, the outdoor-mode wizard component and the upgrade script fail due to nil-value calls.
This commit is contained in:
parent
dca50d2f26
commit
1aa4ffc514
@ -1,7 +1,7 @@
|
|||||||
return function(form, uci)
|
return function(form, uci)
|
||||||
local platform_info = require 'platform_info'
|
local platform = require 'gluon.platform'
|
||||||
|
|
||||||
if not platform_info.is_outdoor_device() then
|
if not platform.is_outdoor_device() then
|
||||||
-- only visible on wizard for outdoor devices
|
-- only visible on wizard for outdoor devices
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -12,7 +12,7 @@ if uci:get('gluon', 'wireless', 'outdoor') ~= nil then
|
|||||||
end
|
end
|
||||||
|
|
||||||
local sysconfig = require 'gluon.sysconfig'
|
local sysconfig = require 'gluon.sysconfig'
|
||||||
local platform_info = require 'platform_info'
|
local platform = require 'gluon.platform'
|
||||||
|
|
||||||
local config = site.wifi5.outdoors('preset')
|
local config = site.wifi5.outdoors('preset')
|
||||||
local outdoor = false
|
local outdoor = false
|
||||||
@ -22,7 +22,7 @@ if sysconfig.gluon_version then
|
|||||||
outdoor = false
|
outdoor = false
|
||||||
elseif config == 'preset' then
|
elseif config == 'preset' then
|
||||||
-- enable outdoor mode through presets on new installs
|
-- enable outdoor mode through presets on new installs
|
||||||
outdoor = platform_info.is_outdoor_device()
|
outdoor = platform.is_outdoor_device()
|
||||||
else
|
else
|
||||||
-- enable/disable outdoor mode unconditionally on new installs
|
-- enable/disable outdoor mode unconditionally on new installs
|
||||||
outdoor = config
|
outdoor = config
|
||||||
|
Loading…
Reference in New Issue
Block a user