From e6dde5a11c1179c60a8375b4898a9594fb3b477a Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 24 Mar 2024 09:33:44 +0100 Subject: [PATCH] add READ_REGISTER name to Z21 parser --- Z21Throttle.cpp | 2 +- Z21Throttle.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Z21Throttle.cpp b/Z21Throttle.cpp index ea7293c..409a5f1 100644 --- a/Z21Throttle.cpp +++ b/Z21Throttle.cpp @@ -780,7 +780,7 @@ bool Z21Throttle::parse(byte *networkPacket, int len) { done = true; break; case LAN_X_HEADER_SET_TURNOUT: - case 0x22: + case LAN_X_HEADER_READ_REGISTER: break; } break; diff --git a/Z21Throttle.h b/Z21Throttle.h index 3a40b03..697a351 100644 --- a/Z21Throttle.h +++ b/Z21Throttle.h @@ -182,6 +182,7 @@ class Z21Throttle { #define LAN_GET_CONFIG 0x12 #define LAN_X_HEADER_GENERAL 0x21 +#define LAN_X_HEADER_READ_REGISTER 0x22 #define LAN_X_HEADER_SET_STOP 0x80 #define LAN_X_HEADER_GET_FIRMWARE_VERSION 0xF1 //0x141 0x21 0x21 0x00 #define LAN_X_HEADER_GET_LOCO_INFO 0xE3 @@ -192,6 +193,7 @@ class Z21Throttle { #define LAN_X_HEADER_CV_WRITE 0x24 #define LAN_X_HEADER_CV_POM 0xE6 +#define LAN_X_DB0_READ_REGISTER 0x11 #define LAN_X_DB0_GET_VERSION 0x21 #define LAN_X_DB0_GET_STATUS 0x24 #define LAN_X_DB0_SET_TRACK_POWER_OFF 0x80