-
Notifications
You must be signed in to change notification settings - Fork 2
[CPP-218][CPP-42][CPP-43] Baseline Table + Plot (front and back). #77
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
Conversation
93e81ee
to
c26fe7d
Compare
console_backend/src/constants.rs
Outdated
pub(crate) const E_FLOAT: &str = "e_Float RTK"; | ||
pub(crate) const E_FIXED: &str = "e_Fixed RTK"; | ||
pub(crate) const E_DGNSS: &str = "e_DGPS"; | ||
pub(crate) const N: &str = "N"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more meaningful names needed for N/E/D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/main/python/baseline_plot.py
Outdated
} | ||
|
||
|
||
class BaselinePlotPoints(QObject): # pylint: disable=too-many-instance-attributes,too-many-public-methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too-many-instance-attributes,too-many-public-methods
? is this copy-paste error? if not, maybe some pylint config can bump up the minimum to a more reasonable default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. You were right this was a copy paste error. Shame 👀
interval: Utils.hzToMilliseconds(Globals.currentRefreshRate) | ||
running: true | ||
repeat: true | ||
onTriggered: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks large enough to warrant being put into a standalone .js file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I broke out a decent amount into the BaselinePlotLoop.js file and sadly this sent me down quite the rabbit hole. A few findings from trying to move most of this to a separate js file:
- I was able to figure out importing QtCharts in order to make chartview series which is pretty cool.
- For the life of me I could not get the Constants/Globals to import which I think is a flaw in our implementation of the singleton. I filed a support request with qt then we can drop in replace it to this file: https://account.qt.io/support/request/INC-1654147
- There are a lot of global objects used here that must be passed in as arguments or we would need to use javascript functions to grab pointers to them which works but can be cumbersome as the number of objects grow. One workaround to this would be placing the javascript files directly in the QML such as I did originally in this script but it definitely results in the qml file being fairly cluttered.
c26fe7d
to
6a42c6d
Compare
7b44573
to
0f99ceb
Compare
console_backend/src/baseline_tab.rs
Outdated
/// - `exclude_mode`: The mode as a string not to update. Otherwise, None. | ||
fn _append_empty_sln_data(&mut self, exclude_mode: Option<String>) { | ||
for each_mode in self.mode_strings.iter() { | ||
if exclude_mode.is_some() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be something along the lines of
if exclude_mode == Some(each_mode) {
continue;
}
looks like currently if exclude_mode
is Some(_)
all of the modes will be skipped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Wow good catch. This was an artifact of me shamelessly copying over the work from the solution tab 😬. This bug was in the solution tab since I implemented it. This was one of the functions under the umbrella of "need more unitests" bugs I have filed.
https://swift-nav.atlassian.net/browse/CPP-248
https://swift-nav.atlassian.net/browse/CPP-107
pub(crate) struct BaselineTabButtons { | ||
clear: bool, | ||
pause: bool, | ||
_reset: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: probably don't need the _
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or is this because the reset isn't implemented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is currently not used. Will need to wait for the "trickle ticket" 😂 to get implemented first.
Done
(minus zoom / center features and reset filters button)Todo
Zoom / Center Features: https://swift-nav.atlassian.net/browse/CPP-245Won't get to
The reset filters button requires the new connection object to be propogated down to the tab. This will probably require a slight refactor for all tabs so left out of this PR. Ticket here: https://swift-nav.atlassian.net/browse/CPP-246
Also wouldn't hurt to add more unittests for some of the more involved functions here: https://swift-nav.atlassian.net/browse/CPP-248
EDIT: Zoom/Center Solution functionality: