Compare commits

..

No commits in common. "0ea7bc2a49f531362c415173921693e1619c5301" and "5d7180cd94d8174b2a8d8bbd58d4b80a74a74a2c" have entirely different histories.

3 changed files with 7 additions and 8 deletions

View file

@ -34,6 +34,7 @@ type Player struct {
endRoutines []*reveil.Routine
ntick int64
hasClaironed bool
hasSpokeWeather bool
launched time.Time
volume uint16
@ -169,7 +170,7 @@ loop:
for {
select {
case <-p.currentCmdCh:
if time.Since(p.launched) >= p.claironTime {
if !p.hasClaironed && time.Since(p.launched) >= p.claironTime {
log.Println("clairon time!")
p.claironTime += p.claironTime / 2
p.SetVolume(65535)
@ -177,8 +178,8 @@ loop:
go p.playFile(p.claironFile)
} else if p.weatherAction != nil && !p.hasSpokeWeather && time.Since(p.launched) >= p.weatherTime {
log.Println("weather time!")
p.SetVolume(65535)
p.dontUpdateVolume = true
p.hasSpokeWeather = true
go p.launchAction(p.weatherAction)
} else {
p.dontUpdateVolume = false

View file

@ -29,7 +29,7 @@
/>
<div class="flex-fill d-flex flex-column bg-light">
<slot></slot>
<div class="d-flex d-lg-none mt-3 mb-5"></div>
<div class="d-flex d-lg-none mt-1 mb-4"></div>
</div>
<Toaster />
<Header

View file

@ -114,11 +114,10 @@
<div class="d-flex gap-3 justify-content-center">
<a
href="alarms/single/new"
title="Programmer un nouveau réveil"
class="btn btn-primary d-flex align-items-center justify-content-center gap-2"
class="btn btn-primary"
>
<Icon name="node-plus" />
Programmer <span class="d-none d-lg-inline">un nouveau réveil</span>
Programmer un nouveau réveil
</a>
<button
class="btn btn-info"
@ -136,11 +135,10 @@
</button>
<button
class="btn btn-outline-warning"
title="Lancer le réveil"
on:click={() => { runAlarm(); reloadIsActiveAlarm(); }}
>
<Icon name="play-circle" />
Lancer <span class="d-none d-lg-inline">le réveil</span>
Lancer le réveil
</button>
</div>
{:else}