-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Make GCS radio link indicator configurable #2131
Conversation
conf/airframes/examples/microjet.xml
Outdated
@@ -94,6 +94,7 @@ | |||
<!-- <define name="NO_XBEE_API_INIT" value="TRUE"/> --> | |||
|
|||
<define name="DEFAULT_CIRCLE_RADIUS" value="80."/> | |||
<define name="RC_MAX_RATE" value="70" /> <!-- pass rate in Hz, --> |
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.
final pull request probably should not include this line, or default it to the normal 50.
sw/ground_segment/cockpit/live.ml
Outdated
@@ -99,6 +99,7 @@ type aircraft = { | |||
pages : GObj.widget; | |||
notebook_label : GMisc.label; | |||
strip : Strip.t; | |||
rc_max_rate: int; |
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.
since you do everything in float later, change this to float as well
sw/ground_segment/cockpit/live.ml
Outdated
try | ||
let gcs_section = ExtXml.child af_xml ~select:(fun x -> Xml.attrib x "name" = "MISC") "section" in | ||
let fvalue = fun name default-> | ||
try ExtXml.int_attrib (ExtXml.child gcs_section ~select:(fun x -> ExtXml.attrib x "name" = name) "define") "value" with _ -> default in |
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.
use ExtXml.float_attrib
and change the 50
for 50.
sw/ground_segment/cockpit/live.ml
Outdated
@@ -882,7 +896,7 @@ let get_wind_msg = fun (geomap:G.widget) _sender vs -> | |||
let get_fbw_msg = fun alarm _sender vs -> | |||
let ac = get_ac vs in | |||
let status = PprzLink.string_assoc "rc_status" vs | |||
and rate = (PprzLink.int_assoc "rc_rate" vs) / 5 in | |||
and rate = (float_of_int ((PprzLink.int_assoc "rc_rate" vs) * 10) ) /. (float_of_int ac.rc_max_rate) in |
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.
you can then remove the float_of_int
to get rate
in float directly
sw/ground_segment/cockpit/live.mli
Outdated
@@ -49,6 +49,7 @@ type aircraft = private { | |||
pages : GObj.widget; | |||
notebook_label : GMisc.label; | |||
strip : Strip.t; | |||
rc_max_rate : int; |
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 float
See issue #1555 .
Waiting for @OpenUAS to test.