From 89664eff9d947ab84be7900ae75d2db9ffac82e6 Mon Sep 17 00:00:00 2001 From: peteGSX Date: Thu, 30 Mar 2023 06:54:18 +1000 Subject: [PATCH] Cleaned up warning --- IO_RotaryEncoder.h | 3 ++- version.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/IO_RotaryEncoder.h b/IO_RotaryEncoder.h index 09d0c4d..00a8249 100644 --- a/IO_RotaryEncoder.h +++ b/IO_RotaryEncoder.h @@ -98,7 +98,8 @@ private: void _write(VPIN vpin, int value) override { if (vpin == _firstVpin + 1) { - byte _feedbackBuffer[2] = {RE_OP, value}; + if (value != 0) value = 0x01; + byte _feedbackBuffer[2] = {RE_OP, (byte)value}; I2CManager.write(_I2CAddress, _feedbackBuffer, 2); } } diff --git a/version.h b/version.h index 5cb5cea..c29f773 100644 --- a/version.h +++ b/version.h @@ -4,7 +4,8 @@ #include "StringFormatter.h" -#define VERSION "4.2.37" +#define VERSION "4.2.38" +// 4.2.38 - Clean up compiler warning when IO_RotaryEncoder.h included // 4.2.37 - Add new FLAGS HAL device for communications to/from EX-RAIL; // - Fix diag display of high VPINs within IODevice class. // 4.2.36 - do not broadcast a turnout state that has not changed