Skip to content

Commit

Permalink
Merge pull request #67 from Universite-Gustave-Eiffel/pixljs_update
Browse files Browse the repository at this point in the history
Change to less painful tones
  • Loading branch information
nicolas-f authored Sep 23, 2024
2 parents 9a61b2b + 611ec91 commit 68387bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions services/pixljs_alert/pixljs_ble.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// force timezone to UTC+0200
const CODE_VERSION=5;
const CODE_VERSION=6;
E.setTimeZone(2);
const BUZZING_TIME = 60000; // buzzer time ms
const RESET_NO_ANSWER = 60000;
Expand Down Expand Up @@ -38,7 +38,7 @@ var formStack = [];
var question_index = 0;
var answer_index = 0;
Bluetooth.setConsole(1);
const tone_times = atob("ZHJkcmRyZHJkcmRyZHJkcmQqZCpkKmRyZHJkKmQqZCpkcmRyZHJkcmRyZHJkKmQqZCpkcmRyZCpkKmQqZHJkcmQqZCpkKmRyZHJkcmRyZHJkcmRyZHJkcmRyZCpkKmQqZHJkcmQqZCpkKmRyZHJkcmRyZHJkcmQqZCpkKmRyZHJkKmQqZCpkcmRyZCpkKmQqZHJkcg==");
const tone_times = [300,200,300,4000];
var current_note = 0;
const bitmap_font = E.toString(atob('AAAAH0AGAAGAACI/iI/iIABkSX/SRMAGMyAgJmMADYkjUBAUAGAAB4QkCAECQh4AFAQFAAAgOAgAAGAAgEAgAAEAAMCAgIGAAD4gkkgj4AEEgn8AgEACEhkUkjEACIgkkkjYAAwKCQ/gQAHokkkkkYAD4kkkkiYAEEhEQkHAADYkkkkjYADIkkkkj4ABEABGAAgKCIABQKBQACIKAgACAgEUkDAAH8glkknkAA8aEQaA8AH8kkkkjYAD4gkEgiIAH8gkERBwAH8kkkkkEAH8kEgkEAAD4gkkkg8AH8EAgEH8AEE/kEAAYAgE/AA/ggKCIggA/gEAgEAgA/iAIAgICA/gA/kAYAwBH8AD4gkEgj4AH8kEgkDAAD4gkUhD0AH8kEwlDEADIkkkkiYAEAgH8gEA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QcAAcUUiUQcAAcUUiUUcAA4ohEog4AAgVAgAA4JhUMg4AA8gSCAQ8AA8ASCgQ8AA8QUCQQ8AB4ggEgh4AAwBiDhgwAH+FBEIg4ABhjIGjBgAA=='));
const police_heights = E.toString(atob("AwIEBgYGBgIEBAQEAgQCBgYGBgYGBgYGBgYCAgQEBAYGBgYGBgYGBgYEBQYGCAcGBgYGBgYGBggGBgYEBgQGBAYGBgYGBgQGBgIFBQIIBgYGBgUGBAYGCAYGBgUCBQYAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAgYGBgYCBgYIBgYEAAgGBQQGBgYGBgIGBgYGBgYGBgYGBgYGBgcGBgYGBgQEBAQGBwYGBgYGBgYGBgYGBgYGBgYGBgYGCAYGBgYGAgIEAgYGBgYGBgYEBgYGBgYGBgY="));
Expand Down Expand Up @@ -268,12 +268,12 @@ function playTones() {
} else {
digitalWrite(PIN_BUZZER, 1);
}
current_note += 1;
if (buzzerEnabled) {
setTimeout(playTones, tone_times.charCodeAt(current_note % tone_times.length));
setTimeout(playTones, tone_times[current_note % tone_times.length]);
} else {
digitalWrite(PIN_BUZZER, 0);
}
current_note += 1;
}

function stopAlarm() {
Expand Down

0 comments on commit 68387bd

Please sign in to comment.