From 9d5781a87ce1c7283722944c27228db93c2f514f Mon Sep 17 00:00:00 2001 From: Asbelos Date: Fri, 3 Sep 2021 21:33:53 +0100 Subject: [PATCH] Signal pin corrections --- RMFT2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RMFT2.cpp b/RMFT2.cpp index 0d7d133..8c22b43 100644 --- a/RMFT2.cpp +++ b/RMFT2.cpp @@ -674,14 +674,14 @@ void RMFT2::kill(const FSH * reason, int operand) { byte opcode=GET_OPCODE; if (opcode==OPCODE_ENDEXRAIL) return; if (opcode!=OPCODE_SIGNAL) continue; - byte redpin=GET_OPERAND(1); + byte redpin=GET_OPERAND(0); if (redpin!=id)continue; - byte amberpin=GET_OPERAND(2); - byte greenpin=GET_OPERAND(3); + byte amberpin=GET_OPERAND(1); + byte greenpin=GET_OPERAND(2); // If amberpin is zero, synthesise amber from red+green IODevice::write(redpin,red || (amber && (amberpin==0))); if (amberpin) IODevice::write(amberpin,amber); - if (greenpin) IODevice::write(amberpin,green || (amber && (amberpin==0))); + if (greenpin) IODevice::write(greenpin,green || (amber && (amberpin==0))); return; } }