Skip to content

Commit

Permalink
Add 1.12.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pcprince committed Nov 12, 2024
1 parent 6d618b7 commit 9e58c5e
Show file tree
Hide file tree
Showing 20 changed files with 1,901 additions and 294 deletions.
98 changes: 85 additions & 13 deletions constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* Setting parameters */

exports.configurations = [{
exports.CONFIGURATIONS = [{
trueSampleRate: 8,
clockDivider: 4,
acquisitionCycles: 16,
Expand Down Expand Up @@ -99,7 +99,7 @@ exports.configurations = [{
/* Configuration settings to be used when a device is on firmware < 1.4.4 */
/* Only sent to devices. Not used in energy calculations */

exports.oldConfigurations = [{
exports.OLD_CONFIGURATIONS = [{
trueSampleRate: 8,
clockDivider: 4,
acquisitionCycles: 16,
Expand All @@ -124,31 +124,33 @@ exports.oldConfigurations = [{

/* GPS energy consumption */

exports.GPS_FIX_TIME = 1.0 / 60.0;
exports.GPS_FIX_TIME = 0.5 / 60.0;
exports.GPS_FIX_CONSUMPTION = 30.0;

exports.MINIMUM_GPS_FIX_TIME = 30;

/* Packet lengths for each version */

exports.packetLengthVersions = [{
firmwareVersion: '0.0.0',
exports.PACKET_LENGTH_VERSIONS = [{
firmwareVersion: [0, 0, 0],
packetLength: 39
}, {
firmwareVersion: '1.2.0',
firmwareVersion: [1, 2, 0],
packetLength: 40
}, {
firmwareVersion: '1.2.1',
firmwareVersion: [1, 2, 1],
packetLength: 42
}, {
firmwareVersion: '1.2.2',
firmwareVersion: [1, 2, 2],
packetLength: 43
}, {
firmwareVersion: '1.4.0',
firmwareVersion: [1, 4, 0],
packetLength: 58
}, {
firmwareVersion: '1.5.0',
firmwareVersion: [1, 5, 0],
packetLength: 59
}, {
firmwareVersion: '1.6.0',
firmwareVersion: [1, 6, 0],
packetLength: 62
}];

Expand Down Expand Up @@ -194,10 +196,80 @@ exports.getFirmwareClassification = (desc) => {

};

/**
* @returns -1: A < B, 0: A === B, 1: A > B
*/
function compareSemanticVersion (version, major, minor, patch) {

for (let i = 0; i < 3; i++) {

const versionNumber = parseInt(version[i]);

const comparator = i === 0 ? major : i === 1 ? minor : patch;

if (versionNumber > comparator) {

return 1;

} else if (versionNumber < comparator) {

return -1;

}

}

return 0;

}

exports.compareSemanticVersion = compareSemanticVersion;

exports.isOlderSemanticVersion = (version, major, minor, patch) => {

return compareSemanticVersion(version, major, minor, patch) === -1;

};

exports.isNewerSemanticVersion = (version, major, minor, patch) => {

return compareSemanticVersion(version, major, minor, patch) === 1;

};

exports.isSameSemanticVersion = (version, major, minor, patch) => {

return compareSemanticVersion(version, major, minor, patch) === 0;

};

exports.isOlderOrEqualSemanticVersion = (version, major, minor, patch) => {

const comparisonResult = compareSemanticVersion(version, major, minor, patch);

return comparisonResult === -1 || comparisonResult === 0;

};

exports.isNewerOrEqualSemanticVersion = (version, major, minor, patch) => {

const comparisonResult = compareSemanticVersion(version, major, minor, patch);

return comparisonResult === 0 || comparisonResult === 1;

};

/* Version number for the latest firmware */

exports.latestFirmwareVersionArray = ['1', '10', '0'];
exports.latestFirmwareVersionString = '1.10.0';
const LATEST_FIRMWARE_VERSION_MAJOR = 1;
const LATEST_FIRMWARE_VERSION_MINOR = 11;
const LATEST_FIRMWARE_VERSION_PATCH = 0;

exports.LATEST_FIRMWARE_VERSION_MAJOR = LATEST_FIRMWARE_VERSION_MAJOR;
exports.LATEST_FIRMWARE_VERSION_MINOR = LATEST_FIRMWARE_VERSION_MINOR;
exports.LATEST_FIRMWARE_VERSION_PATCH = LATEST_FIRMWARE_VERSION_PATCH;
exports.LATEST_FIRMWARE_VERSION_ARRAY = [LATEST_FIRMWARE_VERSION_MAJOR, LATEST_FIRMWARE_VERSION_MINOR, LATEST_FIRMWARE_VERSION_PATCH];
exports.LATEST_FIRMWARE_VERSION_STRING = LATEST_FIRMWARE_VERSION_MAJOR.toString() + '.' + LATEST_FIRMWARE_VERSION_MINOR.toString() + '.' + LATEST_FIRMWARE_VERSION_PATCH.toString();

/* Time zone modes */

Expand Down
68 changes: 59 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,25 @@
<div class="row" style="margin-top: 2px;">

<ul class="nav nav-tabs nav-justified" style="width: 100%; font-size: 10pt; font-family: Helvetica, Arial, sans-serif;" role="tablist">
<li class="nav-item" style="margin-left: 10px; margin-right: 10px;">
<li class="nav-item" style="margin-left: 8px; margin-right: 8px;">
<a class="nav-link active" data-bs-toggle="tab" data-bs-target="#settings-tab" id="settings-tab-link" aria-label="Recording tab" role="tab">Recording</a>
</li>

<li class="nav-item" style="margin-right: 10px;">
<li class="nav-item" style="margin-right: 8px;">
<a class="nav-link" data-bs-toggle="tab" data-bs-target="#schedule-tab" id="schedule-tab-link" aria-label="Schedule tab" role="tab">Schedule</a>
</li>

<li class="nav-item" style="margin-right: 10px;">
<li class="nav-item" style="margin-right: 8px;">
<a class="nav-link" data-bs-toggle="tab" data-bs-target="#filtering-tab" id="filter-tab-link" aria-label="Filter tab" role="tab">Filtering</a>
</li>

<li class="nav-item" style="margin-right: 10px;">
<li class="nav-item" style="margin-right: 8px;">
<a class="nav-link" data-bs-toggle="tab" data-bs-target="#advanced-tab" id="device-tab-link" aria-label="Advanced tab" role="tab">Advanced</a>
</li>

<li class="nav-item" style="margin-right: 8px;">
<a class="nav-link" data-bs-toggle="tab" data-bs-target="#addons-tab" id="addons-tab-link" aria-label="GPS tab" role="tab">Add-ons</a>
</li>
</ul>
</div>

Expand Down Expand Up @@ -851,7 +855,16 @@
<input id="acoustic-config-checkbox" name="RequireChime" type="checkbox" style="margin-right: 16px;">
</div>
</div>


<div class="row" style="margin-top: 8px; margin-bottom: 8px;">
<div class="col-9" style="text-align: left;">
<label for="filename-device-id-checkbox" style="margin-left: 17px; margin-bottom: 0px;">Use device ID as prefix in WAV file name:</label>
</div>
<div class="col-3" style="text-align: right;" title="Whether the device ID is added to filenames as a prefix.">
<input id="filename-device-id-checkbox" name="DeviceIDFilenames" type="checkbox" style="margin-right: 16px;">
</div>
</div>

<div class="row" style="margin-top: 8px; margin-bottom: 8px;">
<div class="col-9" style="text-align: left;">
<label for="daily-folder-checkbox" style="margin-left: 17px; margin-bottom: 0px;">Use daily folder for generated WAV files:</label>
Expand Down Expand Up @@ -893,6 +906,14 @@
</div>
</div>

<!-- Advanced content end -->

</div>

<div role="tabpanel" class="tab-pane fade in" id="addons-tab" role="tabpanel" style="width: 100%;">

<!-- Addon content start -->

<div style="border: #cdcdcd thin solid; margin-top: 8px;">
<div class="row" style="margin-top: 8px; margin-bottom: 8px;">
<div class="col-9" style="text-align: left;">
Expand All @@ -902,19 +923,48 @@
<input id="magnetic-delay-checkbox" name="MagneticSwitchDelayedStart" type="checkbox" style="margin-right: 16px;">
</div>
</div>
</div>

<div style="border: #cdcdcd thin solid; margin-top: 8px;">
<div class="row" style="margin-top: 8px; margin-bottom: 8px;">
<div class="col-9" style="text-align: left;">
<label for="gps-time-checkbox" style="margin-left: 17px; margin-bottom: 0px;">Enable GPS for time and location setting:</label>
</div>
<div class="col-3" style="text-align: right;" title="Whether the GPS can be used to update the device's clock and location.">
<input id="gps-time-checkbox" name="GPSTimeSetting" type="checkbox" style="margin-right: 16px;">
<input id="gps-time-checkbox" type="checkbox" style="margin-right: 16px;">
</div>
</div>
<div class="row" style="margin-top: 0px; margin-bottom: 8px;">
<div class="col-7" style="text-align: left;">
<label for="gps-before-after-select" style="margin-left: 17px; margin-bottom: 0px; color: grey; height: 100%; display: flex; align-items: center;" id="gps-before-after-label">Acquire GPS fix before and after:</label>
</div>
<div class="col-5" style="text-align: right; padding-right: 28px;" title="Whether to obtain a GPS fix between each recording within a period.">
<select class="form-select" id="gps-before-after-select" style="max-height: 32px; font-size: 10pt; color: grey;" disabled>
<option selected value="period">Recording periods</option>
<option value="individual">Individual recordings</option>
</select>
</div>
</div>
<div class="row" style="margin-top: 0px; margin-bottom: 8px;">
<div class="col-9" style="text-align: left;">
<label for="gps-time-select" style="margin-left: 17px; margin-bottom: 0px; color: grey; height: 100%; display: flex; align-items: center;" id="gps-time-label">GPS fix time (mins):</label>
</div>
<div class="col-3" style="text-align: right; padding-right: 28px;">
<select class="form-select" id="gps-time-select" style="max-height: 32px; font-size: 10pt; color: grey;" disabled>
<option value="1">1</option>
<option selected value="2">2</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
</select>
</div>
</div>
</div>

<!-- Advanced content end -->

<!-- Addon content end -->

</div>

</div>

<div class="fixed-bottom" style="padding: 8px; padding-top: 8px;">
Expand Down
Loading

0 comments on commit 9e58c5e

Please sign in to comment.