Skip to content

Conversation

john-michaelburke
Copy link
Collaborator

Implements

  • Implements a bin FftMonitor for capturing 5 Specan messages and saving them as a pickle file.
  • Implements the frontend and backend for the Advanced Spectrum Analyzer Sub tab.

To - Run

  • Spectrum Analyzer Subtab
cargo make run -- --tab=ADVANCED_SPECTRUM_ANALYZER tcp 10.1.54.1 --port=55555
  • FFTMonitor bin
cargo run --bin=fft_monitor --no-default-features  --features="fft" 10.1.54.1 --port 55555 --channel=2

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/fft branch 2 times, most recently from e0a68c8 to 72bd97b Compare July 23, 2021 20:12

@Slot(list) # type: ignore
def fill_series(self, series):
for line in series:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could not deduce what the type of Slot this was if I passed just the single line back to python here which is why I'm using a list here and iterating over.

I tried using QLine but this does not have the replace function similar to what we use in other QObject definitions.

Maybe @jayvdb you would know?

Copy link
Contributor

Choose a reason for hiding this comment

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

PySide2.QtCore.QLine has methods setPoints and setLine which match the docs at https://doc.qt.io/qt-5/qline.html#setLine . So only accepts two points...? I havent found a polyline.

I guess https://doc.qt.io/qtforpython-5/PySide2/QtGui/QPolygon.html#PySide2.QtGui.PySide2.QtGui.QPolygon is going to want to close the shape, so that likely wont work.

https://stackoverflow.com/questions/13368947/drawing-a-line-consisting-of-multiple-points-using-pyqt suggests using a QGraphicsScene and use QGraphicsLineItem to drop on multiple QLine to form the polyline. https://felgo.com/doc/felgo-lineitem/ is similar but with QML. maybe then https://doc.qt.io/qtforpython-5/PySide2/QtWidgets/QGraphicsLineItem.html could be the slot type inside the list, but that doesnt radically improve on what you have here.
It might be worth trying this if we have more of these polylines in the console, but IMO your current approach seems a better fit given most of the graphs in the console have multiple series

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Replaced and figured it out QtCharts.QtCharts.XYSeries is the inner type.

@john-michaelburke john-michaelburke marked this pull request as ready for review July 23, 2021 22:21
@john-michaelburke john-michaelburke requested a review from a team July 23, 2021 22:21
readonly property int dropdownWidth: 100
readonly property var dropdownModel: ["Channel 1", "Channel 2", "Channel 3", "Channel 4"]
readonly property string dropdownLabel: "Channel Selection:"
readonly property string dropdownRowSuggestionText: "Enable with setting in \"System Monitor\" group."
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this referring to the "System Monitor" sub-tab? Currently it is blank, making this a bit confusing atm.

Also it looks to be in monospace, which is a bit odd.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is an advanced setting feature in the settings tab that is in the System Monitor group. That being said Ill try to mention the settings tab as well so it is more clear.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. I removed the monospace and revised the message to be more clear!

@john-michaelburke john-michaelburke requested a review from jayvdb July 26, 2021 19:29
@john-michaelburke john-michaelburke merged commit 6274eb7 into main Jul 26, 2021
@john-michaelburke john-michaelburke deleted the john-michaelburke/fft branch July 26, 2021 22:38
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