disable the beep by default

This commit is contained in:
2022-09-30 13:10:29 +02:00
parent c1a7092603
commit 71c881088d
6 changed files with 23 additions and 16 deletions
+7 -4
View File
@@ -57,7 +57,7 @@ function log(message) {
}
class CommandorPage {
constructor(contact, device, mongoManager, selectedStore = DEFAULT_STORE, audioAnalyse = false) {
constructor(contact, device, mongoManager, selectedStore = DEFAULT_STORE, audioAnalyse = false, alertBeep = false) {
this.contact = contact;
this.device = device;
this.mongoManager = mongoManager;
@@ -66,6 +66,7 @@ class CommandorPage {
this.isFillingFields = false;
this.isTerminated = false;
this.audioAnalyse = audioAnalyse;
this.alertBeep = alertBeep;
}
@@ -298,9 +299,11 @@ class CommandorPage {
if (this.audioAnalyse) {
await this.checkAudioBtn();
}
for (let i = 0; i < 15; i++) {
await delay(1000)
shell.beep()
if (this.alertBeep) {
for (let i = 0; i < 15; i++) {
await delay(1000)
shell.beep()
}
}
log("发现datadome");
} else {