Skip to content

Commit

Permalink
Add 1.7.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pcprince committed May 16, 2022
1 parent fb84fef commit e1370ee
Show file tree
Hide file tree
Showing 17 changed files with 1,897 additions and 646 deletions.
12 changes: 6 additions & 6 deletions builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ argTarget = process.argv[2];
switch (argTarget) {

case 'win':
case 'win64':
console.log('Using build configuration to Windows (64-bit).');
case 'win32':
console.log('Using build configuration to Windows (32-bit).');
target = Platform.WINDOWS.createTarget();
config = {
win: {
target: [
{
target: 'nsis',
arch: 'x64'
arch: 'ia32'
}
]
}
};
break;
case 'win32':
console.log('Using build configuration to Windows (32-bit).');
case 'win64':
console.log('Using build configuration to Windows (64-bit).');
target = Platform.WINDOWS.createTarget();
config = {
win: {
target: [
{
target: 'nsis',
arch: 'ia32'
arch: 'x64'
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,5 @@ exports.getFirmwareClassification = (desc) => {

/* Version number for the latest firmware */

exports.latestFirmwareVersionArray = [1, 7, 0];
exports.latestFirmwareVersionString = '1.7.0';
exports.latestFirmwareVersionArray = [1, 8, 0];
exports.latestFirmwareVersionString = '1.8.0';
2 changes: 1 addition & 1 deletion expansion/uiExpansion.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const audiomothUtils = require('audiomoth-utils');
const MAX_LENGTHS = [5, 10, 15, 30, 60, 300, 600, 3600];
const MAX_LENGTH_STRINGS = ['5 seconds', '10 seconds', '15 seconds', '30 seconds', '1 minute', '5 minutes', '10 minutes', '1 hour'];

const FILE_REGEX = /^\d\d\d\d\d\d\d\d_\d\d\d\d\d\dT.WAV$/;
const FILE_REGEX = /^(\d\d\d\d\d\d\d\d_)?\d\d\d\d\d\dT.WAV$/;

const durationTabButton = document.getElementById('duration-tab-link');
const eventTabButton = document.getElementById('event-tab-link');
Expand Down
2 changes: 1 addition & 1 deletion expansion/uiSplit.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var currentWindow = electron.remote.getCurrentWindow();

const MAX_LENGTHS = [5, 10, 15, 30, 60, 300, 600, 3600];

const FILE_REGEX = /^\d\d\d\d\d\d\d\d_\d\d\d\d\d\d.WAV$/;
const FILE_REGEX = /^(\d\d\d\d\d\d\d\d_)?\d\d\d\d\d\d.WAV$/;

const maxLengthRadios = document.getElementsByName('max-length-radio');

Expand Down
23 changes: 14 additions & 9 deletions lifeDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function getDailyCounts (timePeriods, recSecs, sleepSecs) {
recordingTimes: recordingTimes,
sleepTime: totalSleepTime,
containsTruncatedRecording: containsTruncatedRecording
}
};

}

Expand Down Expand Up @@ -145,7 +145,9 @@ function getFileSize (sampleRate, sampleRateDivider, secs) {

/* Update storage and energy usage values in life display box */

exports.updateLifeDisplay = (schedule, configuration, recLength, sleepLength, amplitudeThresholdingEnabled, dutyEnabled, energySaverChecked, gpsEnabled) => {
exports.updateLifeDisplay = (schedule, configuration, recLength, sleepLength, amplitudeThresholdingEnabled, frequencyTriggerEnabled, dutyEnabled, energySaverChecked, gpsEnabled) => {

const thresholdingEnabled = amplitudeThresholdingEnabled || frequencyTriggerEnabled;

/* If no recording periods exist, do not perform energy calculations */

Expand All @@ -159,21 +161,20 @@ exports.updateLifeDisplay = (schedule, configuration, recLength, sleepLength, am

const energySaverEnabled = energySaverChecked && (configuration.trueSampleRate <= 48);

const fileOpenTime = 0.5;
const fileOpenEnergy = energySaverEnabled ? 35.0 : 40.0;
const waitTime = 0.5;
const waitTime = 0.25;
const waitEnergy = energySaverEnabled ? 7.0 : 10.0;

const sleepCurrent = 0.16;
const sleepCurrent = 0.1;
const recordingCurrent = energySaverEnabled ? configuration.energySaverRecordCurrent : configuration.recordCurrent;
const listenCurrent = energySaverEnabled ? configuration.energySaverListenCurrent : configuration.listenCurrent;

let preparationInstances = 0;

/* It's possible for file sizes to vary but overall storage consumption be known, so whether or not 'up to' is used in two locations in the information text varies */

let upToFile = amplitudeThresholdingEnabled;
const upToTotal = amplitudeThresholdingEnabled;
let upToFile = thresholdingEnabled;
const upToTotal = thresholdingEnabled;

let totalSleepTime = 0;
let totalSize = 0;
Expand Down Expand Up @@ -224,7 +225,7 @@ exports.updateLifeDisplay = (schedule, configuration, recLength, sleepLength, am

/* If the periods differ in size, include 'up to' when describing the file size. If amplitude thresholding is enabled, it already will include this */

if (i > 0 && !amplitudeThresholdingEnabled) {
if (i > 0 && !thresholdingEnabled) {

const prevPeriod = schedule[i - 1];
const prevLength = prevPeriod.endMins - prevPeriod.startMins;
Expand Down Expand Up @@ -322,6 +323,10 @@ exports.updateLifeDisplay = (schedule, configuration, recLength, sleepLength, am

}

/* Use the file count to work out the average file open time if daily folders are enabled */

const fileOpenTime = 0.5 + 3.5 * (totalRecCount / 10000) / 2;

/* Add all the time outside the schedule as sleep time */

totalSleepTime += Math.max(0, 86400 - preparationInstances - totalRecLength - totalSleepTime);
Expand All @@ -344,7 +349,7 @@ exports.updateLifeDisplay = (schedule, configuration, recLength, sleepLength, am

}

if (amplitudeThresholdingEnabled) {
if (thresholdingEnabled) {

let minEnergyUsed = 0;

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AudioMoth-Config",
"version": "1.6.0",
"version": "1.7.0",
"description": "The configuration app for the AudioMoth acoustic monitoring device.",
"main": "main.js",
"author": "openacousticdevices.info",
Expand Down Expand Up @@ -68,7 +68,7 @@
},
"dependencies": {
"audiomoth-hid": "^2.1.0",
"audiomoth-utils": "^1.0.3",
"audiomoth-utils": "^1.1.0",
"bootstrap": "4.3.1",
"bootstrap-slider": "^10.6.2",
"electron-debug": "3.0.1",
Expand Down
Loading

0 comments on commit e1370ee

Please sign in to comment.