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

View file

@ -29,7 +29,7 @@
/> />
<div class="flex-fill d-flex flex-column bg-light"> <div class="flex-fill d-flex flex-column bg-light">
<slot></slot> <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> </div>
<Toaster /> <Toaster />
<Header <Header

View file

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