Render complete channel activity summary pages - #1428
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1428 +/- ##
==========================================
- Coverage 0.40% 0.40% -0.01%
==========================================
Files 20 20
Lines 17176 17199 +23
Branches 11 11
==========================================
Hits 69 69
- Misses 17103 17126 +23
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Channel Summary (channel activity) UI logic to ensure every supported channel entry is reachable while keeping a consistent number of visible entries per page by overlapping the final page instead of rendering a short tail page.
Changes:
- Added page helper methods to compute page count and the start/end indices for the current activity page (including “full final page” overlap behavior).
- Updated channel hopping, channel label rendering, and serial logging to iterate over the computed visible page range.
- Updated graph scaling/drawing to operate on the current page slice of
channel_activity, and simplified page navigation bounds checks.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| esp32_marauder/WiFiScan.h | Declares new channel-activity paging helpers on WiFiScan. |
| esp32_marauder/WiFiScan.cpp | Implements paging helpers and applies them to channel hop, channel line rendering, and activity logging/page navigation. |
| esp32_marauder/MenuFunctions.h | Adjusts small-graph APIs to accept a page-sized slice and adds const-correctness. |
| esp32_marauder/MenuFunctions.cpp | Uses the page slice for scaling/drawing the channel activity graph and updates page navigation to use the computed page count. |
Suppressed comments (4)
esp32_marauder/WiFiScan.cpp:10059
- In dual-band, non-ranged channel hopping can increment dual_band_channel_index to DUAL_BAND_CHANNELS (out of bounds) because top_chan is set to DUAL_BAND_CHANNELS while the index is 0..DUAL_BAND_CHANNELS-1. This can read past dual_band_channels[] when set_channel is assigned.
if ((this->dual_band_channel_index < bot_chan) || (this->dual_band_channel_index >= top_chan))
this->dual_band_channel_index = bot_chan;
else
this->dual_band_channel_index++;
this->set_channel = this->dual_band_channels[this->dual_band_channel_index];
esp32_marauder/MenuFunctions.cpp:4064
- drawGraphSmall() should still track the per-page max so the "Max" UI value can be updated. Without updating maxValue inside the loop, any max rendering will remain incorrect.
for (int i = 1; i < CHAN_PER_PAGE + 1; i++) {
int targ_val = i - 1;
int x_mult = (i * 2) - 1;
int x_coord = (SCREEN_WIDTH / (CHAN_PER_PAGE * 2)) * (x_mult - 1);
if (values[targ_val] * this->_graph_scale <= GRAPH_VERT_LIM) {
display_obj.tft.fillRect(x_coord, SCREEN_HEIGHT / 2 + 1, bar_width, SCREEN_HEIGHT / 2 + 1, TFT_BLACK);
esp32_marauder/MenuFunctions.cpp:4078
- In the HAS_DUAL_BAND branch of drawGraphSmall(), the per-page max should be tracked as well so the "Max" UI value can be updated consistently across builds.
for (int i = 1; i < CHAN_PER_PAGE + 1; i++) {
int targ_val = i - 1;
int x_mult = (i * 2) - 1;
int x_coord = (SCREEN_WIDTH / (CHAN_PER_PAGE * 2)) * (x_mult - 1);
if (values[targ_val] * this->_graph_scale <= GRAPH_VERT_LIM) {
display_obj.tft.fillRect(x_coord, SCREEN_HEIGHT / 2 + 1, bar_width + 3, SCREEN_HEIGHT / 2 + 1, TFT_BLACK);
esp32_marauder/MenuFunctions.cpp:4085
- After reintroducing maxValue tracking in drawGraphSmall(), the max value should be rendered (as it was previously) so the "Max" label produced by renderGraphUI remains accurate.
display_obj.tft.drawLine(x_coord - 2, SCREEN_HEIGHT - GRAPH_VERT_LIM - (CHAR_WIDTH * 2), x_coord - 2, SCREEN_HEIGHT, TFT_WHITE);
}
#endif
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
All 22 firmware matrix builds and the Native Unity tests pass on this head. The remaining red statuses are limited to the repository-wide Codecov policy addressed separately in #1448. |
Summary
Testing