mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2025-04-20 18:16:30 +02:00
Log firmware version in wifibox.log
This commit is contained in:
parent
f5bf9c279d
commit
8dc3be6199
12
src/main.lua
12
src/main.lua
@ -1,4 +1,4 @@
|
|||||||
---
|
----
|
||||||
-- Entry code of the REST API and secondary functionality.
|
-- Entry code of the REST API and secondary functionality.
|
||||||
-- Primarily, this sets up the environment, processes a REST request and responds appropiately.
|
-- Primarily, this sets up the environment, processes a REST request and responds appropiately.
|
||||||
-- Secondary functions are to auto-switch between access point and client (@{setupAutoWifiMode})
|
-- Secondary functions are to auto-switch between access point and client (@{setupAutoWifiMode})
|
||||||
@ -15,6 +15,12 @@ local RequestClass = require('rest.request')
|
|||||||
local ResponseClass = require('rest.response')
|
local ResponseClass = require('rest.response')
|
||||||
local Signin = require('network.signin')
|
local Signin = require('network.signin')
|
||||||
|
|
||||||
|
-- NOTE: the updater module 'detects' command-line invocation by existence of 'arg', so we have to make sure it is not defined.
|
||||||
|
argStash = arg
|
||||||
|
arg = nil
|
||||||
|
local updater = require('script.d3d-updater')
|
||||||
|
arg = argStash
|
||||||
|
|
||||||
local postData = nil
|
local postData = nil
|
||||||
|
|
||||||
|
|
||||||
@ -185,6 +191,10 @@ local function main(environment)
|
|||||||
local rq = RequestClass.new(environment, postData, confDefaults.DEBUG_API)
|
local rq = RequestClass.new(environment, postData, confDefaults.DEBUG_API)
|
||||||
|
|
||||||
if rq:getRequestMethod() == 'CMDLINE' and rq:get('autowifi') ~= nil then
|
if rq:getRequestMethod() == 'CMDLINE' and rq:get('autowifi') ~= nil then
|
||||||
|
|
||||||
|
local version = updater.formatVersion(updater.getCurrentVersion());
|
||||||
|
log:info("Doodle3D version: "..util.dump(version))
|
||||||
|
|
||||||
log:info("running in autowifi mode")
|
log:info("running in autowifi mode")
|
||||||
local rv,msg = setupAutoWifiMode()
|
local rv,msg = setupAutoWifiMode()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user