Skip to content

feat: Add MAC address display to WiFi Networks screen#2

Merged
lukestein merged 5 commits intofeat/add-mac-address-displayfrom
copilot/add-mac-address-display
Jan 14, 2026
Merged

feat: Add MAC address display to WiFi Networks screen#2
lukestein merged 5 commits intofeat/add-mac-address-displayfrom
copilot/add-mac-address-display

Conversation

Copy link

Copilot AI commented Jan 14, 2026

Plan to Add MAC Address Display on WiFi Networks Screen

  • Understand the existing code structure for WiFi Networks screen
  • Add MAC address retrieval and formatting logic
  • Update the renderNetworkList() method to display MAC address above network count and legend
  • Fix buffer size for MAC address string
  • Address code review feedback
  • Final verification and code review passed
  • Fix clang-format CI issue

Summary:

Successfully implemented the feature to display the device's MAC address on the WiFi Networks screen.

Implementation:

  • Cached MAC address in cachedMacAddress member variable, populated once in onEnter()
  • MAC address displayed at pageHeight - 105 (above network count and legend)
  • Format: MAC address: xx-xx-xx-xx-xx-xx (lowercase hex for consistency with existing code)
  • Minimal, surgical changes - no impact on existing functionality
  • Code review passed with no issues
  • Security scan completed with no vulnerabilities
  • Fixed clang-format line length issue
Original prompt

This section details on the original issue you should resolve

<issue_title>Feature request: Show MAC address on "WiFi Networks" screen</issue_title>
<issue_description>It would be useful to be able to see the MAC address of the current ereader device.

The "WiFi Networks" screen shows a legend at the bottom of the screen listing the number of networks found and showing which are Encrypted and which are Saved.

Task: Add a display of the device's MAC address (MAC address: XX-XX-XX-XX-XX-XX) just above the number of wifi networks and the legend describing them.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add display of MAC address on WiFi Networks screen Add MAC address display to WiFi Networks screen Jan 14, 2026
Copilot AI requested a review from lukestein January 14, 2026 21:10
@lukestein lukestein changed the title Add MAC address display to WiFi Networks screen feat: Add MAC address display to WiFi Networks screen Jan 14, 2026
@lukestein
Copy link
Owner

@copilot there seems to be an issue with the CI process:

