From 4cadda9029a46b21bd340462da0638f6dba9a96b Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 4 Feb 2019 14:29:20 -0500 Subject: [PATCH] 2019-02-04 Fred Gleason * Modified the PAD emission code to use the most recently started event rather than the longest running. --- ChangeLog | 3 +++ lib/rdlogplay.cpp | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 254ce753..f6af5db4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18451,3 +18451,6 @@ Length for PAD Updates'. * Updated the screenshot of the 'Edit Cart' dialog in the Operations Guide. +2019-02-04 Fred Gleason + * Modified the PAD emission code to use the most recently + started event rather than the longest running. diff --git a/lib/rdlogplay.cpp b/lib/rdlogplay.cpp index 67cdb4fa..af2af9d1 100644 --- a/lib/rdlogplay.cpp +++ b/lib/rdlogplay.cpp @@ -2875,6 +2875,10 @@ void RDLogPlay::SendNowNext() // int lines[TRANSPORT_QUANTITY]; int running=runningEvents(lines,false); + // + // "Longest running" algorithm + // + /* for(int i=0;istartTime(RDLogLine::Actual). addMSecs(logLine(lines[i])->effectiveLength()))>end_time) { @@ -2882,6 +2886,15 @@ void RDLogPlay::SendNowNext() now_line=lines[i]; } } + */ + + // + // "Most recently started" algorithm + // + if(running>0) { + now_line=lines[running-1]; + } + if((now_line>=0)&&(logLine(now_line)->nowNextEnabled())) { logline[0]=logLine(now_line); }