Feature: Disable High/Low Alarms

This commit is contained in:
Brian Hanifin
2014-07-29 15:27:10 -07:00
parent 1722f72148
commit 38edf5cfea
2 changed files with 12 additions and 8 deletions
+2 -2
View File
@@ -68,8 +68,8 @@
</dl>
<dl class="toggle">
<dt>Enable Alarms <a class="tip" original-title="When enabled the an alarm will sound when the BG falls outside of the 80-180 range."><i class="icon-help-circled"></i></a></dt>
<dd><input type="checkbox" name="alarmhigh-browser" id="alarmhigh-browser" /><label for="alarmhigh-browser">Over 180</label></dd>
<dd><input type="checkbox" name="alarmlow-browser" id="alarmlow-browser" /><label for="alarmlow-browser">Below 80 </label></dd>
<dd><input type="checkbox" name="alarmhigh-browser" id="alarmhigh-browser" /><label for="alarmhigh-browser">High Alarm</label></dd>
<dd><input type="checkbox" name="alarmlow-browser" id="alarmlow-browser" /><label for="alarmlow-browser">Low Alarm</label></dd>
</dl>
<dl class="toggle">
<dt>Night Mode <a class="tip" original-title="When enabled the page will be dimmed from 10pm - 6am."><i class="icon-help-circled"></i></a></dt>
+10 -6
View File
@@ -727,16 +727,20 @@
console.log('Client connected to server.')
});
socket.on('alarm', function () {
console.log("Alarm raised!");
currentAlarmType = 'alarm';
if (browserSettings.alarmHigh) generateAlarm(alarmSound);
if (browserSettings.alarmHigh) {
console.log("Alarm raised!");
currentAlarmType = 'alarm';
generateAlarm(alarmSound);
}
brushInProgress = false;
updateChart(false);
});
socket.on('urgent_alarm', function () {
console.log("Urgent alarm raised!");
currentAlarmType = 'urgent_alarm';
if (browserSettings.alarmLow) generateAlarm(urgentAlarmSound);
if (browserSettings.alarmLow) {
console.log("Urgent alarm raised!");
currentAlarmType = 'urgent_alarm';
generateAlarm(urgentAlarmSound);
}
brushInProgress = false;
updateChart(false);
});