Skip to content

Commit f9037e6

Browse files
committed
Snooze cancel signal should use beeper when relay is switched; remove unused config lines
1 parent 737d457 commit f9037e6

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

sixtube_lm/sixtube_lm.ino

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,7 @@
88
////////// Hardware configuration //////////
99
//Include the config file that matches your hardware setup. If needed, duplicate an existing one.
1010

11-
//#include "configs/v5-6tube.h" //UNDB v5, 6 tubes
12-
//#include "configs/v5-6tube-red.h" //UNDB v5, 6 tubes, red case (weird buttons)
13-
//#include "configs/v5-6tube-rotary.h" //UNDB v5, 6 tubes, rotary encoder instead of buttons
14-
//#include "configs/v5-4tube.h" //UNDB v5, 4 tubes
15-
//#include "configs/v8-6tube.h" //UNDB v8 before modification, no LED or relay support
16-
//#include "configs/v8-4tube.h" //UNDB v8 before modification, no LED or relay support
17-
#include "configs/v8a-6tube-relayswitch.h" //UNDB v8 after modification A (Select=A1, Adj=A6/A7, Alt=A0, LED=A2, Relay=A3)
18-
//#include "configs/v8b-6tube-relayswitch.h" //UNDB v8 after modification B (Select=A6, Adj=A0/A1, Alt=A7, LED=A2, Relay=A3)
11+
#include "configs/v8b-6tube-relayswitch-pwm-top.h"
1912

2013

2114
////////// Other includes, global consts, and vars //////////
@@ -271,7 +264,12 @@ void ctrlEvt(byte ctrl, byte evt){
271264
stoppingSignal = false;
272265
if(evt==2 && snoozeRemain>0) {
273266
snoozeRemain = 0;
274-
signalStart(fnIsAlarm,0,100); //Short beep at alarm pitch
267+
//Short signal to indicate the snooze has cancelled //TODO write these edge cases into the signal generating stuff
268+
if(getSignalOutput()==1 && relayMode==0) { //if the output is relay, but switched
269+
if(piezoPin>=0) { tone(piezoPin, getSignalPitch(), 100); } //use the beeper anyway
270+
} else {
271+
signalStart(fnIsAlarm,0,100);
272+
}
275273
}
276274
btnStop();
277275
return;

0 commit comments

Comments
 (0)