Skip to content

refactor(decoder): split TTN variants by payload version and drop decoder wrappers (cpl01, ldds75, wsc1-l, lht52) - #65

Closed
Lance-dragino wants to merge 4 commits into
dragino:mainfrom
Lance-dragino:refactor/decoder-align-ttn-repo-remove-wrapper
Closed

Lance-dragino wants to merge 4 commits into
dragino:mainfrom
Lance-dragino:refactor/decoder-align-ttn-repo-remove-wrapper

Conversation

@Lance-dragino

Copy link
Copy Markdown
Collaborator

Summary

Rearrange and rewrite the TTN variants of four Dragino decoders so that each
payload format has its own file, and each file exposes a single decodeUplink
entry point.

File changes

Old file New file Payload
CPL01/Decoder.txt CPL01/CPL01_TTN_v1.0.txt 1.0
LDDS75/LDDS75 decoder--TTN.txt LDDS75/LDDS75_TTN_v1.0.3.txt 5-byte, firmware ≤ 1.1.2
— LDDS75/LDDS75_TTN_v1.1.4.txt 8-byte, firmware ≥ 1.1.4
LHT52/LHT52 Decoder TTN.txt LHT52/LHT52_TTN_v1.0.txt 1.0
— Weather Station/WSC1-L_TTN_v1.1.txt firmware 1.0 – 1.3.0
— Weather Station/WSC1-L_TTN_v1.3.1.txt firmware ≥ 1.3.1

Content changes

  • Single entry point: the Decoder(bytes, port) / Decode(fPort, bytes, variables)
    wrapper is removed; each file now only defines decodeUplink(input).
  • cpl01: fPort 2 field is LAST_DISCONNECT_DURATION (was already the case on the
    device-repository side).
  • ldds75: split by payload format. The 5-byte variant reports Bat, Distance,
    Interrupt_status; the 8-byte variant adds Interrupt_flag, TempC_DS18B20,
    Sensor_flag.
  • lht52: fPort 3 returns a DATALOG string; Systimestamp is unsigned.
  • wsc1-l: 1.3.1 adds wind_speed_max and wind_speed_avg (V1.3.1 changelog:
    "Increase the maximum wind speed value and average wind speed value").
  • Node_type is emitted on the same branches as in the device repository.

Verification

Each file is byte-identical to the corresponding decoder in the device repository
(TheThingsNetwork/lorawan-devices#1095), except that
normalizeUplink is omitted here — it only exists on the repository side.

…ith device repository

- CPL01/Decoder.txt -> CPL01/CPL01_TTN_v1.0.txt
- LDDS75 decoder--TTN.txt -> LDDS75/LDDS75_TTN_v1.0.3.txt
- add LDDS75/LDDS75_TTN_v1.1.4.txt
Content of the TTN variants is now byte-identical to the corresponding decoder in the device repository, except for normalizeUplink, which only exists on the repository side.
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.

1 participant