From 5e60fb4e2701e5ad1d1099f3e4e6d655c9b46df6 Mon Sep 17 00:00:00 2001 From: Asbelos Date: Sat, 11 Mar 2023 22:46:11 +0000 Subject: [PATCH] SAMD21 odd byte boundary --- EXRAIL2.cpp | 9 +++------ version.h | 5 +++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/EXRAIL2.cpp b/EXRAIL2.cpp index 3bd8da7..8541cd2 100644 --- a/EXRAIL2.cpp +++ b/EXRAIL2.cpp @@ -105,12 +105,9 @@ uint16_t RMFT2::getOperand(byte n) { // getOperand static version, must be provided prog counter from loop etc. uint16_t RMFT2::getOperand(int progCounter,byte n) { int offset=progCounter+1+(n*3); - if (offset&1) { - byte lsb=GETHIGHFLASH(RouteCode,offset); - byte msb=GETHIGHFLASH(RouteCode,offset+1); - return msb<<8|lsb; - } - return GETHIGHFLASHW(RouteCode,offset); + byte lsb=GETHIGHFLASH(RouteCode,offset); + byte msb=GETHIGHFLASH(RouteCode,offset+1); + return msb<<8|lsb; } LookList::LookList(int16_t size) { diff --git a/version.h b/version.h index 6e2d0ba..8afe38a 100644 --- a/version.h +++ b/version.h @@ -4,8 +4,9 @@ #include "StringFormatter.h" -#define VERSION "4.2.24" -// 4.3.24 - Bugfix Ethernet shield: Static IP now possible +#define VERSION "4.2.25" +// 4.2.25 - Bugfix SAMD21 Exrail odd byte boundary +// 4.2.24 - Bugfix Ethernet shield: Static IP now possible // 4.2.23 - Bugfix signalpin2 was not set up in shadow port // 4.2.22 - Implement broadcast of Track Manager changes // 4.2.21 - Implement non-blocking I2C for EX-IOExpander device driver