Skip to content

Implemented terminal command processing, data post processing, data filters, and refresh rate tracking#66

Merged
annhypen merged 29 commits into
mainfrom
RefreshRateTrack
Apr 11, 2026
Merged

Implemented terminal command processing, data post processing, data filters, and refresh rate tracking#66
annhypen merged 29 commits into
mainfrom
RefreshRateTrack

Conversation

@annhypen

Copy link
Copy Markdown
Contributor
  • Added terminal command processing
  • Added data post-processing methods that can be called from the terminal (setOffset, setScale, reset)
  • Added moving average filter
  • Added a refresh rate tracker to monitor and print data received per second when running with ./run.sh -noesp -bitrate

annhypen and others added 29 commits February 28, 2026 16:11
@annhypen annhypen requested a review from aexzhou April 11, 2026 07:39
@@ -0,0 +1,28 @@
#include "client/data_filters.hpp";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The ; at the end of this line should be removed

return data*currentScaleFactor + currentOffset;
}

void PostProcessing::addOffset(float offset) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This isn't anything major, but just want to leave a comment as an "FYI" :) , but this method sets the values, so a better name for this method could be setOffset instead of addOffset


#ifdef BENCHMARK
// track bitrate
std::time_t prevRefresh_ = std::time(nullptr);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It might be better to use std::chrono::steady_clock and duration_cast<milliseconds> for rate measurements - leaving this as a reference for potential future improvement :)

Comment on lines +40 to +45
//get the parameters from command
size_t firstSpace = command.find(' ');
size_t secondSpace = command.find(' ', firstSpace + 1);
std::string firstParameter = command.substr(firstSpace + 1, secondSpace - firstSpace - 1);
std::string secondParameter = command.substr(secondSpace + 1);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just adding a note here:
If there are no spaces between the two arguments, or maybe even entering "exit", firstParameter may become the full string

@aexzhou aexzhou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great work! Glad to see everything all coming together!
We can merge this PR for now if y'all prefer, and keep a note of some of the comments I've left and make additional PRs from new branches to patch those - but I'll let yall decide!

@annhypen annhypen added this pull request to the merge queue Apr 11, 2026
Merged via the queue into main with commit 67eecec Apr 11, 2026
2 checks 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.

3 participants