mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
fix: reset timers
reset timers as needed with roll mode
This commit is contained in:
@@ -961,6 +961,7 @@ export class EventTimer extends Timer {
|
|||||||
foundNow = true;
|
foundNow = true;
|
||||||
|
|
||||||
// set timers
|
// set timers
|
||||||
|
this.secondaryTimer = null;
|
||||||
this._startedAt = e.timeStart;
|
this._startedAt = e.timeStart;
|
||||||
this._finishAt = e.timeEnd;
|
this._finishAt = e.timeEnd;
|
||||||
this.duration = e.timeEnd - e.timeStart;
|
this.duration = e.timeEnd - e.timeStart;
|
||||||
@@ -1000,8 +1001,13 @@ export class EventTimer extends Timer {
|
|||||||
this._loadThisTitles(e, 'next');
|
this._loadThisTitles(e, 'next');
|
||||||
|
|
||||||
if (foundNow == null) {
|
if (foundNow == null) {
|
||||||
|
// only warn the first time
|
||||||
if (this.secondaryTimer == null)
|
if (this.secondaryTimer == null)
|
||||||
console.log('Roll: waiting for event start');
|
console.log('Roll: waiting for event start');
|
||||||
|
|
||||||
|
// reset running timer
|
||||||
|
this.current = null;
|
||||||
|
|
||||||
// timer counts to nextStart
|
// timer counts to nextStart
|
||||||
this.secondaryTimer = nextStart;
|
this.secondaryTimer = nextStart;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user