2019-02-19 Fred Gleason <fredg@paravelsystems.com>

* Modified the PAD emission code to use a hybrid "most recently
	started" / "longest running" strategy.
This commit is contained in:
Fred Gleason 2019-02-19 16:40:16 -05:00
parent b58f6410d7
commit 408d3ce917
2 changed files with 25 additions and 2 deletions

View File

@ -18496,3 +18496,6 @@
2019-02-19 Patrick Linstruth <patrick@deltecent.com>
* Add non-contiguous cart selections in RDListView class.
* Allow non-contiguous cart selections in rdlibrary(1).
2019-02-19 Fred Gleason <fredg@paravelsystems.com>
* Modified the PAD emission code to use a hybrid "most recently
started" / "longest running" strategy.

View File

@ -2887,12 +2887,32 @@ void RDLogPlay::SendNowNext()
}
}
*/
/*
//
// "Most recently started" algorithm
//
if(running>0) {
now_line=lines[running-1];
now_line=lines[running-1]; // Most recently started event
}
*/
//
// "Hybrid" algorithm
//
if(running>0) {
now_line=lines[running-1]; // Most recently started event
if((!logLine(now_line)->nowNextEnabled())||(logLine(now_line)->cartType()!=RDCart::Macro)) {
//
// If the most recently started event is not a Now&Next-enabled macro
// cart, then use longest running event instead
//
for(int i=0;i<running;i++) {
if((time=logLine(lines[i])->startTime(RDLogLine::Actual).
addMSecs(logLine(lines[i])->effectiveLength()))>end_time) {
end_time=time;
now_line=lines[i];
}
}
}
}
if((now_line>=0)&&(logLine(now_line)->nowNextEnabled())) {