-
Notifications
You must be signed in to change notification settings - Fork 130
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
Tlm screen api #652
Tlm screen api #652
Conversation
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 was awesome in the demo you gave. Have you thought about how this will work with DART?
@@ -42,4 +42,4 @@ BACKGROUND_TASK example_background_task.rb | |||
STOPPED | |||
BACKGROUND_TASK limits_groups.rb 5 # Initial delay to allow interfaces to connect | |||
|
|||
COLLECT_METADATA | |||
#COLLECT_METADATA |
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.
Is there a reason this got commented out?
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.
Every time I start CmdTlmServer it pops up and annoys me. I could be convinced to put it back as the default with a good argument.
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 only mention because #655 found a bug in the basic install because we we NOT using it. As long as it's part of the AHK test I'm ok leaving it out.
lib/cosmos/system/system.rb
Outdated
@@ -545,6 +485,91 @@ def self.load_configuration(name = nil) | |||
return self.instance.load_configuration(name) | |||
end | |||
|
|||
def reset_variables(filename = nil) |
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.
Please add comment block on the method
config_file = DEFAULT_CONFIG_FILE, | ||
production = false, | ||
disconnect = false, | ||
mode = :CMD_TLM_SERVER) |
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.
Please update the comment block. I see create_message_log went away which apparently was never documented. Didn't we have some other ticket to remove that?
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.
Also update comment blocks throughout. I'm not especially hard over on new simply methods but there are a bunch where you refactored things and now parameters don't match the method signature. I know, documentation ...
|
||
# Set Threads to kill CTS if they throw an exception | ||
Thread.abort_on_exception = true | ||
|
||
# Don't start the DRb service or the telemetry monitoring thread | ||
# if we started the server in disconnect mode | ||
@json_drb = nil | ||
start(production) unless @disconnect | ||
unless @disconnect |
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.
Still feels like this giant block of code should be a separate method to me. Not sure why you inlined it.
if @reload_callback | ||
@reload_callback.call(false) | ||
else | ||
System.reset |
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.
Why is System.reset only called if there is NOT a reload_callback? How are these two states used? Please document.
Qt.execute_in_main_thread(true) do | ||
handle_string_output() | ||
@output_sleeper.cancel | ||
Qt::CoreApplication.processEvents() |
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.
How did this ever work outside of a execute_in_main_thread?
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 believe it was only ever called from GUI context before these changes
@server_gui = server_gui | ||
@interfaces_table = {} | ||
@name = name |
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.
Save the name! Much better than passing it around. 👍
@speed_select.connect(SIGNAL('currentIndexChanged(int)')) do | ||
CmdTlmServer.replay_backend.set_playback_delay(@speed_select.itemData(@speed_select.currentIndex).value) | ||
end | ||
@speed_layout = Qt::FormLayout.new() |
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 comment applies throughout: do all these need to be instance variables? This one (for example) is only used here.
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.
In older versions of qtbindings they did need to be instance variables to prevent getting garbage collected. In newer versions it isn't necessary but doesn't hurt anything.
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.
Except for my eyes!
|
||
# Set the replay delay | ||
# | ||
# @param delay [Float] delay between packets in seconds 0.0 to 1.0, nil = No Delay, -1.0 = REALTIME |
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 think we need to document somewhere on the GUI that nil means No Delay and -1 means REALTIME. What's the difference between 0 delay and nil (No Delay)? Could nil be realtime and 0 be no delay? -1 for a value just isn't that intuitive.
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.
In the GUI it is a combobox, so doesn't really need to be documented there. It just needs to be documented with the new API methods. I agree the values aren't very intuitive and we could make realtime = nil and no delay = 0. It would just change the code a bit. I'll look into it.
@replay_flag = Qt::Label.new("Replay Mode") | ||
@replay_flag.setStyleSheet("background:green;color:white;padding:5px;font-weight:bold;") | ||
@top_layout.addWidget(@replay_flag) | ||
@replay_flag.hide |
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 love the way this Replay Mode notification in the GUI was done. 🥇
Codecov Report
@@ Coverage Diff @@
## master #652 +/- ##
=========================================
- Coverage 81.11% 79.1% -2.01%
=========================================
Files 150 153 +3
Lines 13658 14298 +640
=========================================
+ Hits 11079 11311 +232
- Misses 2579 2987 +408
Continue to review full report at Codecov.
|
Create Api to get screen list and a specific screen definition