mirror of https://bitbucket.org/ausocean/av.git
revid: remove Burst method's duration parameter
This commit is contained in:
parent
054f0a5e77
commit
5502eea661
|
@ -198,8 +198,7 @@ func run(rv *revid.Revid, ns *netsender.Sender, l *logger.Logger, nl *netlogger.
|
|||
continue
|
||||
}
|
||||
case modeBurst:
|
||||
dur := time.Duration(rv.Config().BurstPeriod) * time.Second
|
||||
err = rv.Burst(dur)
|
||||
err = rv.Burst()
|
||||
if err != nil {
|
||||
l.Log(logger.Warning, pkg+"could not start burst", "error", err.Error())
|
||||
ns.SetMode(modePaused, &vs)
|
||||
|
|
|
@ -493,7 +493,7 @@ func (r *Revid) Stop() {
|
|||
}
|
||||
|
||||
// Burst starts revid, waits for time specified, and then stops revid.
|
||||
func (r *Revid) Burst(duration time.Duration) error {
|
||||
func (r *Revid) Burst() error {
|
||||
r.cfg.Logger.Log(logger.Info, pkg+"starting burst")
|
||||
|
||||
err := r.Start()
|
||||
|
@ -501,7 +501,9 @@ func (r *Revid) Burst(duration time.Duration) error {
|
|||
return fmt.Errorf("could not start revid: %w", err)
|
||||
}
|
||||
|
||||
time.Sleep(duration)
|
||||
dur := time.Duration(r.cfg.BurstPeriod) * time.Second
|
||||
time.Sleep(dur)
|
||||
|
||||
r.cfg.Logger.Log(logger.Info, pkg+"stopping burst")
|
||||
r.Stop()
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue