Skip to content

Commit

Permalink
Add 1.1.2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pcprince committed Jun 20, 2024
1 parent f55a993 commit ab03718
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
6 changes: 3 additions & 3 deletions js/gainControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ restoreButton.addEventListener('click', () => {

function parseListEntry (line) {

const gainRegex = /gain [0|1|2|3|4]/;
const gainRegex = / gain (0|1|2|3|4)\b/;
const gainRegexResult = gainRegex.exec(line);

if (!gainRegexResult) {
Expand All @@ -93,9 +93,9 @@ function parseListEntry (line) {

}

const gain = parseInt(gainRegexResult[0].split(' ')[1]);
const gain = parseInt(gainRegexResult[1]);

const lgrRegex = /lgr/;
const lgrRegex = / lgr\b/;
const lgrRegexResult = lgrRegex.exec(line);

let lgr = false;
Expand Down
28 changes: 15 additions & 13 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,19 +320,6 @@ const createWindow = () => {

mainWindow.webContents.send('high-sample-rate-default', menuItem.checked);

}
}, {
type: 'checkbox',
id: 'lowAmpColourScale',
label: 'Enable Low-Amplitude Colour Scale',
accelerator: 'CommandOrControl+J',
checked: false,
click: () => {

const menuItem = menu.getMenuItemById('lowAmpColourScale');

mainWindow.webContents.send('low-amp-colour-scale', menuItem.checked);

}
}, {
type: 'separator'
Expand Down Expand Up @@ -400,6 +387,21 @@ const createWindow = () => {

updateColours(COLOUR_MAP_INVERSE_MONOCHROME);

}
}, {
type: 'separator'
}, {
type: 'checkbox',
id: 'lowAmpColourScale',
label: 'Enable Low-Amplitude Colour Scale',
accelerator: 'CommandOrControl+J',
checked: false,
click: () => {

const menuItem = menu.getMenuItemById('lowAmpColourScale');

mainWindow.webContents.send('low-amp-colour-scale', menuItem.checked);

}
}]
}, {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AudioMoth-Live",
"version": "1.1.1",
"version": "1.1.2",
"description": "An Electron-based application for recording and analysing live audio from high sample rate microphones, including the AudioMoth USB Microphone.",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit ab03718

Please sign in to comment.