Migration‐1.0‐to‐1.1 - meduzapat/LEDSpicer GitHub Wiki
LEDSpicer 0.7.0 introduces configuration version 1.1 with breaking changes. Existing configuration files must be updated.
| Change | 1.0 | 1.1 |
|---|---|---|
| Version attribute | version="1.0" |
version="1.1" |
| Forward bouncing | direction="ForwardBouncing" |
direction="Forward" bouncer="True" |
| Backward bouncing | direction="BackwardBouncing" |
direction="Backward" bouncer="True" |
| Input maps structure |
<map> directly under input |
<map> wrapped in <maps>
|
| Reader inputs |
listenevents attribute on input |
source attribute on <maps>
|
Before (1.0):
<actor type="Serpentine" group="All" direction="ForwardBouncing" />After (1.1):
<actor type="Serpentine" group="All" direction="Forward" bouncer="True" />Before (1.0):
<input name="Actions" listenevents="joy">
<map trigger="B1" target="Button1" type="Element" />
</input>After (1.1):
<input name="Actions">
<maps source="joy">
<map trigger="B1" target="Button1" type="Element" />
</maps>
</input>For non-reader inputs (Mame, Network), use <maps> without source:
<input name="Mame">
<maps>
<map trigger="P1_B1" target="Button1" type="Element" />
</maps>
</input>A Python script is provided to convert configuration files automatically.
Location: tools/convert_1.0_to_1.1.py
# Dry run - preview changes without modifying files
python3 convert_1.0_to_1.1.py /path/to/ledspicer/data -n
# Convert with automatic backup (.bak files created)
python3 convert_1.0_to_1.1.py /path/to/ledspicer/data
# Convert without backup
python3 convert_1.0_to_1.1.py /path/to/ledspicer/data --no-backup
# Convert single file
python3 convert_1.0_to_1.1.py /etc/ledspicer.conf-
version="1.0"→version="1.1"(only in<LEDSpicer>root, not XML declaration) -
direction="ForwardBouncing"→direction="Forward" bouncer="True" -
direction="BackwardBouncing"→direction="Backward" bouncer="True" - Reader inputs (Actions, Credits, Impulse, Blinker): removes
listenevents, wraps maps in<maps source="..."> - Non-reader inputs: wraps maps in
<maps>
If something goes wrong, restore from backup:
cp /etc/ledspicer.conf.bak /etc/ledspicer.conf