Debug
parent
4b371e1f18
commit
1cf5a07761
|
|
@ -272,6 +272,8 @@ exports.getStats = function(statIDs, options) {
|
||||||
state.notifyTime = options.notifyTime;
|
state.notifyTime = options.notifyTime;
|
||||||
state.notifyDist = options.notifyDist;
|
state.notifyDist = options.notifyDist;
|
||||||
state.notifySteps = options.notifySteps;
|
state.notifySteps = options.notifySteps;
|
||||||
|
console.log("options:");
|
||||||
|
console.log(JSON.stringify(options));
|
||||||
if (options.notifyTime) {
|
if (options.notifyTime) {
|
||||||
state.nextNotifyTime = state.startTime + options.notifyTime;
|
state.nextNotifyTime = state.startTime + options.notifyTime;
|
||||||
}
|
}
|
||||||
|
|
@ -281,6 +283,8 @@ exports.getStats = function(statIDs, options) {
|
||||||
if (options.notifySteps) {
|
if (options.notifySteps) {
|
||||||
state.nextNotifySteps = state.lastSteps + options.notifySteps;
|
state.nextNotifySteps = state.lastSteps + options.notifySteps;
|
||||||
}
|
}
|
||||||
|
console.log("state:");
|
||||||
|
console.log(JSON.stringify(state));
|
||||||
}
|
}
|
||||||
reset();
|
reset();
|
||||||
return {
|
return {
|
||||||
|
|
@ -329,11 +333,12 @@ exports.appendMenuItems = function(menu, settings, saveSettings) {
|
||||||
saveSettings();
|
saveSettings();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
var stepNames = ['Off', '100', '500', '1000', '5000', '10000'];
|
||||||
var stepAmts = [0, 100, 500, 1000, 5000, 10000];
|
var stepAmts = [0, 100, 500, 1000, 5000, 10000];
|
||||||
menu['Ntfy Steps'] = {
|
menu['Ntfy Steps'] = {
|
||||||
min: 0, max: stepAmts.length-1,
|
min: 0, max: stepNames.length-1,
|
||||||
value: Math.max(stepAmts.indexOf(settings.notifySteps),0),
|
value: Math.max(stepAmts.indexOf(settings.notifySteps),0),
|
||||||
format: v => stepAmts[v].toString(),
|
format: v => stepNames[v],
|
||||||
onchange: v => {
|
onchange: v => {
|
||||||
settings.notifySteps = stepAmts[v];
|
settings.notifySteps = stepAmts[v];
|
||||||
saveSettings();
|
saveSettings();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue