0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-06-26 03:21:22 +02:00

Log firmware version in wifibox.log

This commit is contained in:
peteruithoven 2013-12-13 14:23:31 +01:00
parent f5bf9c279d
commit 8dc3be6199

View File

@ -1,4 +1,4 @@
---
----
-- Entry code of the REST API and secondary functionality.
-- 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})
@ -15,6 +15,12 @@ local RequestClass = require('rest.request')
local ResponseClass = require('rest.response')
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
@ -185,6 +191,10 @@ local function main(environment)
local rq = RequestClass.new(environment, postData, confDefaults.DEBUG_API)
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")
local rv,msg = setupAutoWifiMode()