2018-09-03 Fred Gleason <fredg@paravelsystems.com>

* Renamed the 'Add Next' ['PX'] RML to 'Insert Cart' ['PX'].
	* Added an 'offset' parameter to the 'Insert Cart' ['PX'] RML.
This commit is contained in:
Fred Gleason 2018-09-03 14:15:47 +00:00
parent b8e63a26ec
commit 1f18f30cf8
3 changed files with 45 additions and 35 deletions

View File

@ -17542,3 +17542,6 @@
* Added support for the Spinitron v2 API in the 'spinitron_plus' RLM.
2018-08-29 Fred Gleason <fredg@paravelsystems.com>
* Removed spurious syslog warnings when initializing HPI devices.
2018-09-03 Fred Gleason <fredg@paravelsystems.com>
* Renamed the 'Add Next' ['PX'] RML to 'Insert Cart' ['PX'].
* Added an 'offset' parameter to the 'Insert Cart' ['PX'] RML.

View File

@ -198,36 +198,6 @@
</para>
</sect2>
<sect2 xml:id="sect.rml.add_next__px_">
<title>Add Next [PX]</title>
<para>
<variablelist>
<varlistentry>
<term>Module</term>
<listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
</varlistentry>
<varlistentry>
<term>Mnemonic</term>
<listitem><userinput>PX</userinput></listitem>
</varlistentry>
</variablelist>
</para>
<para>
Insert a cart in a log in the next to play position.
</para>
<para>
<userinput>PX
<replaceable>mach</replaceable>
<replaceable>cart</replaceable>
[PLAY|SEGUE|STOP]!</userinput>
</para>
<para>
Insert cart <replaceable>cart</replaceable> in the next to play
position on log machine <replaceable>mach</replaceable>. The
transition may also be optionally specified.
</para>
</sect2>
<sect2 xml:id="sect.rml.binary_serial_out__bo_">
<title>Binary Serial Out [BO]</title>
<para>
@ -863,6 +833,38 @@
</para>
</sect2>
<sect2 xml:id="sect.rml.insert_cart__px_">
<title>Insert Cart [PX]</title>
<para>
<variablelist>
<varlistentry>
<term>Module</term>
<listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
</varlistentry>
<varlistentry>
<term>Mnemonic</term>
<listitem><userinput>PX</userinput></listitem>
</varlistentry>
</variablelist>
</para>
<para>
Insert a cart in a log.
</para>
<para>
<userinput>PX
<replaceable>mach</replaceable>
<replaceable>cart</replaceable>
[<replaceable>offset</replaceable>]
[PLAY|SEGUE|STOP]!</userinput>
</para>
<para>
Insert cart <replaceable>cart</replaceable> after the currently playing
or next event plus <replaceable>offset</replaceable> (default '0')
lines on log machine <replaceable>mach</replaceable>. The
transition may also be optionally specified.
</para>
</sect2>
<sect2 xml:id="sect.rml.insert_serial_trap__si_">
<title>Insert Serial Trap [SI]</title>
<para>

View File

@ -43,6 +43,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
QString label;
int mach=0;
RDLogLine::TransType trans=RDLogLine::Play;
int offset=0;
if(rml->role()!=RDMacro::Cmd) {
return;
@ -784,7 +785,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
break;
case RDMacro::PX: // Add Next
if((rml->argQuantity()<2)||(rml->argQuantity()>3)) {
if((rml->argQuantity()<2)||(rml->argQuantity()>4)) {
if(rml->echoRequested()) {
rml->acknowledge(false);
rda->ripc()->sendRml(rml);
@ -799,18 +800,22 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
}
return;
}
offset=0;
if(rml->argQuantity()>=3) {
offset=rml->arg(2).toInt();
}
trans=RDLogLine::Play;
if(rml->argQuantity()==3) {
if(rml->arg(2).toLower()=="segue") {
if(rml->argQuantity()==4) {
if(rml->arg(3).toLower()=="segue") {
trans=RDLogLine::Segue;
}
if(rml->arg(2).toLower()=="stop") {
if(rml->arg(3).toLower()=="stop") {
trans=RDLogLine::Stop;
}
}
if(air_log[rml->arg(0).toInt()-1]->nextLine()>=0) {
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()+offset,
rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
}
else {