Skip to content

Commit

Permalink
Remove 240kHz sample rate
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenAcousticDevices committed Sep 18, 2017
1 parent e1d8ebb commit 7e72809
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 22 deletions.
9 changes: 1 addition & 8 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ var configurations = [{
acquisitionCycles: 1,
oversampleRate: 4,
current: 18.1
}, {
sampleRate: 240000,
clockBand: AM_HFRCO_28MHZ,
clockDivider: 2,
acquisitionCycles: 1,
oversampleRate: 4,
current: 20.0
}, {
sampleRate: 320000,
clockBand: AM_HFXO,
Expand Down Expand Up @@ -290,4 +283,4 @@ setTimeout(getAudioMothPacket, 1000);

configureButton.addEventListener('click', function () {
ui.checkInputs(configureDevice);
});
});
6 changes: 1 addition & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
<td align="center" style='padding: 2px'>48</td>
<td align="center" style='padding: 2px'>96</td>
<td align="center" style='padding: 2px'>192</td>
<td id='sample-rate-240-label' align="center" style='padding: 2px; color: lightgray'>240</td>
<td id='sample-rate-320-label' align="center" style='padding: 2px; color: lightgray'>320</td>
<td id='sample-rate-400-label' align="center" style='padding: 2px; color: lightgray'>400</td>
</tr>
Expand All @@ -111,14 +110,12 @@
<td align="center" style='padding-top: 0px'><input type="radio" id="sample-rate-radio5" value=5 name="sample-rate-radio"></td>
<td align="center" style='padding-top: 0px'><input type="radio" id="sample-rate-radio6" value=6 name="sample-rate-radio" disabled></td>
<td align="center" style='padding-top: 0px'><input type="radio" id="sample-rate-radio7" value=7 name="sample-rate-radio" disabled></td>
<td align="center" style='padding-top: 0px'><input type="radio" id="sample-rate-radio8" value=8 name="sample-rate-radio" disabled></td>
</tr>
</tr>
<tr style='font-size: 11px;'>
<td align="center" style='padding: 2px'></td>
<td align="center" style='padding: 2px'></td>
<td align="center" style='padding: 2px'></td>
<td align="center" style='padding: 2px'></td>
<td align="center" style='padding: 2px'></td>
<td align="center" style='padding: 2px'>Low</td>
<td align="center" style='padding: 2px'></td>
<td align="center" style='padding: 2px'>Med</td>
Expand All @@ -129,7 +126,6 @@
<td align="left" style='padding-top: 0px'>Gain:</td>
<td align="center" style='padding-top: 0px'></td>
<td align="center" style='padding-top: 0px'></td>
<td align="center" style='padding-top: 0px'></td>
<td align="center" style='padding-top: 0px'></td>
<td align="center" style='padding-top: 0px'><input type="radio" id="gain-radio0" value=0 name="gain-radio"></td>
<td align="center" style='padding-top: 0px'><input type="radio" id="gain-radio1" value=1 name="gain-radio"></td>
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",
"version": "1.0.3",
"version": "1.0.4",
"description": "The configuration app for the AudioMoth acoustic monitoring device.",
"main": "main.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion saveLoad.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@ function useLoadedConfiguration(err, data) {

sampleRateRadios = document.getElementsByName("sample-rate-radio");
sampleRateRadios[jsonObj.sampleRateIndex].checked = true;
if(jsonObj.sampleRateIndex > 6){

if (jsonObj.sampleRateIndex >= 6) {
ui.enableHighSamplingRate();
}

gainRadios = document.getElementsByName("gain-radio");
gainRadios[jsonObj.gainIndex].checked = true;

Expand Down
10 changes: 3 additions & 7 deletions ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ var endTimeInput = document.getElementById('end-time-input');
var recordingDurationInput = document.getElementById('recording-duration-input');
var sleepDurationInput = document.getElementById('sleep-duration-input');

var sampleRate240Label = document.getElementById('sample-rate-240-label');
var sampleRate320Label = document.getElementById('sample-rate-320-label');
var sampleRate400Label = document.getElementById('sample-rate-400-label');

var sampleRate240RadioButton = document.getElementById('sample-rate-radio6');
var sampleRate320RadioButton = document.getElementById('sample-rate-radio7');
var sampleRate400RadioButton = document.getElementById('sample-rate-radio8');
var sampleRate320RadioButton = document.getElementById('sample-rate-radio6');
var sampleRate400RadioButton = document.getElementById('sample-rate-radio7');

var configureButton = document.getElementById('configure-button');

Expand Down Expand Up @@ -202,11 +200,9 @@ exports.enableDisplayAndShowTime = function (date) {

exports.enableHighSamplingRate = function () {

sampleRate240Label.style.color = 'black';
sampleRate320Label.style.color = 'black';
sampleRate400Label.style.color = 'black';

sampleRate240RadioButton.removeAttribute("disabled");
sampleRate320RadioButton.removeAttribute("disabled");
sampleRate400RadioButton.removeAttribute("disabled");

Expand Down Expand Up @@ -447,4 +443,4 @@ sleepDurationInput.addEventListener('change', function () {

recordingDurationInput.addEventListener('change', function () {
checkInputs(lifeDisplay.updateLifeDisplay);
});
});

0 comments on commit 7e72809

Please sign in to comment.