context attempt
All checks were successful
build rgb-board / build (push) Successful in 7m57s

This commit is contained in:
2024-02-15 23:21:09 +00:00
parent 81e7607d53
commit 6eec19644e
3 changed files with 9 additions and 10 deletions

View File

@@ -46,17 +46,18 @@ func animate(sz image.Point, mqMessages chan mqtt.Message) *Animation {
}
func (a *Animation) Next() (image.Image, <-chan time.Time, error) {
var incoming incomingMessage
a.animateMario()
if a.doorbell != (Doorbell{}) {
switch {
case a.doorbell != (Doorbell{}):
if a.countDown > 0 {
a.ctx.DrawImageAnchored(a.doorbell.image, 0, 0, 0, 0)
a.countDown -= 50
} else {
//a.image = a.image[:len(a.image)-1]
a.doorbell = Doorbell{}
a.countDown = 5000
}
default:
a.ctx.Pop()
a.animateMario()
}
a.ctx.SetColor(color.White)
select {