From 801cddfef70a5ced01da9f022d4b0ad603264e0a Mon Sep 17 00:00:00 2001 From: Asbelos Date: Sun, 6 Oct 2024 13:24:07 +0100 Subject: [PATCH] simpler macro insert --- EXRAIL2MacroReset.h | 2 -- EXRAILMacros.h | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/EXRAIL2MacroReset.h b/EXRAIL2MacroReset.h index 9505d42..1f4afc8 100644 --- a/EXRAIL2MacroReset.h +++ b/EXRAIL2MacroReset.h @@ -151,7 +151,6 @@ #undef ROUTE_HIDDEN #undef ROUTE_DISABLED #undef ROUTE_CAPTION -#undef SEG7 #undef SENDLOCO #undef SEQUENCE #undef SERIAL @@ -323,7 +322,6 @@ #define ROUTE_HIDDEN(id) #define ROUTE_DISABLED(id) #define ROUTE_CAPTION(id,caption) -#define SEG7(vpin,value,format) #define SENDLOCO(cab,route) #define SEQUENCE(id) #define SERIAL(msg) diff --git a/EXRAILMacros.h b/EXRAILMacros.h index 94c482a..b2ee920 100644 --- a/EXRAILMacros.h +++ b/EXRAILMacros.h @@ -63,6 +63,10 @@ // playing sounds with IO_I2CDFPlayer #define PLAYSOUND ANOUT +// SEG7 is a helper to create ANOUT from a 7-segment requets +#define SEG7(vpin,value,format) \ + ANOUT(vpin,(value & 0xFFFF),TM1638::DF_##format,((uint32_t)value)>>16) + // helper macro to strip leading zeros off time inputs // (10#mins)%100) #define STRIP_ZERO(value) 10##value%100 @@ -618,8 +622,6 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup]; #define ROUTE_HIDDEN(id) OPCODE_ROUTE_HIDDEN,V(id), #define ROUTE_DISABLED(id) OPCODE_ROUTE_DISABLED,V(id), #define ROUTE_CAPTION(id,caption) PRINT(caption) -#define SEG7(vpin,value,format) \ - ANOUT(vpin,(value & 0xFFFF),TM1638::DF_##format,((uint32_t)value)>>16) #define SENDLOCO(cab,route) OPCODE_SENDLOCO,V(cab),OPCODE_PAD,V(route), #define SEQUENCE(id) OPCODE_SEQUENCE, V(id), #define SERIAL(msg) PRINT(msg)