Skip to content

Ignore leading whitespace in configuration data#20

Open
deltaphi wants to merge 5 commits intoGBert:masterfrom
deltaphi:parse-ms2-1.83
Open

Ignore leading whitespace in configuration data#20
deltaphi wants to merge 5 commits intoGBert:masterfrom
deltaphi:parse-ms2-1.83

Conversation

@deltaphi
Copy link

When parsing lines received from the MS2, skip all initial whitespace.

@deltaphi
Copy link
Author

Possibly affected functions:

  • read_track_data
  • read_track_config
  • read_magnet_data

Basic criterion is: Everything that uses the data from cs2-token.h is affected.

@deltaphi
Copy link
Author

Hallo @GBert,
mit diesem PR kann clone-ms2-loco die Lokliste sowohl von MS2 V2.5 als auch von MS2 V1.83 herunterladen. Hätte dieser PR chancen, aufgenommen zu werden? Falls ja werde ich die Zeit investieren, auch die verbleibenden drei Methoden zu aktualisieren.

@deltaphi deltaphi marked this pull request as ready for review February 12, 2026 20:33
@deltaphi
Copy link
Author

Alle funktionen portiert. Mangels CS2 kann ich aber nur den Lokdownload auf alten MS2-Softwareversionen testen.

@deltaphi deltaphi changed the title Parse Locomotive Information from MS2 SW 1.83 Ignore leading whitespace in configuration data Feb 13, 2026
@mue473
Copy link
Contributor

mue473 commented Feb 27, 2026

The modified read-cs2-config is used by several programs:

  • read-cs2-ini: read-cs2-config.o read-cs2-ini.o
  • clone-ms2-loco: crc-ccitt.o read-cs2-config.o clone-ms2-loco.o
  • can2lan: ascii-frame.o crc-ccitt.o gio.o read-cs2-config.o can2lan.o
  • ms2-loco-list: crc-ccitt.o read-cs2-config.o ms2-loco-list.o
  • read_lococard: read-cs2-config.o read_lococard.o

All these programs should continue working with actual devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants