2018-08-28 Fred Gleason <fredg@paravelsystems.com>

* Added an optional third argument to the 'Add Next' ['PX'] RML
	to allow specication of the transition type.
This commit is contained in:
Fred Gleason 2018-08-28 10:54:35 -04:00
parent 41c9489354
commit 65e7559009
4 changed files with 22 additions and 8 deletions

View File

@ -16669,3 +16669,6 @@
2018-08-23 Fred Gleason <fredg@paravelsystems.com> 2018-08-23 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in ripcd(8) that caused process of the 'Air Gate' ['AG'] * Fixed a bug in ripcd(8) that caused process of the 'Air Gate' ['AG']
RML to fail. RML to fail.
2018-08-28 Fred Gleason <fredg@paravelsystems.com>
* Added an optional third argument to the 'Add Next' ['PX'] RML
to allow specication of the transition type.

View File

@ -218,11 +218,13 @@
<para> <para>
<userinput>PX <userinput>PX
<replaceable>mach</replaceable> <replaceable>mach</replaceable>
<replaceable>cart</replaceable>!</userinput> <replaceable>cart</replaceable>
[PLAY|SEGUE|STOP]!</userinput>
</para> </para>
<para> <para>
Insert cart <replaceable>cart</replaceable>> in the next to play Insert cart <replaceable>cart</replaceable> in the next to play
position on log machine <replaceable>mach</replaceable>. position on log machine <replaceable>mach</replaceable>. The
transition may also be optionally specified.
</para> </para>
</sect2> </sect2>

View File

@ -41,6 +41,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
RDLogLine *logline=NULL; RDLogLine *logline=NULL;
QString label; QString label;
int mach=0; int mach=0;
RDLogLine::TransType trans=RDLogLine::Play;
if(rml->role()!=RDMacro::Cmd) { if(rml->role()!=RDMacro::Cmd) {
return; return;
@ -782,7 +783,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
break; break;
case RDMacro::PX: // Add Next case RDMacro::PX: // Add Next
if(rml->argQuantity()!=2) { if((rml->argQuantity()<2)||(rml->argQuantity()>3)) {
if(rml->echoRequested()) { if(rml->echoRequested()) {
rml->acknowledge(false); rml->acknowledge(false);
rdripc->sendRml(rml); rdripc->sendRml(rml);
@ -797,15 +798,24 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
} }
return; return;
} }
trans=RDLogLine::Play;
if(rml->argQuantity()==3) {
if(rml->arg(2).toString().lower()=="segue") {
trans=RDLogLine::Segue;
}
if(rml->arg(2).toString().lower()=="stop") {
trans=RDLogLine::Stop;
}
}
if(air_log[rml->arg(0).toInt()-1]->nextLine()>=0) { if(air_log[rml->arg(0).toInt()-1]->nextLine()>=0) {
air_log[rml->arg(0).toInt()-1]-> air_log[rml->arg(0).toInt()-1]->
insert(air_log[rml->arg(0).toInt()-1]->nextLine(), insert(air_log[rml->arg(0).toInt()-1]->nextLine(),
rml->arg(1).toUInt(),RDLogLine::Play); rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
} }
else { else {
air_log[rml->arg(0).toInt()-1]-> air_log[rml->arg(0).toInt()-1]->
insert(air_log[rml->arg(0).toInt()-1]->size(), insert(air_log[rml->arg(0).toInt()-1]->size(),
rml->arg(1).toUInt(),RDLogLine::Play); rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
air_log[rml->arg(0).toInt()-1]-> air_log[rml->arg(0).toInt()-1]->
makeNext(air_log[rml->arg(0).toInt()-1]->size()-1); makeNext(air_log[rml->arg(0).toInt()-1]->size()-1);
} }

View File

@ -833,8 +833,7 @@ void LogPlay::insert(int line,int cartnum,RDLogLine::TransType next_type,
if(nextLine()<0) { if(nextLine()<0) {
play_next_line=line; play_next_line=line;
} }
logline->loadCart(cartnum,next_type,play_id,play_timescaling_available, logline->loadCart(cartnum,next_type,play_id,play_timescaling_available,type);
rdairplay_conf->defaultTransType());
logline-> logline->
setTimescalingActive(play_timescaling_available&&logline->enforceLength()); setTimescalingActive(play_timescaling_available&&logline->enforceLength());
UpdateStartTimes(line); UpdateStartTimes(line);