Skip to content
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

Merged
merged 2 commits into from
Nov 24, 2017

Conversation

rijesha
Copy link
Contributor

@rijesha rijesha commented Oct 20, 2017

See issue #1555 .
Waiting for @OpenUAS to test.

@@ -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, -->
Copy link
Contributor Author

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.

@@ -99,6 +99,7 @@ type aircraft = {
pages : GObj.widget;
notebook_label : GMisc.label;
strip : Strip.t;
rc_max_rate: int;

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

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

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.

@@ -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

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

@@ -49,6 +49,7 @@ type aircraft = private {
pages : GObj.widget;
notebook_label : GMisc.label;
strip : Strip.t;
rc_max_rate : int;

Choose a reason for hiding this comment

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

in float

@gautierhattenberger gautierhattenberger merged commit c8fca36 into paparazzi:master Nov 24, 2017
biancabndris pushed a commit to biancabndris/paparazzi that referenced this pull request Aug 29, 2018
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.

None yet

2 participants