-
Notifications
You must be signed in to change notification settings - Fork 42
override_tlm sets all by default, works across processes #343
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
Codecov ReportBase: 74.96% // Head: 74.93% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #343 +/- ##
==========================================
- Coverage 74.96% 74.93% -0.04%
==========================================
Files 447 446 -1
Lines 27191 27186 -5
Branches 578 578
==========================================
- Hits 20385 20372 -13
- Misses 6715 6724 +9
+ Partials 91 90 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
check check_raw check_tolerance check_tolerance_raw | ||
wait wait_raw wait_tolerance wait_tolerance_raw wait_check wait_check_raw | ||
wait_check_tolerance wait_check_tolerance_raw) | ||
check wait wait_tolerance wait_check wait_check_tolerance) |
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 removed deprecated keywords and will also update the website with deprecation notices
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.
check_tolerance missing?
# @param type [Symbol] Telemetry type, :RAW, :CONVERTED (default), :FORMATTED, or :WITH_UNITS | ||
def override_tlm(*args, type: :CONVERTED, scope: $openc3_scope, token: $openc3_token) | ||
# @param type [Symbol] Telemetry type, :ALL (default), :RAW, :CONVERTED, :FORMATTED, :WITH_UNITS | ||
def override_tlm(*args, type: :ALL, scope: $openc3_scope, token: $openc3_token) |
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 is an API change we should note but I think it makes more sense. Especially because PacketViewer shows the WITH_UNITS by default and a call to override_tlm now changes the value in PacketViewer (least surprise).
@@ -179,7 +179,7 @@ def override_tlm(*args, type: :CONVERTED, scope: $openc3_scope, token: $openc3_t | |||
# | |||
# @param args The args must either be a string or three strings | |||
# (see the calling style in the description). | |||
# @param type [Symbol] Telemetry type, :RAW, :CONVERTED (default), :FORMATTED, or :WITH_UNITS | |||
# @param type [Symbol] Telemetry type, :ALL (default), :RAW, :CONVERTED, :FORMATTED, :WITH_UNITS |
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.
All actually already was the default for normalize but this comment was wrong
return result.to_s | ||
end | ||
return result | ||
end |
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.
We were breaking the contract of FORMATTED and WITH_UNITS that they are always a String
keys = ["#{item_name}__U", "#{item_name}__F", "#{item_name}__C", item_name] | ||
if @overrides["#{target_name}__#{packet_name}__#{item_name}__#{value_type}"] | ||
# Set the result as a Hash to distingish it from the key array and from an overridden Array value | ||
keys = {'value' => @overrides["#{target_name}__#{packet_name}__#{item_name}__#{value_type}"]} |
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 don't actually care that it's a Hash but it can't be single value or an Array so this was an easy check
check check_raw check_tolerance check_tolerance_raw | ||
wait wait_raw wait_tolerance wait_tolerance_raw wait_check wait_check_raw | ||
wait_check_tolerance wait_check_tolerance_raw) | ||
check wait wait_tolerance wait_check wait_check_tolerance) |
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.
check_tolerance missing?
@overrides["#{target_name}__#{packet_name}__#{item_name}__#{type}"] = value | ||
def self.override(target_name, packet_name, item_name, value, type: :ALL, scope: $openc3_scope) | ||
if type == :ALL | ||
@overrides["#{target_name}__#{packet_name}__#{item_name}__RAW"] = value |
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.
We can't store state in instance variables.... That will only work in a single process. Need to store overrides in Redis.
Cleaned plugins and built main, stopped (kept plugin dir), then switched to this branch and built and ran successfully. |
Remove dead OverrideProtocol and deprecated api methods