4s
Run PATH="/usr/lib/llvm-21/bin:$PATH" ./bin/clang-format-fix && git diff --exit-code || (echo "Please run 'bin/clang-format-fix' to fix formatting issues" && exit 1)
  PATH="/usr/lib/llvm-21/bin:$PATH" ./bin/clang-format-fix && git diff --exit-code || (echo "Please run 'bin/clang-format-fix' to fix formatting issues" && exit 1)
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.14.2/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.14.2/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.14.2/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.14.2/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.14.2/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.14.2/x64/lib
diff --git a/src/activities/network/WifiSelectionActivity.cpp b/src/activities/network/WifiSelectionActivity.cpp
index 1c2cab5..07d4441 100644
--- a/src/activities/network/WifiSelectionActivity.cpp
+++ b/src/activities/network/WifiSelectionActivity.cpp
@@ -41,8 +41,8 @@ void WifiSelectionActivity::onEnter() {
   uint8_t mac[6];
   WiFi.macAddress(mac);
   char macStr[32];
-  snprintf(macStr, sizeof(macStr), "MAC address: %02x-%02x-%02x-%02x-%02x-%02x",
-           mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+  snprintf(macStr, sizeof(macStr), "MAC address: %02x-%02x-%02x-%02x-%02x-%02x", mac[0], mac[1], mac[2], mac[3], mac[4],
+           mac[5]);
   cachedMacAddress = std::string(macStr);
 
   // Trigger first update to show scanning message
Please run 'bin/clang-format-fix' to fix formatting issues
Error: Process completed with exit code 1.

Copy link
Author

Copilot AI commented Jan 14, 2026

@copilot there seems to be an issue with the CI process:

...

Fixed in commit 666af1d. The snprintf line has been reformatted to comply with the clang-format line length requirements.

@lukestein lukestein changed the base branch from master to feat/add-mac-address-display January 14, 2026 21:35
@lukestein lukestein marked this pull request as ready for review January 14, 2026 21:36
@lukestein lukestein merged commit e5d05a9 into feat/add-mac-address-display Jan 14, 2026
3 checks passed
lukestein pushed a commit that referenced this pull request Feb 2, 2026
Address review comments #2, #3, and crosspoint-reader#10:
- Extract duplicated bayer4x4 matrix, applyBayerDither4Level(), and
  drawPixelWithRenderMode() into shared DitherUtils.h
- Extract duplicated PixelCache struct into shared PixelCache.h so both
  JPEG and PNG decoders use the same implementation
- Add MAX_CACHE_BYTES (256KB) size limit to PixelCache::allocate() to
  proactively guard against oversized allocations on embedded targets
lukestein pushed a commit that referenced this pull request Feb 2, 2026
Address review comments #2 and #3:
- Remove duplicated bayer4x4, applyBayerDither4Level(),
  drawPixelWithRenderMode(), and PixelCache from JPEG decoder
- Include shared DitherUtils.h and PixelCache.h instead
lukestein pushed a commit that referenced this pull request Feb 2, 2026
Address review comments #2, #3, and crosspoint-reader#10:
- Extract duplicated bayer4x4 matrix, applyBayerDither4Level(), and
  drawPixelWithRenderMode() into shared DitherUtils.h
- Extract duplicated PixelCache struct into shared PixelCache.h so both
  JPEG and PNG decoders use the same implementation
- Add MAX_CACHE_BYTES (256KB) size limit to PixelCache::allocate() to
  proactively guard against oversized allocations on embedded targets
lukestein pushed a commit that referenced this pull request Feb 2, 2026
Address review comments #2 and #3:
- Remove duplicated bayer4x4, applyBayerDither4Level(),
  drawPixelWithRenderMode(), and PixelCache from JPEG decoder
- Include shared DitherUtils.h and PixelCache.h instead
lukestein pushed a commit that referenced this pull request Feb 3, 2026
Address review comments #2, #3, and crosspoint-reader#10:
- Extract duplicated bayer4x4 matrix, applyBayerDither4Level(), and
  drawPixelWithRenderMode() into shared DitherUtils.h
- Extract duplicated PixelCache struct into shared PixelCache.h so both
  JPEG and PNG decoders use the same implementation
- Add MAX_CACHE_BYTES (256KB) size limit to PixelCache::allocate() to
  proactively guard against oversized allocations on embedded targets
lukestein pushed a commit that referenced this pull request Feb 3, 2026
Address review comments #2 and #3:
- Remove duplicated bayer4x4, applyBayerDither4Level(),
  drawPixelWithRenderMode(), and PixelCache from JPEG decoder
- Include shared DitherUtils.h and PixelCache.h instead
lukestein pushed a commit that referenced this pull request Feb 3, 2026
Address review comments #2, #3, and crosspoint-reader#10:
- Extract duplicated bayer4x4 matrix, applyBayerDither4Level(), and
  drawPixelWithRenderMode() into shared DitherUtils.h
- Extract duplicated PixelCache struct into shared PixelCache.h so both
  JPEG and PNG decoders use the same implementation
- Add MAX_CACHE_BYTES (256KB) size limit to PixelCache::allocate() to
  proactively guard against oversized allocations on embedded targets
lukestein pushed a commit that referenced this pull request Feb 3, 2026
Address review comments #2 and #3:
- Remove duplicated bayer4x4, applyBayerDither4Level(),
  drawPixelWithRenderMode(), and PixelCache from JPEG decoder
- Include shared DitherUtils.h and PixelCache.h instead
lukestein pushed a commit that referenced this pull request Feb 3, 2026
Address review comments #2, #3, and crosspoint-reader#10:
- Extract duplicated bayer4x4 matrix, applyBayerDither4Level(), and
  drawPixelWithRenderMode() into shared DitherUtils.h
- Extract duplicated PixelCache struct into shared PixelCache.h so both
  JPEG and PNG decoders use the same implementation
- Add MAX_CACHE_BYTES (256KB) size limit to PixelCache::allocate() to
  proactively guard against oversized allocations on embedded targets
lukestein pushed a commit that referenced this pull request Feb 3, 2026
Address review comments #2 and #3:
- Remove duplicated bayer4x4, applyBayerDither4Level(),
  drawPixelWithRenderMode(), and PixelCache from JPEG decoder
- Include shared DitherUtils.h and PixelCache.h instead
lukestein pushed a commit that referenced this pull request Feb 5, 2026
Address review comments #2, #3, and crosspoint-reader#10:
- Extract duplicated bayer4x4 matrix, applyBayerDither4Level(), and
  drawPixelWithRenderMode() into shared DitherUtils.h
- Extract duplicated PixelCache struct into shared PixelCache.h so both
  JPEG and PNG decoders use the same implementation
- Add MAX_CACHE_BYTES (256KB) size limit to PixelCache::allocate() to
  proactively guard against oversized allocations on embedded targets
lukestein pushed a commit that referenced this pull request Feb 5, 2026
Address review comments #2 and #3:
- Remove duplicated bayer4x4, applyBayerDither4Level(),
  drawPixelWithRenderMode(), and PixelCache from JPEG decoder
- Include shared DitherUtils.h and PixelCache.h instead
lukestein pushed a commit that referenced this pull request Feb 5, 2026
Address review comments #2, #3, and crosspoint-reader#10:
- Extract duplicated bayer4x4 matrix, applyBayerDither4Level(), and
  drawPixelWithRenderMode() into shared DitherUtils.h
- Extract duplicated PixelCache struct into shared PixelCache.h so both
  JPEG and PNG decoders use the same implementation
- Add MAX_CACHE_BYTES (256KB) size limit to PixelCache::allocate() to
  proactively guard against oversized allocations on embedded targets
lukestein pushed a commit that referenced this pull request Feb 5, 2026
Address review comments #2 and #3:
- Remove duplicated bayer4x4, applyBayerDither4Level(),
  drawPixelWithRenderMode(), and PixelCache from JPEG decoder
- Include shared DitherUtils.h and PixelCache.h instead
lukestein pushed a commit that referenced this pull request Feb 9, 2026
Address review comments #2, #3, and crosspoint-reader#10:
- Extract duplicated bayer4x4 matrix, applyBayerDither4Level(), and
  drawPixelWithRenderMode() into shared DitherUtils.h
- Extract duplicated PixelCache struct into shared PixelCache.h so both
  JPEG and PNG decoders use the same implementation
- Add MAX_CACHE_BYTES (256KB) size limit to PixelCache::allocate() to
  proactively guard against oversized allocations on embedded targets
lukestein pushed a commit that referenced this pull request Feb 9, 2026
Address review comments #2 and #3:
- Remove duplicated bayer4x4, applyBayerDither4Level(),
  drawPixelWithRenderMode(), and PixelCache from JPEG decoder
- Include shared DitherUtils.h and PixelCache.h instead
lukestein pushed a commit that referenced this pull request Feb 9, 2026
Address review comments #2, #3, and crosspoint-reader#10:
- Extract duplicated bayer4x4 matrix, applyBayerDither4Level(), and
  drawPixelWithRenderMode() into shared DitherUtils.h
- Extract duplicated PixelCache struct into shared PixelCache.h so both
  JPEG and PNG decoders use the same implementation
- Add MAX_CACHE_BYTES (256KB) size limit to PixelCache::allocate() to
  proactively guard against oversized allocations on embedded targets
lukestein pushed a commit that referenced this pull request Feb 9, 2026
Address review comments #2 and #3:
- Remove duplicated bayer4x4, applyBayerDither4Level(),
  drawPixelWithRenderMode(), and PixelCache from JPEG decoder
- Include shared DitherUtils.h and PixelCache.h instead
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.

Feature request: Show MAC address on "WiFi Networks" screen

2 participants