From b40fa779a64ff17997185e66e40d37e0ba62b13c Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Mon, 20 Jan 2025 22:40:43 +0100 Subject: [PATCH] revert part of commit 3c725a which did fix bug but reverse direction --- DCCEXParser.cpp | 2 +- Turnouts.cpp | 2 +- config.example.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index ad577ff..ff73375 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -403,7 +403,7 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream) ) break; // Honour the configuration option (config.h) which allows the command to be reversed // Because of earlier confusion we need to do the same thing under both defines -#if defined(DCC_ACCESSORY_COMMAND_REVERSE) || defined(DCC_ACCESSORY_RCN_213) +#if defined(DCC_ACCESSORY_COMMAND_REVERSE) DCC::setAccessory(address, subaddress,p[activep]==0,onoff); #else DCC::setAccessory(address, subaddress,p[activep]==1,onoff); diff --git a/Turnouts.cpp b/Turnouts.cpp index 8e212ed..dfe9615 100644 --- a/Turnouts.cpp +++ b/Turnouts.cpp @@ -379,7 +379,7 @@ // DCC++ Classic behaviour is that Throw writes a 1 in the packet, // and Close writes a 0. // RCN-213 specifies that Throw is 0 and Close is 1. -#if defined(DCC_TURNOUTS_RCN_213) +#ifndef DCC_TURNOUTS_RCN_213 close = !close; #endif DCC::setAccessory(_dccTurnoutData.address, _dccTurnoutData.subAddress, close); diff --git a/config.example.h b/config.example.h index 4d107aa..6aba226 100644 --- a/config.example.h +++ b/config.example.h @@ -269,8 +269,8 @@ The configuration file for DCC-EX Command Station // over DCC++. This #define likewise inverts the behaviour of the command // for triggering DCC Accessory Decoders, so that generates a // DCC packet with D=1 (close turnout) and generates D=0 -// (throw turnout). This is the same as DCC_ACCESSORY_COMMAND_REVERSE -//#define DCC_ACCESSORY_RCN_213 +// (throw turnout). +//#define DCC_ACCESSORY_COMMAND_REVERSE // HANDLING MULTIPLE SERIAL THROTTLES