Print the current active version into the mcopy.state object

This commit is contained in:
mmcwilliams 2019-03-21 21:32:33 -04:00
parent aef8709ab0
commit 97f1464106
2 changed files with 4 additions and 2 deletions

View File

@ -2482,6 +2482,7 @@ const fs = require('fs');
const uuid = require('uuid'); const uuid = require('uuid');
const moment = require('moment'); const moment = require('moment');
const humanizeDuration = require('humanize-duration'); const humanizeDuration = require('humanize-duration');
const PACKAGE = require('./package.json');
const cfg = require('./data/cfg.json'); const cfg = require('./data/cfg.json');
const gui = require('./lib/ui'); const gui = require('./lib/ui');
const grid = require('./lib/ui/grid.js'); const grid = require('./lib/ui/grid.js');
@ -2501,7 +2502,7 @@ let log;
State shared by ALL interfaces State shared by ALL interfaces
*******/ *******/
mcopy.state = { mcopy.state = {
version : '2.0.0', //use for file compatibility check version : PACKAGE.version, //use for file compatibility check
camera : { camera : {
pos : 0, pos : 0,
direction: true direction: true

View File

@ -8,6 +8,7 @@ const fs = require('fs');
const uuid = require('uuid'); const uuid = require('uuid');
const moment = require('moment'); const moment = require('moment');
const humanizeDuration = require('humanize-duration'); const humanizeDuration = require('humanize-duration');
const PACKAGE = require('./package.json');
const cfg = require('./data/cfg.json'); const cfg = require('./data/cfg.json');
const gui = require('./lib/ui'); const gui = require('./lib/ui');
const grid = require('./lib/ui/grid.js'); const grid = require('./lib/ui/grid.js');
@ -27,7 +28,7 @@ let log;
State shared by ALL interfaces State shared by ALL interfaces
*******/ *******/
mcopy.state = { mcopy.state = {
version : '2.0.0', //use for file compatibility check version : PACKAGE.version, //use for file compatibility check
camera : { camera : {
pos : 0, pos : 0,
direction: true direction: true