Skip to content

Cleanup of csv files produced by the range-test module #7595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ford-jones
Copy link
Contributor

@ford-jones ford-jones commented Aug 10, 2025

Resolves #7291
Extends the functionality of RangeTestModuleRadio to include the ability to delete previously stored range test results.

I don't have a second node to use the range test feature with, although I've compiled and flashed my changes from source and everything still works as it should.
This has been tested on two heltec v3 devices 👍

To see this feature request completed would require some work on the user interfaces, I.e. some kind of new button which invokes RangeTestModuleRadio::removeFile().

This is my first contribution here so If any potential changes must be made let me know, I'm more than happy to oblige 🔧

Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other (please specify below)

@ford-jones ford-jones changed the title Enabled deletion of files created by the range-test module Cleanup of csv files produced by the range-test module Aug 10, 2025
@fifieldt fifieldt added the enhancement New feature or request label Aug 10, 2025
@thebentern thebentern requested a review from Copilot August 12, 2025 01:59
Copy link
Contributor

@Copilot Copilot AI left a comment

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 adds functionality to delete previously stored range test CSV files from the filesystem. It extends the RangeTestModuleRadio class with a new removeFile() method that can clean up range test data, addressing issue #7291.

  • Adds a new public method removeFile() to delete range test CSV files
  • Implements filesystem cleanup with proper error handling and logging
  • Includes ESP32 architecture-specific implementation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/modules/RangeTestModule.h Adds declaration for the new removeFile() method
src/modules/RangeTestModule.cpp Implements the removeFile() method with filesystem operations and error handling

@ford-jones
Copy link
Contributor Author

I've just met with a friend and tested this on each of our Heltec v3 devices.
All is working as it should! ⚙️ ✔️

Steps taken to test:

  1. Ensure the device has a file located at /static/rangetest.csv by running the range test module on both devices.
  2. Navigate to src/modules/RangeTestModule.cpp and comment out line 125.
  3. Insert the following:
// service->sendToMesh(p);
this->removeFile();
  1. Build and flash to one of the devices.
  2. Enable the range test module, wait until the specified message interval has elapsed.
  3. Attempt to download the csv file by navigating to http://meshtastic.local/rangetest.csv where the file which once began to download will no longer be accessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Ability to delete or clear rangetest.csv from device
3 participants