From 6c7556377966af6b3899c1db9890149d35355677 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Mon, 8 Nov 2021 00:19:23 +0100 Subject: [PATCH] handle negative pins --- RMFT2.cpp | 4 +++- version.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RMFT2.cpp b/RMFT2.cpp index a4f1758..5a91541 100644 --- a/RMFT2.cpp +++ b/RMFT2.cpp @@ -71,7 +71,9 @@ byte RMFT2::flags[MAX_FLAGS]; case OPCODE_AFTER: case OPCODE_IF: case OPCODE_IFNOT: - IODevice::configureInput((VPIN)GET_OPERAND(0),true); + int16_t pin = (int16_t)GET_OPERAND(0); + if (pin<0) pin = -pin; + IODevice::configureInput((VPIN)pin,true); } if (opcode==OPCODE_SIGNAL) { diff --git a/version.h b/version.h index 5a0f943..617673c 100644 --- a/version.h +++ b/version.h @@ -3,7 +3,7 @@ #include "StringFormatter.h" -#define VERSION "3.2.0 rc1" +#define VERSION "3.2.0 rc2" // 3.2.0 Major functional and non-functional changes. // New HAL added for I/O (digital and analogue inputs and outputs, servos etc). // Support for MCP23008, MCP23017 and PCF9584 I2C GPIO Extender modules.