1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 08:06:13 +01:00

Merge pull request #326 from DCC-EX:287-to-do-clean-up-rotary-encoder-device-driver-compile-time-warning

Cleaned up warning
This commit is contained in:
peteGSX 2023-03-30 07:01:40 +10:00 committed by GitHub
commit 2c943d250e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -98,7 +98,8 @@ private:
void _write(VPIN vpin, int value) override { void _write(VPIN vpin, int value) override {
if (vpin == _firstVpin + 1) { 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); I2CManager.write(_I2CAddress, _feedbackBuffer, 2);
} }
} }

View File

@ -4,7 +4,8 @@
#include "StringFormatter.h" #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; // 4.2.37 - Add new FLAGS HAL device for communications to/from EX-RAIL;
// - Fix diag display of high VPINs within IODevice class. // - Fix diag display of high VPINs within IODevice class.
// 4.2.36 - do not broadcast a turnout state that has not changed // 4.2.36 - do not broadcast a turnout state that has not changed