some more work.
continuous-integration/drone/push Build is failing

This commit is contained in:
2021-09-28 21:57:28 +02:00
parent ffa757f742
commit a3695a3ddd
3 changed files with 23 additions and 1 deletions
+3 -1
View File
@@ -204,7 +204,9 @@ func (b *Bridge) Run(ctx context.Context, debug bool) error {
b.checkAndUpdateState(state)
}
if time.Since(state.discoveredTime) > time.Second*10 {
if time.Since(state.discoveredTime) > time.Second*10 && time.Since(state.fwSpamTime) > time.Second * 30 {
state.fwSpamTime = time.Now()
if state.firmware == nil {
_, _ = client.Send(state.target, &GetHostFirmware{})
}
+1
View File
@@ -18,6 +18,7 @@ type State struct {
lightStateTime time.Time
requestTime time.Time
updateTime time.Time
fwSpamTime time.Time
acksPending []uint8
}