Compare commits

..

2 Commits

Author SHA1 Message Date
0ea7bc2a49 Fix weather announce loop
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2022-12-09 10:35:43 +01:00
c9596faa78 Improve responsiveness of home screen 2022-12-08 22:09:19 +01:00
3 changed files with 8 additions and 7 deletions

View File

@ -34,7 +34,6 @@ type Player struct {
endRoutines []*reveil.Routine
ntick int64
hasClaironed bool
hasSpokeWeather bool
launched time.Time
volume uint16
@ -170,7 +169,7 @@ loop:
for {
select {
case <-p.currentCmdCh:
if !p.hasClaironed && time.Since(p.launched) >= p.claironTime {
if time.Since(p.launched) >= p.claironTime {
log.Println("clairon time!")
p.claironTime += p.claironTime / 2
p.SetVolume(65535)
@ -178,8 +177,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-1 mb-4"></div>
<div class="d-flex d-lg-none mt-3 mb-5"></div>
</div>
<Toaster />
<Header

View File

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