Skip to content

Render complete channel activity summary pages - #1428

Open
p-keminer wants to merge 2 commits into
justcallmekoko:developfrom
p-keminer:fix/channel-summary-pages
Open

Render complete channel activity summary pages#1428
p-keminer wants to merge 2 commits into
justcallmekoko:developfrom
p-keminer:fix/channel-summary-pages

Conversation

@p-keminer

Copy link
Copy Markdown

Summary

  • make every supported channel-summary entry reachable
  • keep seven visible entries on every page, using an overlapping final page instead of an undersized tail

Testing

  • Focused ESP32-C5 hardware test: all supported pages showed seven entries, including the overlapping final page. Navigation and exit remained stable with no phantom bar, blinking value, out-of-bounds symptom, reset, or touch loss.

Copilot AI lite review requested due to automatic review settings August 9, 2026 18:43
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 81 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.40%. Comparing base (66f3c81) to head (ba4516c).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
esp32_marauder/WiFiScan.cpp 0.00% 60 Missing ⚠️
esp32_marauder/MenuFunctions.cpp 0.00% 21 Missing ⚠️
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              
Flag Coverage Δ
firmware-unit-tests 0.40% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread esp32_marauder/MenuFunctions.cpp

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@p-keminer

Copy link
Copy Markdown
Author

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.

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