DCC-EX / CommandStation-EX

EX-CommandStation firmware from DCC-EX. Includes support for WiFi and a standalone WiThrottle server. A complete re-write of the original DCC++.
https://dcc-ex.github.io/
GNU General Public License v3.0
154 stars 104 forks source link

Bug Report: get TurnoutDescription returns null (results in garbage) #299

Closed peteGSX closed 1 year ago

peteGSX commented 1 year ago

Version

V4.210pre1

Bug description

When obtaining turnout description with <JT I’d>, garbage is returned when there is no description define for the turnout.

Steps to reproduce the bug

Add a few SERVO turnouts and save them to EEPROM. Send command <JT id>

Serial connection returns <jT 901 C " ⸮⸮ ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮⸮a ⸮  ⸮  ⸮o ⸮  ⸮E ⸮ ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮⸮_ ⸮⸮_ ⸮  ⸮⸮ ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮  ⸮⸮ ⸮s ⸮  ⸮I ⸮ ⸮  ⸮⸮2 ⸮<j ⸮⸮t ⸮  ⸮5t ⸮⸮i ⸮⸮t ⸮⸮t ⸮⸮2 ⸮# ⸮⸮s ⸮⸮s ⸮{ ⸮gt ⸮S ⸮⸮r ⸮⸮t ⸮⸮H ⸮u ⸮XG ⸮ut ⸮⸮t ⸮W ⸮⸮4 ⸮t5 ⸮⸮u ⸮⸮ ⸮g ⸮~t ⸮ ⸮⸮ ⸮4 ⸮ B ⸮⸮r ⸮ws ⸮Bt ⸮⸮i ⸮l ⸮ ⸮: ⸮7 ⸮@u ⸮v ⸮)b ⸮⸮! ⸮2 ⸮j ⸮⸮r ⸮u ⸮⸮ ⸮N ⸮⸮i ⸮⸮ ⸮⸮t ⸮}% ⸮w ⸮⸮u ⸮zt ⸮⸮i ⸮_ ⸮w ⸮/ ⸮⸮ ⸮|& ⸮⸮t ⸮Fs ⸮ s ⸮⸮u ⸮ H ⸮⸮t ⸮wu ⸮+s ⸮⸮r ⸮⸮$ ⸮{E ⸮⸮u ⸮⸮ ⸮⸮s ⸮⸮ ⸮x ⸮[ ⸮Cj ⸮d ⸮⸮@ ⸮] ⸮⸮ ⸮⸮ ⸮u ⸮I ⸮@2 ⸮⸮t ⸮% ⸮Ht ⸮⸮2 ⸮@ ⸮⸮ ⸮⸮% ⸮^% ⸮j ⸮⸮ ⸮⸮3 ⸮ ⸮⸮t ⸮u1 ⸮P ⸮? ⸮⸮r ⸮⸮ ⸮nu ⸮|t ⸮⸮r ⸮⸮% ⸮, ⸮yi ⸮⸮$ ⸮m ⸮⸮ ⸮t ⸮⸮u ⸮⸮i ⸮y! ⸮⸮ ⸮⸮ ⸮& ⸮v ⸮HH ⸮⸮s ⸮e ⸮⸮ ⸮h ⸮⸮u ⸮⸮& ⸮ ⸮ v ⸮⸮s ⸮⸮! ⸮⸮! ⸮⸮r ⸮|u ⸮⸮t ⸮J ⸮⸮s ⸮- ⸮⸮t ⸮⸮. ⸮⸮i ⸮:s ⸮h ⸮⸮ ⸮⸮ ⸮9 ⸮⸮t ⸮i ⸮1j ⸮⸮ ⸮[u ⸮⸮s ⸮Ut ⸮⸮s ⸮⸮- ⸮ J ⸮ ⸮s ⸮U ⸮⸮ ⸮2& ⸮⸮ ⸮⸮$ ⸮0 ⸮F ⸮⸮ ⸮{! ⸮h ⸮R ⸮⸮s ⸮⸮D ⸮⸮t ⸮⸮s ⸮  ⸮e ⸮⸮h ⸮⸮s ⸮s ⸮⸮ ⸮w! ⸮⸮! ⸮⸮s ⸮cj ⸮s ⸮⸮r ⸮⸮ ⸮⸮. ⸮rs ⸮/ ⸮⸮u ⸮⸮r ⸮[Example turnout/point 24">

Engine Driver returns <JT 901> (106) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<jT 903 C "">

Expected behaviour

No description should return an empty string ”” not garbage.

Screenshots

No response

Hardware in use

Mega2560

Additional context

Command currently returns null rather than empty string.

habazut commented 1 year ago

Fixed in versions 2.4.12 (devel) and 4.1.4 (master)