Skip to content

filter: space after each comma in the statistics replies - #52

Merged
Elektr0Vodka merged 1 commit into
dmc-devfrom
enhancement/dmc-dev-filter-stats-spacing
Dec 1, 2026
Merged

Elektr0Vodka merged 1 commit into
dmc-devfrom
enhancement/dmc-dev-filter-stats-spacing

Conversation

@Elektr0Vodka

Copy link
Copy Markdown

Problem

A user asked for a space after the comma in the filter statistics. Long replies such as filter stats channel are hard to read without it.

Change

Command Before After
filter stats channel #test (D9): 744,#ping (28): 0 #test (D9): 744, #ping (28): 0
filter stats path A1B2: 412,C3: 0 A1B2: 412, C3: 0
filter stats sender / text Bot*: 12 (pass 3),Spam: 5 Bot*: 12 (pass 3), Spam: 5
filter count 05: 2,10 05: 2, 10 (header: [TYPE: HOPS, RATE])

The companion filter shares the path, sender and text formatters, so its stats replies change too.

filter rate and the filter ... list replies are unchanged. The toolbox reads those back and matches the literal LIMIT,SECS,SOFT, and a default filter rate reply is already close to the 160-byte limit.

Trade-off

The reply limit stays the same, so a full list can show one entry less, and filter count can lose a last row once the counters get large. Both are still marked with ...

Compatibility

parseFilterCount in the toolbox already accepts optional whitespace around the comma, so it needs no change.

Tests

  • Updated expectations in test_filterstats; two new cases in test_filter_channel (stats spaced, list compact).
  • pio test -e native: 272/272 passed.
  • pio run -e RAK_4631_repeater succeeded. No other board was built.

Not tested on hardware or over the air.

Propagation

dmc-observer-dev and dmc-dev-packetlog do not have #50 yet, so this conflicts in Filter.cpp there unless #50 goes along or first.

`filter stats channel|path|sender|text` and `filter count` now separate
entries with ", " so they are easier to read.

`filter rate` and the `filter ... list` replies keep the bare comma: the
toolbox parses them back, and the spaces would cost rows or entries at the
160-byte reply limit.
@Elektr0Vodka
Elektr0Vodka merged commit a992eac into dmc-dev Dec 1, 2026
1 check passed
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