mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-22 20:36:06 +08:00
upgrade voltage and current to float (#2360)
merged with https://github.com/paparazzi/pprzlink/pull/95
This commit is contained in:
committed by
Gautier Hattenberger
parent
16444fd8c7
commit
70d221ed62
@@ -90,7 +90,7 @@ Flapping wing frame equiped with
|
||||
<define name="MilliAmpereOfAdc(adc)" value="((float)adc) * (3.3f / 4096.0f) * (90.0f / 5.0f)" />
|
||||
<!-- 100Amp = 2Volt -> 2482,42 tick/100Amp"(0.0402832*adc)" -->
|
||||
|
||||
<define name="DefaultVoltageOfAdc(adc)" value="(0.00384*adc)"/>
|
||||
<define name="VoltageOfAdc(adc)" value="(0.00384*adc)"/>
|
||||
</section>
|
||||
<section name="IMU" prefix="IMU_">
|
||||
<!-- replace this with your own calibration -->
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
</rows>
|
||||
<widget NAME="map2d" size="1496">
|
||||
<papget type="message_field" display="text" x="16" y="172">
|
||||
<property name="scale" value="0.1"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="field" value="FBW_STATUS:vsupply"/>
|
||||
<property name="format" value="FTD %.1f V"/>
|
||||
<property name="size" value="15."/>
|
||||
<property name="color" value="#00ff00"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="text" x="252" y="3">
|
||||
<property name="scale" value="0.001"/>
|
||||
<property name="field" value="MOTOR:current"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="field" value="ENERGY:current"/>
|
||||
<property name="format" value="Mot %.2f A"/>
|
||||
<property name="size" value="15."/>
|
||||
<property name="color" value="#00ff00"/>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<property name="icon" value="openuas_takeoff.png"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="gauge" x="70" y="0">
|
||||
<property name="field" value="BAT:voltage"/>
|
||||
<property name="scale" value="0.1"/>
|
||||
<property name="field" value="ENERGY:voltage"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="min" value="0."/>
|
||||
<property name="max" value="8.7"/>
|
||||
<property name="size" value="100."/>
|
||||
@@ -53,8 +53,8 @@
|
||||
<property name="icon" value="openuas_standby.png"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="gauge" x="370" y="0">
|
||||
<property name="field" value="BAT:throttle"/>
|
||||
<property name="scale" value="0.0104167"/>
|
||||
<property name="field" value="ENERGY:throttle"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="min" value="0."/>
|
||||
<property name="max" value="100."/>
|
||||
<property name="size" value="100."/>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<property name="icon" value="openuas_home.png"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="gauge" x="172" y="145">
|
||||
<property name="field" value="BAT:voltage"/>
|
||||
<property name="scale" value="0.1"/>
|
||||
<property name="field" value="ENERGY:voltage"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="min" value="0."/>
|
||||
<property name="max" value="8.7"/>
|
||||
<property name="size" value="100."/>
|
||||
@@ -37,8 +37,8 @@
|
||||
<property name="scale" value="10"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="gauge" x="170" y="268">
|
||||
<property name="field" value="BAT:throttle"/>
|
||||
<property name="scale" value="0.0104167"/>
|
||||
<property name="field" value="ENERGY:throttle"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="min" value="0."/>
|
||||
<property name="max" value="100."/>
|
||||
<property name="size" value="100."/>
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
<property name="color" value="#00ff00"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="text" x="130" y="3">
|
||||
<property name="scale" value="0.1"/>
|
||||
<property name="field" value="ROTORCRAFT_STATUS:vsupply"/>
|
||||
<property name="format" value="Bat %.1f V"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="field" value="ENERGY:voltage"/>
|
||||
<property name="format" value="Bat %.2f V"/>
|
||||
<property name="size" value="15."/>
|
||||
<property name="color" value="#00ff00"/>
|
||||
</papget>
|
||||
@@ -53,9 +53,9 @@
|
||||
<property name="color" value="#00ff00"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="text" x="374" y="3">
|
||||
<property name="scale" value="0.1"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="field" value="FBW_STATUS:vsupply"/>
|
||||
<property name="format" value="FTD %.1f V"/>
|
||||
<property name="format" value="FTD %.2f V"/>
|
||||
<property name="size" value="15."/>
|
||||
<property name="color" value="#00ff00"/>
|
||||
</papget>
|
||||
@@ -97,8 +97,8 @@
|
||||
<property name="color" value="#00ff00"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="text" x="252" y="3">
|
||||
<property name="scale" value="0.001"/>
|
||||
<property name="field" value="MOTOR:current"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="field" value="ENERGY:current"/>
|
||||
<property name="format" value="Mot %.2f A"/>
|
||||
<property name="size" value="15."/>
|
||||
<property name="color" value="#00ff00"/>
|
||||
|
||||
+11
-10
@@ -14,25 +14,26 @@
|
||||
<property name="locked" value="true"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="gauge" x="47" y="414">
|
||||
<property name="field" value="BAT:voltage"/>
|
||||
<property name="scale" value="0.1"/>
|
||||
<property name="field" value="ENERGY:voltage"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="min" value="0."/>
|
||||
<property name="max" value="15."/>
|
||||
<property name="size" value="50."/>
|
||||
<property name="text" value="Bat(V)"/>
|
||||
</papget>
|
||||
<papget type="message_field" display="gauge" x="120" y="414">
|
||||
<property name="field" value="BAT:throttle"/>
|
||||
<property name="scale" value="0.0104167"/>
|
||||
<papget type="message_field" display="gauge" x="140" y="414">
|
||||
<property name="field" value="ENERGY:throttle"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="min" value="0."/>
|
||||
<property name="max" value="100."/>
|
||||
<property name="size" value="50."/>
|
||||
<property name="text" value="Throttle(%)"/>
|
||||
</papget>
|
||||
<papget type="expression" display="gauge" x="200" y="414">
|
||||
<property name="expr" value="ENERGY.bat*ENERGY.amp"/>
|
||||
<papget type="expression" display="gauge" x="240" y="414">
|
||||
<property name="expr" value="ENERGY.power"/>
|
||||
<property name="scale" value="1."/>
|
||||
<property name="min" value="0."/>
|
||||
<property name="max" value="25."/>
|
||||
<property name="max" value="100."/>
|
||||
<property name="size" value="50."/>
|
||||
<property name="text" value="Power(W)"/>
|
||||
</papget>
|
||||
@@ -48,9 +49,9 @@
|
||||
<property name="color" value="pink"/>
|
||||
</papget>
|
||||
|
||||
<papget type="expression" display="text" x="250" y="414">
|
||||
<papget type="expression" display="text" x="310" y="422">
|
||||
<property name="expr" value="BlockName(NAVIGATION.cur_block)"/>
|
||||
<property name="size" value="20."/>
|
||||
<property name="size" value="15."/>
|
||||
<property name="color" value="white"/>
|
||||
</papget>
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
<rows>
|
||||
<widget NAME="map2d" SIZE="500">
|
||||
<papget type="message_field" display="text" x="5" y="125">
|
||||
<property name="field" value="BAT:energy"/>
|
||||
<property name="scale" value="1"/>
|
||||
<property name="field" value="ENERGY:charge"/>
|
||||
<property name="scale" value="1000."/>
|
||||
<property name="format" value="Bat: %.0fmAh"/>
|
||||
<property name="size" value="20."/>
|
||||
<property name="color" value="green"/>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<message name="WP_MOVED" period="0.5"/>
|
||||
<message name="CIRCLE" period="1.05"/>
|
||||
<message name="DESIRED" period="0.2"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="1.2"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
<message name="PPRZ_MODE" period="4.9"/>
|
||||
@@ -37,7 +37,7 @@
|
||||
<message name="WP_MOVED" period="1.4"/>
|
||||
<message name="CIRCLE" period="3.05"/>
|
||||
<message name="DESIRED" period="4.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="3.2"/>
|
||||
<message name="CALIBRATION" period="5.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
@@ -54,7 +54,7 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="7.5"/>
|
||||
@@ -81,7 +81,7 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="5.5"/>
|
||||
@@ -122,10 +122,10 @@
|
||||
<message name="WP_MOVED" period="1.0"/>
|
||||
<message name="CIRCLE" period="1.0"/>
|
||||
<message name="IMU_ACCEL" period="0.01"/>
|
||||
<message name="INS" period="0.1"/>
|
||||
<message name="INS" period="0.1"/>
|
||||
<message name="INS_REF" period="0.1"/>
|
||||
<message name="DESIRED" period="0.1"/>
|
||||
<message name="BAT" period="1.0"/>
|
||||
<message name="ENERGY" period="1.0"/>
|
||||
<message name="SEGMENT" period="1.0"/>
|
||||
<message name="NAVIGATION_REF" period="0.5"/>
|
||||
<message name="PPRZ_MODE" period="1.0"/>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</mode>
|
||||
|
||||
<mode name="ppm">
|
||||
<message name="ALIVE" period="2.1"/>
|
||||
<message name="ALIVE" period="2.1"/>
|
||||
<message name="ROTORCRAFT_CMD" period=".05"/>
|
||||
<message name="PPM" period="0.5"/>
|
||||
<message name="RC" period="0.5"/>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<message name="INS" period="0.25"/>
|
||||
<message name="I2C_ERRORS" period="4.1"/>
|
||||
<message name="UART_ERRORS" period="3.1"/>
|
||||
<message name="IMU_ACCEL_RAW" period="0.05"/>
|
||||
<message name="IMU_ACCEL_RAW" period="0.05"/>
|
||||
<message name="IMU_GYRO_RAW" period="0.05"/>
|
||||
<message name="IMU_MAG_RAW" period="0.25"/>
|
||||
<message name="BARO_RAW" period="0.1"/>
|
||||
@@ -27,22 +27,22 @@
|
||||
<message name="FILTER" period="0.7"/>
|
||||
<message name="AHRS_GYRO_BIAS_INT" period="0.08"/>
|
||||
<message name="AHRS_QUAT_INT" period="0.26"/>
|
||||
<message name="AHRS_ARDRONE2" period="0.11"/>
|
||||
<message name="AHRS_ARDRONE2" period="0.11"/>
|
||||
<message name="VFF" period="0.06"/>
|
||||
<message name="VERT_LOOP" period="0.07"/>
|
||||
<message name="INS" period="0.08"/>
|
||||
<message name="INS_REF" period="5.1"/>
|
||||
<message name="HOVER_LOOP" period="0.062"/>
|
||||
<message name="GUIDANCE_H_REF_INT" period="0.062"/>
|
||||
<message name="STAB_ATTITUDE_INT" period="0.4"/>
|
||||
<message name="STAB_ATTITUDE_REF_INT" period="2.1"/>
|
||||
<message name="GUIDANCE_H_REF_INT" period="0.062"/>
|
||||
<message name="STAB_ATTITUDE_INT" period="0.4"/>
|
||||
<message name="STAB_ATTITUDE_REF_INT" period="2.1"/>
|
||||
<message name="ROTORCRAFT_FP" period="0.8"/>
|
||||
<message name="ROTORCRAFT_STATUS" period="1.2"/>
|
||||
<message name="ROTORCRAFT_NAV_STATUS" period="1.6"/>
|
||||
<message name="INS_REF" period="5.1"/>
|
||||
<!-- HFF messages are only sent if USE_HFF -->
|
||||
<message name="HFF" period=".05"/>
|
||||
<message name="HFF_GPS" period=".03"/>
|
||||
<message name="HFF_GPS" period=".03"/>
|
||||
<message name="HFF_DBG" period=".2"/>
|
||||
</mode>
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<message name="INS" period="0.25"/>
|
||||
<message name="I2C_ERRORS" period="4.1"/>
|
||||
<message name="UART_ERRORS" period="3.1"/>
|
||||
<message name="IMU_ACCEL_RAW" period="0.05"/>
|
||||
<message name="IMU_ACCEL_RAW" period="0.05"/>
|
||||
<message name="IMU_GYRO_RAW" period="0.05"/>
|
||||
<message name="IMU_MAG_RAW" period="0.25"/>
|
||||
<message name="BARO_RAW" period="0.1"/>
|
||||
@@ -27,22 +27,22 @@
|
||||
<message name="FILTER" period="0.7"/>
|
||||
<message name="AHRS_GYRO_BIAS_INT" period="0.08"/>
|
||||
<message name="AHRS_QUAT_INT" period="0.26"/>
|
||||
<message name="AHRS_ARDRONE2" period="0.11"/>
|
||||
<message name="AHRS_ARDRONE2" period="0.11"/>
|
||||
<message name="VFF" period="0.06"/>
|
||||
<message name="VERT_LOOP" period="0.07"/>
|
||||
<message name="INS" period="0.08"/>
|
||||
<message name="INS_REF" period="5.1"/>
|
||||
<message name="HOVER_LOOP" period="0.062"/>
|
||||
<message name="GUIDANCE_H_REF_INT" period="0.062"/>
|
||||
<message name="STAB_ATTITUDE_INT" period="0.4"/>
|
||||
<message name="STAB_ATTITUDE_REF_INT" period="2.1"/>
|
||||
<message name="GUIDANCE_H_REF_INT" period="0.062"/>
|
||||
<message name="STAB_ATTITUDE_INT" period="0.4"/>
|
||||
<message name="STAB_ATTITUDE_REF_INT" period="2.1"/>
|
||||
<message name="ROTORCRAFT_FP" period="0.8"/>
|
||||
<message name="ROTORCRAFT_STATUS" period="1.2"/>
|
||||
<message name="ROTORCRAFT_NAV_STATUS" period="1.6"/>
|
||||
<message name="INS_REF" period="5.1"/>
|
||||
<!-- HFF messages are only sent if USE_HFF -->
|
||||
<message name="HFF" period=".05"/>
|
||||
<message name="HFF_GPS" period=".03"/>
|
||||
<message name="HFF_GPS" period=".03"/>
|
||||
<message name="HFF_DBG" period=".2"/>
|
||||
</mode>
|
||||
|
||||
|
||||
@@ -11,11 +11,10 @@
|
||||
<message name="NAVIGATION" period="1.0"/>
|
||||
<message name="ATTITUDE" period="0.1"/>
|
||||
<message name="ESTIMATOR" period="0.5"/>
|
||||
<message name="ENERGY" period="2.4"/>
|
||||
<message name="ENERGY" period="2.1"/>
|
||||
<message name="WP_MOVED" period="0.4"/>
|
||||
<message name="CIRCLE" period="1.05"/>
|
||||
<message name="DESIRED" period="1.2"/>
|
||||
<message name="BAT" period="2.1"/>
|
||||
<message name="SEGMENT" period="1.2"/>
|
||||
<message name="CALIBRATION" period="2.1"/>
|
||||
<message name="NAVIGATION_REF" period="9.0"/>
|
||||
@@ -45,7 +44,7 @@
|
||||
<message name="WP_MOVED" period="1.4"/>
|
||||
<message name="CIRCLE" period="3.05"/>
|
||||
<message name="DESIRED" period="4.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="3.2"/>
|
||||
<message name="CALIBRATION" period="5.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
@@ -63,7 +62,7 @@
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="AIRSPEED" period="5.2"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="7.5"/>
|
||||
@@ -91,7 +90,7 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="5.5"/>
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
<message name="NAVIGATION" period="0.5"/>
|
||||
<message name="ATTITUDE" period="0.1"/>
|
||||
<message name="ESTIMATOR" period="0.5"/>
|
||||
<message name="ENERGY" period="2.4"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="WP_MOVED" period="0.25"/>
|
||||
<message name="CIRCLE" period="1.05"/>
|
||||
<message name="DESIRED" period="0.2"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="SEGMENT" period="1.2"/>
|
||||
<message name="CALIBRATION" period="2.1"/>
|
||||
<message name="NAVIGATION_REF" period="4.0"/>
|
||||
@@ -42,7 +41,7 @@
|
||||
<message name="WP_MOVED" period="1.4"/>
|
||||
<message name="CIRCLE" period="3.05"/>
|
||||
<message name="DESIRED" period="4.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="3.2"/>
|
||||
<message name="CALIBRATION" period="5.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
@@ -59,7 +58,7 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="7.5"/>
|
||||
@@ -86,7 +85,7 @@
|
||||
<message name="ALIVE" period="5.0"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="5.5"/>
|
||||
|
||||
@@ -3,34 +3,34 @@
|
||||
<telemetry>
|
||||
<process name="Ap">
|
||||
<mode name="default">
|
||||
<message name="ESTIMATOR" period="2." phase="0."/>
|
||||
<message name="NAVIGATION" period="2." phase="0."/>
|
||||
<message name="GPS" period="2." phase="0."/>
|
||||
<message name="ESTIMATOR" period="2." phase="0."/>
|
||||
<message name="NAVIGATION" period="2." phase="0."/>
|
||||
<message name="GPS" period="2." phase="0."/>
|
||||
|
||||
<message name="ATTITUDE" period="4." phase="1"/>
|
||||
<message name="DL_VALUE" period="4." phase="3"/>
|
||||
<message name="WP_MOVED" period="4." phase="3"/>
|
||||
<message name="ATTITUDE" period="4." phase="1"/>
|
||||
<message name="DL_VALUE" period="4." phase="3"/>
|
||||
<message name="WP_MOVED" period="4." phase="3"/>
|
||||
|
||||
<message name="DESIRED" period="8." phase="1"/>
|
||||
<message name="DESIRED" period="8." phase="1"/>
|
||||
<!-- Only one of the following is active at the same time: give them same time stamp -->
|
||||
<message name="SEGMENT" period="8." phase="5"/>
|
||||
<message name="CIRCLE" period="8." phase="5"/>
|
||||
<message name="SURVEY" period="8." phase="5"/>
|
||||
<message name="SEGMENT" period="8." phase="5"/>
|
||||
<message name="CIRCLE" period="8." phase="5"/>
|
||||
<message name="SURVEY" period="8." phase="5"/>
|
||||
|
||||
<message name="ALIVE" period="16." phase="1"/>
|
||||
<message name="BAT" period="16." phase="1"/>
|
||||
<message name="CALIBRATION" period="16." phase="1"/>
|
||||
<message name="DATALINK_REPORT" period="16." phase="5"/>
|
||||
<message name="GPS_SOL" period="16." phase="5"/>
|
||||
<message name="NAVIGATION_REF" period="16." phase="9"/>
|
||||
<message name="PPRZ_MODE" period="16." phase="9"/>
|
||||
<message name="ALIVE" period="16." phase="1"/>
|
||||
<message name="ENERGY" period="16." phase="1"/>
|
||||
<message name="CALIBRATION" period="16." phase="1"/>
|
||||
<message name="DATALINK_REPORT" period="16." phase="5"/>
|
||||
<message name="GPS_SOL" period="16." phase="5"/>
|
||||
<message name="NAVIGATION_REF" period="16." phase="9"/>
|
||||
<message name="PPRZ_MODE" period="16." phase="9"/>
|
||||
</mode>
|
||||
</process>
|
||||
<process name="Fbw">
|
||||
<mode name="default">
|
||||
<message name="FBW_STATUS" period="16." phase="13"/>
|
||||
<message name="COMMANDS" period="16." phase="13"/>
|
||||
<message name="ACTUATORS" period="16." phase="13"/>
|
||||
<message name="FBW_STATUS" period="16." phase="13"/>
|
||||
<message name="COMMANDS" period="16." phase="13"/>
|
||||
<message name="ACTUATORS" period="16." phase="13"/>
|
||||
</mode>
|
||||
</process>
|
||||
</telemetry>
|
||||
|
||||
@@ -3,32 +3,32 @@
|
||||
<telemetry>
|
||||
<process name="Ap">
|
||||
<mode name="default">
|
||||
<message name="ESTIMATOR" period="3." phase="0."/>
|
||||
<message name="NAVIGATION" period="3." phase="0."/>
|
||||
<message name="GPS" period="3." phase="0."/>
|
||||
<message name="ESTIMATOR" period="3." phase="0."/>
|
||||
<message name="NAVIGATION" period="3." phase="0."/>
|
||||
<message name="GPS" period="3." phase="0."/>
|
||||
|
||||
<message name="ATTITUDE" period="6." phase="0"/>
|
||||
<message name="DL_VALUE" period="3." phase="0"/>
|
||||
<message name="WP_MOVED" period="6." phase="3"/>
|
||||
<message name="ATTITUDE" period="6." phase="0"/>
|
||||
<message name="DL_VALUE" period="3." phase="0"/>
|
||||
<message name="WP_MOVED" period="6." phase="3"/>
|
||||
|
||||
<message name="DESIRED" period="6." phase="0"/>
|
||||
<message name="SEGMENT" period="6." phase="0"/>
|
||||
<message name="CIRCLE" period="6." phase="0"/>
|
||||
<message name="SURVEY" period="6." phase="0"/>
|
||||
<message name="DESIRED" period="6." phase="0"/>
|
||||
<message name="SEGMENT" period="6." phase="0"/>
|
||||
<message name="CIRCLE" period="6." phase="0"/>
|
||||
<message name="SURVEY" period="6." phase="0"/>
|
||||
|
||||
<message name="PPRZ_MODE" period="12." phase="0"/>
|
||||
<message name="BAT" period="12." phase="0"/>
|
||||
<message name="PPRZ_MODE" period="12." phase="0"/>
|
||||
<message name="ENERGY" period="12." phase="0"/>
|
||||
|
||||
<message name="ALIVE" period="18." phase="0"/>
|
||||
<message name="CALIBRATION" period="18." phase="0"/>
|
||||
<message name="DATALINK_REPORT" period="18." phase="0"/>
|
||||
<message name="GPS_SOL" period="18." phase="0"/>
|
||||
<message name="NAVIGATION_REF" period="18." phase="0"/>
|
||||
<message name="ALIVE" period="18." phase="0"/>
|
||||
<message name="CALIBRATION" period="18." phase="0"/>
|
||||
<message name="DATALINK_REPORT" period="18." phase="0"/>
|
||||
<message name="GPS_SOL" period="18." phase="0"/>
|
||||
<message name="NAVIGATION_REF" period="18." phase="0"/>
|
||||
</mode>
|
||||
</process>
|
||||
<process name="Fbw">
|
||||
<mode name="default">
|
||||
<message name="FBW_STATUS" period="18." phase="0"/>
|
||||
<message name="FBW_STATUS" period="18." phase="0"/>
|
||||
</mode>
|
||||
</process>
|
||||
</telemetry>
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
<message name="NAVIGATION" period="1."/>
|
||||
<message name="ATTITUDE" period="0.5"/>
|
||||
<message name="ESTIMATOR" period="0.5"/>
|
||||
<message name="ENERGY" period="2.5"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="WP_MOVED" period="0.5"/>
|
||||
<message name="CIRCLE" period="1.05"/>
|
||||
<message name="DESIRED" period="1.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="SEGMENT" period="1.2"/>
|
||||
<message name="CALIBRATION" period="2.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
@@ -42,7 +41,7 @@
|
||||
<message name="WP_MOVED" period="1.4"/>
|
||||
<message name="CIRCLE" period="3.05"/>
|
||||
<message name="DESIRED" period="4.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="3.2"/>
|
||||
<message name="CALIBRATION" period="5.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
@@ -60,7 +59,7 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="5.5"/>
|
||||
|
||||
@@ -10,18 +10,17 @@
|
||||
<message name="NAVIGATION" period="1."/>
|
||||
<message name="ATTITUDE" period="0.5"/>
|
||||
<message name="ESTIMATOR" period="0.5"/>
|
||||
<message name="ENERGY" period="2.5"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="WP_MOVED" period="0.5"/>
|
||||
<message name="CIRCLE" period="1.05"/>
|
||||
<message name="DESIRED" period="1.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="SEGMENT" period="1.2"/>
|
||||
<message name="CALIBRATION" period="2.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
<message name="PPRZ_MODE" period="5."/>
|
||||
<message name="SETTINGS" period="5."/>
|
||||
<message name="STATE_FILTER_STATUS" period="5."/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="DL_VALUE" period="1.5"/>
|
||||
<message name="IR_SENSORS" period="1.2"/>
|
||||
<message name="IMU_GYRO" period="1.1"/>
|
||||
@@ -43,14 +42,14 @@
|
||||
<message name="WP_MOVED" period="1.4"/>
|
||||
<message name="CIRCLE" period="3.05"/>
|
||||
<message name="DESIRED" period="4.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="3.2"/>
|
||||
<message name="CALIBRATION" period="5.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
<message name="NAVIGATION" period="3."/>
|
||||
<message name="PPRZ_MODE" period="5."/>
|
||||
<message name="STATE_FILTER_STATUS" period="5."/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="DL_VALUE" period="1.5"/>
|
||||
<message name="IR_SENSORS" period="5.2"/>
|
||||
<message name="IMU_GYRO" period="10.1"/>
|
||||
@@ -61,12 +60,12 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="5.5"/>
|
||||
<message name="STATE_FILTER_STATUS" period="7."/>
|
||||
<message name="DATALINK_REPORT" period="5.7"/>
|
||||
<message name="DATALINK_REPORT" period="5.7"/>
|
||||
</mode>
|
||||
<mode name="raw_sensors">
|
||||
<message name="DL_VALUE" period="0.5"/>
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
<message name="NAVIGATION" period="1."/>
|
||||
<message name="ATTITUDE" period="0.1"/>
|
||||
<message name="ESTIMATOR" period="0.5"/>
|
||||
<message name="ENERGY" period="2.4"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="WP_MOVED" period="0.5"/>
|
||||
<message name="CIRCLE" period="1.05"/>
|
||||
<message name="DESIRED" period="0.2"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="SEGMENT" period="1.2"/>
|
||||
<message name="CALIBRATION" period="2.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
@@ -43,7 +42,7 @@
|
||||
<message name="WP_MOVED" period="1.4"/>
|
||||
<message name="CIRCLE" period="3.05"/>
|
||||
<message name="DESIRED" period="4.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="3.2"/>
|
||||
<message name="CALIBRATION" period="5.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
@@ -60,7 +59,7 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="7.5"/>
|
||||
@@ -87,7 +86,7 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="5.5"/>
|
||||
|
||||
@@ -10,18 +10,17 @@
|
||||
<message name="NAVIGATION" period="1."/>
|
||||
<message name="ATTITUDE" period="0.7"/>
|
||||
<message name="ESTIMATOR" period="0.6"/>
|
||||
<message name="ENERGY" period="2.5"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="WP_MOVED" period="1.1"/>
|
||||
<message name="CIRCLE" period="1.05"/>
|
||||
<message name="DESIRED" period="1.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="SEGMENT" period="1.2"/>
|
||||
<message name="CALIBRATION" period="2.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
<message name="PPRZ_MODE" period="5."/>
|
||||
<message name="SETTINGS" period="5."/>
|
||||
<message name="STATE_FILTER_STATUS" period="2.2"/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="DL_VALUE" period="1.2"/>
|
||||
<message name="IR_SENSORS" period="1.2"/>
|
||||
<message name="SURVEY" period="2.1"/>
|
||||
@@ -42,14 +41,14 @@
|
||||
<message name="WP_MOVED" period="1.4"/>
|
||||
<message name="CIRCLE" period="3.05"/>
|
||||
<message name="DESIRED" period="4.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="3.2"/>
|
||||
<message name="CALIBRATION" period="5.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
<message name="NAVIGATION" period="3."/>
|
||||
<message name="PPRZ_MODE" period="5."/>
|
||||
<message name="STATE_FILTER_STATUS" period="5."/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="DATALINK_REPORT" period="5.1"/>
|
||||
<message name="DL_VALUE" period="1.5"/>
|
||||
<message name="IR_SENSORS" period="5.2"/>
|
||||
<message name="SURVEY" period="2.1"/>
|
||||
@@ -59,12 +58,12 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="7.5"/>
|
||||
<message name="STATE_FILTER_STATUS" period="8."/>
|
||||
<message name="DATALINK_REPORT" period="5.7"/>
|
||||
<message name="DATALINK_REPORT" period="5.7"/>
|
||||
</mode>
|
||||
<mode name="raw_sensors">
|
||||
<message name="DL_VALUE" period="0.5"/>
|
||||
@@ -75,8 +74,8 @@
|
||||
<message name="BARO_RAW" period="0.5"/>
|
||||
</mode>
|
||||
<mode name="scaled_sensors">
|
||||
<message name="DL_VALUE" period="0.5"/>
|
||||
<message name="ALIVE" period="2.1"/>
|
||||
<message name="DL_VALUE" period="0.5"/>
|
||||
<message name="ALIVE" period="2.1"/>
|
||||
<message name="IMU_GYRO" period=".075"/>
|
||||
<message name="IMU_ACCEL" period=".075"/>
|
||||
<message name="IMU_MAG" period=".1"/>
|
||||
@@ -86,12 +85,12 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="5.5"/>
|
||||
<message name="STATE_FILTER_STATUS" period="5."/>
|
||||
<message name="DATALINK_REPORT" period="5.7"/>
|
||||
<message name="DATALINK_REPORT" period="5.7"/>
|
||||
<message name="IMU_ACCEL" period=".5"/>
|
||||
<message name="IMU_GYRO" period=".5"/>
|
||||
<message name="IMU_MAG" period=".5"/>
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<message name="INS_REF" period="5.1"/>
|
||||
<!-- HFF messages are only sent if USE_HFF -->
|
||||
<message name="HFF" period=".05"/>
|
||||
<message name="HFF_GPS" period=".03"/>
|
||||
<message name="HFF_GPS" period=".03"/>
|
||||
<message name="HFF_DBG" period=".2"/>
|
||||
</mode>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<message name="WP_MOVED" period="0.5"/>
|
||||
<message name="CIRCLE" period="1.05"/>
|
||||
<message name="DESIRED" period="0.2"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="1.2"/>
|
||||
<message name="CALIBRATION" period="2.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
<message name="NAVIGATION" period="1."/>
|
||||
<message name="ATTITUDE" period="0.1"/>
|
||||
<message name="ESTIMATOR" period="0.5"/>
|
||||
<message name="ENERGY" period="2.4"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="WP_MOVED" period="0.5"/>
|
||||
<message name="CIRCLE" period="1.05"/>
|
||||
<message name="DESIRED" period="0.2"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="SEGMENT" period="1.2"/>
|
||||
<message name="CALIBRATION" period="2.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
@@ -46,7 +45,7 @@
|
||||
<message name="WP_MOVED" period="1.4"/>
|
||||
<message name="CIRCLE" period="3.05"/>
|
||||
<message name="DESIRED" period="4.05"/>
|
||||
<message name="BAT" period="1.1"/>
|
||||
<message name="ENERGY" period="1.1"/>
|
||||
<message name="SEGMENT" period="3.2"/>
|
||||
<message name="CALIBRATION" period="5.1"/>
|
||||
<message name="NAVIGATION_REF" period="9."/>
|
||||
@@ -63,7 +62,7 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="7.5"/>
|
||||
@@ -90,7 +89,7 @@
|
||||
<message name="ALIVE" period="5"/>
|
||||
<message name="GPS" period="5.1"/>
|
||||
<message name="ESTIMATOR" period="5.3"/>
|
||||
<message name="BAT" period="10.1"/>
|
||||
<message name="ENERGY" period="10.1"/>
|
||||
<message name="DESIRED" period="10.2"/>
|
||||
<message name="NAVIGATION" period="5.4"/>
|
||||
<message name="PPRZ_MODE" period="5.5"/>
|
||||
@@ -120,7 +119,6 @@
|
||||
</process>
|
||||
<process name="FlightRecorder">
|
||||
<mode name="default">
|
||||
<message name="BAT" period="0.5"/>
|
||||
<message name="ENERGY" period="0.5"/>
|
||||
<message name="GPS" period="0.2"/>
|
||||
<message name="ATTITUDE" period="0.05"/>
|
||||
|
||||
+20
-20
@@ -3,34 +3,34 @@
|
||||
<telemetry>
|
||||
<process name="Ap">
|
||||
<mode name="default">
|
||||
<message name="ESTIMATOR" period="2." phase="0."/>
|
||||
<message name="NAVIGATION" period="2." phase="0."/>
|
||||
<message name="GPS" period="2." phase="0."/>
|
||||
<message name="ESTIMATOR" period="2." phase="0."/>
|
||||
<message name="NAVIGATION" period="2." phase="0."/>
|
||||
<message name="GPS" period="2." phase="0."/>
|
||||
|
||||
<message name="ATTITUDE" period="4." phase="1"/>
|
||||
<message name="DL_VALUE" period="4." phase="3"/>
|
||||
<message name="WP_MOVED" period="4." phase="3"/>
|
||||
<message name="ATTITUDE" period="4." phase="1"/>
|
||||
<message name="DL_VALUE" period="4." phase="3"/>
|
||||
<message name="WP_MOVED" period="4." phase="3"/>
|
||||
|
||||
<message name="DESIRED" period="8." phase="1"/>
|
||||
<message name="DESIRED" period="8." phase="1"/>
|
||||
<!-- Only one of the following is active at the same time: give them same time stamp -->
|
||||
<message name="SEGMENT" period="8." phase="5"/>
|
||||
<message name="CIRCLE" period="8." phase="5"/>
|
||||
<message name="SURVEY" period="8." phase="5"/>
|
||||
<message name="SEGMENT" period="8." phase="5"/>
|
||||
<message name="CIRCLE" period="8." phase="5"/>
|
||||
<message name="SURVEY" period="8." phase="5"/>
|
||||
|
||||
<message name="ALIVE" period="16." phase="1"/>
|
||||
<message name="BAT" period="16." phase="1"/>
|
||||
<message name="CALIBRATION" period="16." phase="1"/>
|
||||
<message name="DATALINK_REPORT" period="16." phase="5"/>
|
||||
<message name="GPS_SOL" period="16." phase="5"/>
|
||||
<message name="NAVIGATION_REF" period="16." phase="9"/>
|
||||
<message name="PPRZ_MODE" period="16." phase="9"/>
|
||||
<message name="ALIVE" period="16." phase="1"/>
|
||||
<message name="ENERGY" period="16." phase="1"/>
|
||||
<message name="CALIBRATION" period="16." phase="1"/>
|
||||
<message name="DATALINK_REPORT" period="16." phase="5"/>
|
||||
<message name="GPS_SOL" period="16." phase="5"/>
|
||||
<message name="NAVIGATION_REF" period="16." phase="9"/>
|
||||
<message name="PPRZ_MODE" period="16." phase="9"/>
|
||||
</mode>
|
||||
</process>
|
||||
<process name="Fbw">
|
||||
<mode name="default">
|
||||
<message name="FBW_STATUS" period="16." phase="13"/>
|
||||
<message name="COMMANDS" period="16." phase="13"/>
|
||||
<message name="ACTUATORS" period="16." phase="13"/>
|
||||
<message name="FBW_STATUS" period="16." phase="13"/>
|
||||
<message name="COMMANDS" period="16." phase="13"/>
|
||||
<message name="ACTUATORS" period="16." phase="13"/>
|
||||
</mode>
|
||||
</process>
|
||||
</telemetry>
|
||||
|
||||
@@ -3,32 +3,32 @@
|
||||
<telemetry>
|
||||
<process name="Ap">
|
||||
<mode name="default">
|
||||
<message name="ESTIMATOR" period="3." phase="0."/>
|
||||
<message name="NAVIGATION" period="3." phase="0."/>
|
||||
<message name="GPS" period="3." phase="0."/>
|
||||
<message name="ESTIMATOR" period="3." phase="0."/>
|
||||
<message name="NAVIGATION" period="3." phase="0."/>
|
||||
<message name="GPS" period="3." phase="0."/>
|
||||
|
||||
<message name="ATTITUDE" period="6." phase="0"/>
|
||||
<message name="DL_VALUE" period="3." phase="0"/>
|
||||
<message name="WP_MOVED" period="6." phase="3"/>
|
||||
<message name="ATTITUDE" period="6." phase="0"/>
|
||||
<message name="DL_VALUE" period="3." phase="0"/>
|
||||
<message name="WP_MOVED" period="6." phase="3"/>
|
||||
|
||||
<message name="DESIRED" period="6." phase="0"/>
|
||||
<message name="SEGMENT" period="6." phase="0"/>
|
||||
<message name="CIRCLE" period="6." phase="0"/>
|
||||
<message name="SURVEY" period="6." phase="0"/>
|
||||
<message name="DESIRED" period="6." phase="0"/>
|
||||
<message name="SEGMENT" period="6." phase="0"/>
|
||||
<message name="CIRCLE" period="6." phase="0"/>
|
||||
<message name="SURVEY" period="6." phase="0"/>
|
||||
|
||||
<message name="PPRZ_MODE" period="12." phase="0"/>
|
||||
<message name="BAT" period="12." phase="0"/>
|
||||
<message name="PPRZ_MODE" period="12." phase="0"/>
|
||||
<message name="ENERGY" period="12." phase="0"/>
|
||||
|
||||
<message name="ALIVE" period="18." phase="0"/>
|
||||
<message name="CALIBRATION" period="18." phase="0"/>
|
||||
<message name="DATALINK_REPORT" period="18." phase="0"/>
|
||||
<message name="GPS_SOL" period="18." phase="0"/>
|
||||
<message name="NAVIGATION_REF" period="18." phase="0"/>
|
||||
<message name="ALIVE" period="18." phase="0"/>
|
||||
<message name="CALIBRATION" period="18." phase="0"/>
|
||||
<message name="DATALINK_REPORT" period="18." phase="0"/>
|
||||
<message name="GPS_SOL" period="18." phase="0"/>
|
||||
<message name="NAVIGATION_REF" period="18." phase="0"/>
|
||||
</mode>
|
||||
</process>
|
||||
<process name="Fbw">
|
||||
<mode name="default">
|
||||
<message name="FBW_STATUS" period="18." phase="0"/>
|
||||
<message name="FBW_STATUS" period="18." phase="0"/>
|
||||
</mode>
|
||||
</process>
|
||||
</telemetry>
|
||||
|
||||
@@ -109,7 +109,7 @@ value sim_init(value unit)
|
||||
|
||||
value update_bat(value bat)
|
||||
{
|
||||
electrical.vsupply = Int_val(bat);
|
||||
electrical.vsupply = (float)Int_val(bat) / 10.;
|
||||
return Val_unit;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ void actuators_bebop_commit(void)
|
||||
i2c_blocking_transceive(&i2c1, &actuators_bebop.i2c_trans, actuators_bebop.i2c_trans.slave_addr, 1, 13);
|
||||
|
||||
// Update status
|
||||
electrical.vsupply = (actuators_bebop.i2c_trans.buf[9] + (actuators_bebop.i2c_trans.buf[8] << 8)) / 100;
|
||||
electrical.vsupply = (float)(actuators_bebop.i2c_trans.buf[9] + (actuators_bebop.i2c_trans.buf[8] << 8)) / 1000.f;
|
||||
// The 15th bit contains saturation information, so it needs to be removed to get the rpm
|
||||
actuators_bebop.rpm_obs[0] = (actuators_bebop.i2c_trans.buf[1] + (actuators_bebop.i2c_trans.buf[0] << 8)) & ~(1<<15);
|
||||
actuators_bebop.rpm_obs[1] = (actuators_bebop.i2c_trans.buf[3] + (actuators_bebop.i2c_trans.buf[2] << 8)) & ~(1<<15);
|
||||
|
||||
@@ -122,7 +122,7 @@ void actuators_disco_commit(void)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
// Update status
|
||||
electrical.vsupply = be16toh(obs_data.batt_mv) / 100;
|
||||
electrical.vsupply = (float)(be16toh(obs_data.batt_mv)) / 1000.f;
|
||||
// extract 'rpm saturation bit'
|
||||
actuators_disco.rpm_saturated = (obs_data.rpm & (1 << 7)) ? true : false;
|
||||
// clear 'rpm saturation bit' and fix endianess
|
||||
|
||||
@@ -53,9 +53,8 @@ static void *bat_read(void *data __attribute__((unused)))
|
||||
/* Read the output a line at a time - output it. */
|
||||
while (fgets(path, sizeof(path) - 1, fp) != NULL) {
|
||||
int raw_bat = atoi(path);
|
||||
// convert to decivolt
|
||||
// from /bin/mcu_vbat.sh: MILLIVOLTS_VALUE=$(( ($RAW_VALUE * 4250) / 1023 ))
|
||||
electrical.vsupply = ((raw_bat * 4250) / 1023) / 100;
|
||||
electrical.vsupply = (float)((raw_bat * 4250) / 1023) / 1000.f;
|
||||
}
|
||||
/* close */
|
||||
pclose(fp);
|
||||
|
||||
@@ -32,9 +32,8 @@
|
||||
#include "firmwares/fixedwing/nav.h"
|
||||
#include <stdint.h>
|
||||
|
||||
uint16_t vsupply;
|
||||
int32_t current;
|
||||
float energy;
|
||||
// ap copy of fbw readings
|
||||
struct Electrical ap_electrical;
|
||||
|
||||
uint8_t lateral_mode;
|
||||
uint8_t mcu1_status;
|
||||
@@ -67,30 +66,12 @@ static void send_estimator(struct transport_tx *trans, struct link_device *dev)
|
||||
&(stateGetPositionUtm_f()->alt), &(stateGetSpeedEnu_f()->z));
|
||||
}
|
||||
|
||||
static void send_bat(struct transport_tx *trans, struct link_device *dev)
|
||||
{
|
||||
int16_t amps = (int16_t)(current / 10);
|
||||
int16_t e = energy;
|
||||
// prevent overflow
|
||||
if (fabs(energy) >= INT16_MAX) {
|
||||
e = INT16_MAX;
|
||||
}
|
||||
pprz_msg_send_BAT(trans, dev, AC_ID,
|
||||
&v_ctl_throttle_slewed, &vsupply, &s,
|
||||
&autopilot.flight_time, (uint8_t *)(&autopilot.kill_throttle),
|
||||
&block_time, &stage_time, &e);
|
||||
}
|
||||
|
||||
static void send_energy(struct transport_tx *trans, struct link_device *dev)
|
||||
{
|
||||
uint16_t e = energy;
|
||||
if (fabs(energy) >= INT16_MAX) {
|
||||
e = INT16_MAX;
|
||||
}
|
||||
float vsup = ((float)vsupply) / 10.0f;
|
||||
float curs = ((float)current) / 1000.0f;
|
||||
float power = vsup * curs;
|
||||
pprz_msg_send_ENERGY(trans, dev, AC_ID, &vsup, &curs, &e, &power);
|
||||
uint8_t throttle = 100 * v_ctl_throttle_slewed / MAX_PPRZ;
|
||||
float power = ap_electrical.vsupply * ap_electrical.current;
|
||||
pprz_msg_send_ENERGY(trans, dev, AC_ID,
|
||||
&throttle, &ap_electrical.vsupply, &ap_electrical.current, &power, &ap_electrical.charge, &ap_electrical.energy);
|
||||
}
|
||||
|
||||
// FIXME not the best place
|
||||
@@ -132,16 +113,19 @@ void autopilot_send_mode(void)
|
||||
|
||||
void autopilot_firmware_init(void)
|
||||
{
|
||||
vsupply = 0;
|
||||
current = 0;
|
||||
energy = 0.f;
|
||||
ap_electrical.vsupply = 0.f;
|
||||
ap_electrical.current = 0.f;
|
||||
ap_electrical.charge = 0.f;
|
||||
ap_electrical.energy = 0.f;
|
||||
|
||||
ap_electrical.bat_critical = false;
|
||||
ap_electrical.bat_low = false;
|
||||
|
||||
#if PERIODIC_TELEMETRY
|
||||
/* register some periodic message */
|
||||
register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_PPRZ_MODE, send_mode);
|
||||
register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_ESTIMATOR, send_estimator);
|
||||
register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_AIRSPEED, send_airspeed);
|
||||
register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_BAT, send_bat);
|
||||
register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_ENERGY, send_energy);
|
||||
register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_DESIRED, send_desired);
|
||||
#if defined RADIO_CALIB && defined RADIO_CONTROL_SETTINGS
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "autopilot.h"
|
||||
#include "subsystems/electrical.h"
|
||||
|
||||
// FIXME, move to control
|
||||
#define LATERAL_MODE_MANUAL 0
|
||||
@@ -39,23 +40,8 @@
|
||||
#define LATERAL_MODE_NB 4
|
||||
extern uint8_t lateral_mode;
|
||||
|
||||
/** Supply voltage in deciVolt.
|
||||
* This the ap copy of the measurement from fbw
|
||||
* FIXME use electrical module ?
|
||||
*/
|
||||
extern uint16_t vsupply;
|
||||
|
||||
/** Supply current in milliAmpere.
|
||||
* This the ap copy of the measurement from fbw
|
||||
* FIXME use electrical module ?
|
||||
*/
|
||||
extern int32_t current; // milliAmpere
|
||||
|
||||
/** Energy consumption (mAh)
|
||||
* This is the ap copy of the measurement from fbw
|
||||
* FIXME use electrical module ?
|
||||
*/
|
||||
extern float energy;
|
||||
// ap copy of fbw readings
|
||||
extern struct Electrical ap_electrical;
|
||||
|
||||
/** Second MCU status (FBW part)
|
||||
*/
|
||||
|
||||
@@ -104,7 +104,7 @@ void autopilot_generated_on_rc_frame(void)
|
||||
{
|
||||
|
||||
// update electrical from FBW
|
||||
imcu_get_electrical(&vsupply, ¤t, &energy);
|
||||
imcu_get_electrical(&ap_electrical);
|
||||
|
||||
// FIXME what to do here ?
|
||||
copy_from_to_fbw();
|
||||
|
||||
@@ -171,7 +171,7 @@ void autopilot_static_on_rc_frame(void)
|
||||
#endif // RADIO_CONTROL
|
||||
|
||||
// update electrical from FBW
|
||||
imcu_get_electrical(&vsupply, ¤t, &energy);
|
||||
imcu_get_electrical(&ap_electrical);
|
||||
|
||||
#ifdef RADIO_CONTROL
|
||||
/* the SITL check is a hack to prevent "automatic" launch in NPS */
|
||||
@@ -299,8 +299,8 @@ void attitude_loop(void)
|
||||
#endif
|
||||
|
||||
#ifdef V_CTL_POWER_CTL_BAT_NOMINAL
|
||||
if (vsupply > 0.) {
|
||||
v_ctl_throttle_setpoint *= 10. * V_CTL_POWER_CTL_BAT_NOMINAL / (float)vsupply;
|
||||
if (ap_electrical.vsupply > 0.) {
|
||||
v_ctl_throttle_setpoint *= V_CTL_POWER_CTL_BAT_NOMINAL / ap_electrical.vsupply;
|
||||
v_ctl_throttle_setpoint = TRIM_UPPRZ(v_ctl_throttle_setpoint);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -289,8 +289,8 @@ void v_ctl_guidance_loop(void)
|
||||
#endif
|
||||
|
||||
#ifdef V_CTL_POWER_CTL_BAT_NOMINAL
|
||||
if (vsupply > 0.) {
|
||||
v_ctl_throttle_setpoint *= 10. * V_CTL_POWER_CTL_BAT_NOMINAL / (float)vsupply;
|
||||
if (ap_electrical.vsupply > 0.) {
|
||||
v_ctl_throttle_setpoint *= V_CTL_POWER_CTL_BAT_NOMINAL / ap_electrical.vsupply;
|
||||
v_ctl_throttle_setpoint = TRIM_UPPRZ(v_ctl_throttle_setpoint);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -206,8 +206,8 @@ void v_ctl_guidance_loop(void)
|
||||
#endif
|
||||
|
||||
#ifdef V_CTL_POWER_CTL_BAT_NOMINAL
|
||||
if (vsupply > 0.) {
|
||||
v_ctl_throttle_setpoint *= 10. * V_CTL_POWER_CTL_BAT_NOMINAL / (float)vsupply;
|
||||
if (ap_electrical.vsupply > 0.) {
|
||||
v_ctl_throttle_setpoint *= V_CTL_POWER_CTL_BAT_NOMINAL / ap_electrical.vsupply;
|
||||
v_ctl_throttle_setpoint = TRIM_UPPRZ(v_ctl_throttle_setpoint);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -341,7 +341,7 @@ void monitor_task(void)
|
||||
#endif
|
||||
|
||||
static uint8_t t = 0;
|
||||
if (vsupply < CATASTROPHIC_BAT_LEVEL * 10) {
|
||||
if (ap_electrical.vsupply < CATASTROPHIC_BAT_LEVEL) {
|
||||
t++;
|
||||
} else {
|
||||
t = 0;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#define Square(_x) ((_x)*(_x))
|
||||
#define DistanceSquare(p1_x, p1_y, p2_x, p2_y) (Square(p1_x-p2_x)+Square(p1_y-p2_y))
|
||||
|
||||
#define PowerVoltage() (vsupply/10.)
|
||||
#define PowerVoltage() (ap_electrical.vsupply)
|
||||
#define RcRoll(travel) (imcu_get_radio(RADIO_ROLL) * (float)travel /(float)MAX_PPRZ)
|
||||
|
||||
|
||||
|
||||
@@ -97,26 +97,21 @@ static void send_status(struct transport_tx *trans, struct link_device *dev)
|
||||
#endif
|
||||
uint8_t in_flight = autopilot.in_flight;
|
||||
uint8_t motors_on = autopilot.motors_on;
|
||||
uint8_t arming_status = autopilot.arming_status;
|
||||
uint16_t time_sec = sys_time.nb_sec;
|
||||
pprz_msg_send_ROTORCRAFT_STATUS(trans, dev, AC_ID,
|
||||
&imu_nb_err, &_motor_nb_err,
|
||||
&radio_control.status, &radio_control.frame_rate,
|
||||
&fix, &autopilot.mode, &in_flight, &motors_on,
|
||||
&arming_status, &guidance_h.mode, &guidance_v_mode,
|
||||
&electrical.vsupply, &time_sec);
|
||||
&autopilot.arming_status, &guidance_h.mode, &guidance_v_mode,
|
||||
&time_sec, &electrical.vsupply);
|
||||
}
|
||||
|
||||
static void send_energy(struct transport_tx *trans, struct link_device *dev)
|
||||
{
|
||||
uint16_t e = electrical.energy;
|
||||
if (fabs(electrical.energy) >= INT16_MAX) {
|
||||
e = INT16_MAX;
|
||||
}
|
||||
float vsup = ((float)electrical.vsupply) / 10.0f;
|
||||
float curs = ((float)electrical.current) / 1000.0f;
|
||||
float power = vsup * curs;
|
||||
pprz_msg_send_ENERGY(trans, dev, AC_ID, &vsup, &curs, &e, &power);
|
||||
uint8_t throttle = 100 * stabilization_cmd[COMMAND_THRUST] / MAX_PPRZ;
|
||||
float power = electrical.vsupply * electrical.current;
|
||||
pprz_msg_send_ENERGY(trans, dev, AC_ID,
|
||||
&throttle, &electrical.vsupply, &electrical.current, &power, &electrical.charge, &electrical.energy);
|
||||
}
|
||||
|
||||
static void send_fp(struct transport_tx *trans, struct link_device *dev)
|
||||
|
||||
@@ -64,19 +64,15 @@ static void send_status(struct transport_tx *trans, struct link_device *dev)
|
||||
pprz_msg_send_ROVER_STATUS(trans, dev, AC_ID,
|
||||
&radio_control.status, &radio_control.frame_rate,
|
||||
&fix, &autopilot.mode, &motors_on,
|
||||
&electrical.vsupply, &time_sec);
|
||||
&time_sec, &electrical.vsupply);
|
||||
}
|
||||
|
||||
static void send_energy(struct transport_tx *trans, struct link_device *dev)
|
||||
{
|
||||
uint16_t e = electrical.energy;
|
||||
if (fabs(electrical.energy) >= INT16_MAX) {
|
||||
e = INT16_MAX;
|
||||
}
|
||||
float vsup = ((float)electrical.vsupply) / 10.0f;
|
||||
float curs = ((float)electrical.current) / 1000.0f;
|
||||
float power = vsup * curs;
|
||||
pprz_msg_send_ENERGY(trans, dev, AC_ID, &vsup, &curs, &e, &power);
|
||||
uint8_t throttle = 100 * cmd / MAX_PPRZ;
|
||||
float power = electrical.vsupply * electrical.current;
|
||||
pprz_msg_send_ENERGY(trans, dev, AC_ID,
|
||||
&throttle, &electrical.vsupply, &electrical.current, &power, &electrical.charge, &electrical.energy);
|
||||
}
|
||||
|
||||
static void send_fp(struct transport_tx *trans, struct link_device *dev)
|
||||
|
||||
+8
-20
@@ -55,9 +55,7 @@ struct fbw_state {
|
||||
#endif
|
||||
uint8_t status;
|
||||
uint8_t nb_err;
|
||||
uint16_t vsupply; ///< 1e-1 V
|
||||
int32_t current; ///< milliAmps
|
||||
float energy; ///< mAh
|
||||
struct Electrical electrical;
|
||||
};
|
||||
|
||||
struct ap_state {
|
||||
@@ -243,30 +241,22 @@ static inline void imcu_set_status(uint8_t status)
|
||||
}
|
||||
|
||||
/** get electrical parameters
|
||||
* @param vsupply pointer to return voltage
|
||||
* @param current pointer to return current
|
||||
* @param energy pointer to return cumulated energy
|
||||
* @param _electrical pointer to electrical data to fill
|
||||
*/
|
||||
static inline void imcu_get_electrical(uint16_t *_vsupply, int32_t *_current, float *_energy)
|
||||
static inline void imcu_get_electrical(struct Electrical *_electrical)
|
||||
{
|
||||
PPRZ_MUTEX_LOCK(fbw_state_mtx);
|
||||
*_vsupply = fbw_state->vsupply;
|
||||
*_current = fbw_state->current;
|
||||
*_energy = fbw_state->energy;
|
||||
*_electrical = fbw_state->electrical;
|
||||
PPRZ_MUTEX_UNLOCK(fbw_state_mtx);
|
||||
}
|
||||
|
||||
/** set electrical parameters
|
||||
* @param vsupply new voltage (1e-1 V)
|
||||
* @param current new current (mA)
|
||||
* @param energy new cumulated energy (mAh)
|
||||
* @param _electrical pointer to electrical data to use
|
||||
*/
|
||||
static inline void imcu_set_electrical(uint16_t _vsupply, int32_t _current, float _energy)
|
||||
static inline void imcu_set_electrical(struct Electrical *_electrical)
|
||||
{
|
||||
PPRZ_MUTEX_LOCK(fbw_state_mtx);
|
||||
fbw_state->vsupply = _vsupply;
|
||||
fbw_state->current = _current;
|
||||
fbw_state->energy = _energy;
|
||||
fbw_state->electrical = *_electrical;
|
||||
PPRZ_MUTEX_UNLOCK(fbw_state_mtx);
|
||||
}
|
||||
|
||||
@@ -314,9 +304,7 @@ static inline void inter_mcu_fill_fbw_state(void)
|
||||
status |= (fbw_mode == FBW_MODE_FAILSAFE ? _BV(STATUS_MODE_FAILSAFE) : 0);
|
||||
fbw_state->status = status;
|
||||
|
||||
fbw_state->vsupply = electrical.vsupply;
|
||||
fbw_state->current = electrical.current;
|
||||
fbw_state->energy = electrical.energy;
|
||||
fbw_state->electrical = electrical;
|
||||
#if defined SINGLE_MCU
|
||||
/**Directly set the flag indicating to AP that shared buffer is available*/
|
||||
inter_mcu_received_fbw = true;
|
||||
|
||||
@@ -102,8 +102,8 @@ void link_mcu_on_can_msg(uint32_t id, uint8_t *data, int len)
|
||||
fbw_state->ppm_cpt = data[0];
|
||||
fbw_state->status = data[1];
|
||||
fbw_state->nb_err = data[2];
|
||||
fbw_state->vsupply = data[3] + (data[4] << 8);
|
||||
fbw_state->current = 0;
|
||||
fbw_state->electrical.vsupply = (float)(data[3] + (data[4] << 8))/10.f;
|
||||
fbw_state->electrical.current = 0;
|
||||
|
||||
#ifdef LINK_MCU_LED
|
||||
LED_TOGGLE(LINK_MCU_LED);
|
||||
@@ -147,8 +147,9 @@ void link_mcu_periodic_task(void)
|
||||
intermcu_tx_buff[0] = fbw_state->ppm_cpt;
|
||||
intermcu_tx_buff[1] = fbw_state->status;
|
||||
intermcu_tx_buff[2] = fbw_state->nb_err;
|
||||
intermcu_tx_buff[3] = (uint8_t) fbw_state->vsupply;
|
||||
intermcu_tx_buff[4] = (uint8_t)((fbw_state->vsupply & 0xff00) >> 8);
|
||||
uint16_t vsupply = fbw_state->electrical.vsupply * 10;
|
||||
intermcu_tx_buff[3] = (uint8_t) vsupply;
|
||||
intermcu_tx_buff[4] = (uint8_t)(vsupply & 0xff00) >> 8);
|
||||
ppz_can_transmit(MSG_INTERMCU_FBW_STATUS_ID, intermcu_tx_buff, 5);
|
||||
|
||||
#if defined RADIO_CONTROL || RADIO_CONTROL_AUTO1
|
||||
@@ -207,7 +208,8 @@ static void send_fbw_status(struct transport_tx *trans, struct link_device *dev)
|
||||
rc_status = RC_LOST;
|
||||
}
|
||||
pprz_msg_send_FBW_STATUS(trans, dev, AC_ID,
|
||||
&(rc_status), &(fbw_state->ppm_cpt), &(fbw_status), &(fbw_state->vsupply), &(fbw_state->current));
|
||||
&(rc_status), &(fbw_state->ppm_cpt), &(fbw_status),
|
||||
&(fbw_state->electrical.vsupply), &(fbw_state->electrical.current));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -276,7 +276,7 @@ static void send_fbw_status(struct transport_tx *trans, struct link_device *dev)
|
||||
rc_status = RC_LOST;
|
||||
}
|
||||
pprz_msg_send_FBW_STATUS(trans, dev, AC_ID,
|
||||
&(rc_status), &(fbw_state->ppm_cpt), &(fbw_status), &(fbw_state->vsupply), &(fbw_state->current));
|
||||
&(rc_status), &(fbw_state->ppm_cpt), &(fbw_status), &(fbw_state->electrical.vsupply), &(fbw_state->electrical.current));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -325,8 +325,8 @@ void parse_mavpilot_msg(void)
|
||||
fbw_state->ppm_cpt = MSG_INTERMCU_FBW_MOD(intermcu_data.msg_buf);
|
||||
fbw_state->status = MSG_INTERMCU_FBW_STAT(intermcu_data.msg_buf);
|
||||
fbw_state->nb_err = MSG_INTERMCU_FBW_ERR(intermcu_data.msg_buf);
|
||||
fbw_state->vsupply = MSG_INTERMCU_FBW_VOLT(intermcu_data.msg_buf);
|
||||
fbw_state->current = MSG_INTERMCU_FBW_CURRENT(intermcu_data.msg_buf);
|
||||
fbw_state->electrical.vsupply = (float)(MSG_INTERMCU_FBW_VOLT(intermcu_data.msg_buf)) / 10.f;
|
||||
fbw_state->electrical.current = (float)(MSG_INTERMCU_FBW_CURRENT(intermcu_data.msg_buf)) / 10.f;
|
||||
|
||||
#ifdef LINK_MCU_LED
|
||||
LED_TOGGLE(LINK_MCU_LED);
|
||||
@@ -361,8 +361,8 @@ void link_mcu_periodic_task(void)
|
||||
fbw_state->ppm_cpt,
|
||||
fbw_state->status,
|
||||
fbw_state->nb_err,
|
||||
fbw_state->vsupply,
|
||||
fbw_state->current);
|
||||
fbw_state->electrical.vsupply * 10.f,
|
||||
fbw_state->electrical.current * 10.f);
|
||||
#if defined RADIO_CONTROL || RADIO_CONTROL_AUTO1
|
||||
InterMcuSend_INTERMCU_RADIO(fbw_state->channels);
|
||||
#endif
|
||||
|
||||
@@ -230,8 +230,8 @@ void battery_monitor_read_bus(void){
|
||||
// convert to [A]
|
||||
batmonbus.bus_current = ((float)batmonbus.bus_current_mvolts +
|
||||
(float)batmon_current_offset) / batmon_current_sensitivity;
|
||||
//update electrical subsystem, current in mAs
|
||||
electrical.current = (int32_t)(batmonbus.bus_current*1000);
|
||||
//update electrical subsystem
|
||||
electrical.current = batmonbus.bus_current;
|
||||
|
||||
// increment status
|
||||
batmonbus.bus_status = BATTERY_MONITOR_BUS_VOLTAGE_REQ;
|
||||
@@ -271,12 +271,12 @@ void battery_monitor_read_bus(void){
|
||||
batmonbus.bus_voltage_mvolts = (uint16_t)(
|
||||
(float)batmonbus.bus_voltage_mvolts * BatmonVbusGain);
|
||||
|
||||
//update electrical subsystem, voltage in decivolts
|
||||
//update electrical subsystem
|
||||
if (batmonbus.bus_voltage_mvolts != 0) {
|
||||
electrical.vsupply = (uint16_t)(batmonbus.bus_voltage_mvolts/100);
|
||||
electrical.vsupply = (float)(batmonbus.bus_voltage_mvolts) / 1000.f;
|
||||
}
|
||||
else {
|
||||
electrical.vsupply = 0;
|
||||
electrical.vsupply = 0.f;
|
||||
}
|
||||
|
||||
// update status
|
||||
|
||||
@@ -79,14 +79,15 @@ void generic_com_periodic(void)
|
||||
FillBufWith16bit(com_trans.buf, 11, gps.gspeed); // ground speed (cm/s)
|
||||
FillBufWith16bit(com_trans.buf, 13, (int16_t)(gps.course / 1e4)); // course (1e3rad)
|
||||
FillBufWith16bit(com_trans.buf, 15, (uint16_t)(stateGetAirspeed_f() * 100)); // TAS (cm/s)
|
||||
com_trans.buf[17] = electrical.vsupply; // decivolts
|
||||
com_trans.buf[18] = (uint8_t)(energy / 100); // deciAh
|
||||
uint8_t vsupply = Min(electrical.vsupply * 10.f, 255); // deciVolt
|
||||
uint8_t charge = Min(electrical.vsupply * 10.f, 255); // deciAh
|
||||
com_trans.buf[17] = vsupply;
|
||||
com_trans.buf[18] = charge;
|
||||
com_trans.buf[19] = (uint8_t)(imcu_get_command(COMMAND_THROTTLE) * 100 / MAX_PPRZ);
|
||||
com_trans.buf[20] = autopilot_get_mode();
|
||||
com_trans.buf[21] = nav_block;
|
||||
FillBufWith16bit(com_trans.buf, 22, autopilot.flight_time);
|
||||
i2c_transmit(&GENERIC_COM_I2C_DEV, &com_trans, GENERIC_COM_SLAVE_ADDR, NB_DATA);
|
||||
|
||||
}
|
||||
|
||||
void generic_com_event(void)
|
||||
|
||||
@@ -517,8 +517,8 @@ static void mavlink_send_sys_status(struct transport_tx *trans, struct link_devi
|
||||
UAV_SENSORS, // On-board sensors: active (bitmap)
|
||||
UAV_SENSORS, // On-board sensors: state (bitmap)
|
||||
-1,//10*sys_mon.cpu_load, // System loadof main-loop time (0=0% to 1000=100%)
|
||||
100 * electrical.vsupply, // Battery voltage (milivolts)
|
||||
electrical.current / 10, // Battery current (10x miliampere)
|
||||
electrical.vsupply * 1000.f, // Battery voltage (milivolts)
|
||||
electrical.current * 100.f, // Battery current (10x miliampere)
|
||||
-1, // Battery remaining (0-100 in %)
|
||||
0, // Communication packet drops (0=0% to 10000=100%)
|
||||
0, // Communication error(per packet) (0=0% to 10000=100%)
|
||||
@@ -771,7 +771,7 @@ static void mavlink_send_battery_status(struct transport_tx *trans, struct link_
|
||||
{
|
||||
static uint16_t voltages[10];
|
||||
// we simply only set one cell for now
|
||||
voltages[0] = electrical.vsupply * 100;
|
||||
voltages[0] = electrical.vsupply * 1000.f; // convert to mV
|
||||
/// TODO: check what all these fields are supposed to represent
|
||||
mavlink_msg_battery_status_send(MAVLINK_COMM_0,
|
||||
0, // id
|
||||
@@ -779,9 +779,9 @@ static void mavlink_send_battery_status(struct transport_tx *trans, struct link_
|
||||
0, // type
|
||||
INT16_MAX, // unknown temperature
|
||||
voltages, // cell voltages
|
||||
electrical.current / 10,
|
||||
electrical.consumed,
|
||||
electrical.energy, // check scaling
|
||||
electrical.current * 100.f, // convert to deciA
|
||||
electrical.charge * 1000.f, // convert to mAh
|
||||
electrical.energy * 36, // convert to hecto Joule
|
||||
-1); // remaining percentage not estimated
|
||||
MAVLinkSendMessage();
|
||||
}
|
||||
|
||||
@@ -156,9 +156,8 @@ void max7456_periodic(void)
|
||||
step = 10;
|
||||
break;
|
||||
case (10):
|
||||
temp = ((float)electrical.vsupply) / 10;
|
||||
osd_sprintf(osd_string, "%.1fV", temp);
|
||||
if (temp > LOW_BAT_LEVEL) {
|
||||
osd_sprintf(osd_string, "%.2fV", electrical.vsupply);
|
||||
if (electrical.vsupply > LOW_BAT_LEVEL) {
|
||||
osd_put_s(osd_string, FALSE, 8, 0, 2);
|
||||
} else {
|
||||
osd_put_s(osd_string, BLINK | INVERT, 8, 0, 2);
|
||||
|
||||
@@ -39,7 +39,7 @@ Reporting:
|
||||
In: OK
|
||||
Out: AT+CMGS=\"GCS_NUMBER\"
|
||||
In: >
|
||||
Out: gps.utm_pos.east, gps.utm_pos.north, gps.course, gps.hmsl, gps.gspeed, -gps.ned_vel.z, vsupply, autopilot.flight_time, rssi CTRLZ
|
||||
Out: gps.utm_pos.east, gps.utm_pos.north, gps.course, gps.hmsl, gps.gspeed, -gps.ned_vel.z, electrical.vsupply, autopilot.flight_time, rssi CTRLZ
|
||||
|
||||
Receiving:
|
||||
In: +CMTI: ...,<number>
|
||||
@@ -61,6 +61,7 @@ Receiving:
|
||||
#include "subsystems/datalink/downlink.h"
|
||||
#include "subsystems/gps.h"
|
||||
#include "autopilot.h"
|
||||
#include "subsystems/electrical.h"
|
||||
//#include "subsystems/navigation/common_nav.h" //why is should this be needed?
|
||||
#include "generated/settings.h"
|
||||
|
||||
@@ -402,7 +403,7 @@ void gsm_send_report_continue(void)
|
||||
// Donnees batterie (seuls vsupply et autopilot.flight_time sont envoyes)
|
||||
// concatenation de toutes les infos en un seul message à transmettre
|
||||
sprintf(data_to_send, "%ld %ld %d %ld %d %d %d %d %d", gps.utm_pos.east, gps.utm_pos.north, gps_course, gps.hmsl,
|
||||
gps.gspeed, -gps.ned_vel.z, vsupply, autopilot.flight_time, rssi);
|
||||
gps.gspeed, -gps.ned_vel.z, electrical.vsupply, autopilot.flight_time, rssi);
|
||||
|
||||
// send the number and wait for the prompt
|
||||
char buf[32];
|
||||
|
||||
@@ -139,14 +139,13 @@ static void hott_init_eam_msg(struct HOTT_EAM_MSG *hott_eam_msg)
|
||||
|
||||
static void hott_update_eam_msg(struct HOTT_EAM_MSG *hott_eam_msg)
|
||||
{
|
||||
|
||||
hott_eam_msg->batt1_voltage = electrical.vsupply;
|
||||
hott_eam_msg->batt2_voltage = electrical.vsupply;
|
||||
hott_eam_msg->batt1_voltage = electrical.vsupply * 5; // convert from V to steps of 0.2V
|
||||
hott_eam_msg->batt2_voltage = electrical.vsupply * 5; // convert from V to steps of 0.2V
|
||||
//hott_eam_msg->temp1 = 20 + imu.temperature / 10;
|
||||
//hott_eam_msg->temp2 = 20 + imu.temperature / 10;
|
||||
hott_eam_msg->altitude = (uint16_t)(500 + (stateGetPositionEnu_i()->z) / (1 << INT32_POS_FRAC));
|
||||
hott_eam_msg->current = electrical.current / 100;
|
||||
hott_eam_msg->main_voltage = electrical.vsupply;
|
||||
hott_eam_msg->current = electrical.current * 10; // convert to deciA
|
||||
hott_eam_msg->main_voltage = electrical.vsupply * 10; // convert to deciV
|
||||
hott_eam_msg->batt_cap = 0;
|
||||
uint16_t speed_buf = (uint16_t)(stateGetHorizontalSpeedNorm_i() * 36 / 10 / (1 << INT32_SPEED_FRAC));
|
||||
hott_eam_msg->speed_L = speed_buf & 0xFF;
|
||||
|
||||
@@ -67,9 +67,9 @@ void led_safety_status_periodic(void)
|
||||
RunXTimesEvery(0, 240, 40, 5, {LED_OFF(SAFETY_WARNING_LED);});
|
||||
}
|
||||
#ifdef LOW_BAT_LEVEL
|
||||
else if (electrical.vsupply < (LOW_BAT_LEVEL * 10)) {
|
||||
else if (electrical.vsupply < LOW_BAT_LEVEL) {
|
||||
RunOnceEvery(20, {LED_TOGGLE(SAFETY_WARNING_LED);});
|
||||
} else if (electrical.vsupply < ((LOW_BAT_LEVEL + 0.5) * 10)) {
|
||||
} else if (electrical.vsupply < (LOW_BAT_LEVEL + 0.5)) {
|
||||
RunXTimesEvery(0, 300, 10, 10, {LED_TOGGLE(SAFETY_WARNING_LED);});
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -41,22 +41,25 @@
|
||||
|
||||
#include "subsystems/electrical.h"
|
||||
|
||||
|
||||
|
||||
void electrical_ardrone2_setup(void);
|
||||
|
||||
int fd;
|
||||
static int fd;
|
||||
|
||||
void bat_voltage_ardrone2_init(void)
|
||||
{
|
||||
// Initialize 12c device for power
|
||||
fd = open("/dev/i2c-1", O_RDWR);
|
||||
if (fd < 0){
|
||||
fprintf(stderr, "Failed to open i2c-1: %m\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ioctl(fd, I2C_SLAVE_FORCE, 0x4a) < 0) {
|
||||
fprintf(stderr, "Failed to set slave address: %m\n");
|
||||
return;
|
||||
}
|
||||
|
||||
electrical_ardrone2_setup();
|
||||
|
||||
}
|
||||
|
||||
void electrical_ardrone2_setup(void)
|
||||
@@ -85,7 +88,6 @@ void electrical_ardrone2_setup(void)
|
||||
|
||||
void bat_voltage_ardrone2_periodic(void)
|
||||
{
|
||||
|
||||
electrical_ardrone2_setup();
|
||||
|
||||
unsigned char lsb, msb;
|
||||
@@ -96,11 +98,9 @@ void bat_voltage_ardrone2_periodic(void)
|
||||
|
||||
// we know from spec sheet that ADCIN0 has no prescaler
|
||||
// so that the max voltage range is 1.5 volt
|
||||
// multiply by ten to get decivolts
|
||||
|
||||
//from raw measurement we got quite a lineair response
|
||||
//from raw measurement we got quite a linear response
|
||||
//9.0V=662, 9.5V=698, 10.0V=737,10.5V=774, 11.0V=811, 11.5V=848, 12.0V=886, 12.5V=923
|
||||
//leading to our 0.13595166 magic number for decivolts conversion
|
||||
electrical.vsupply = raw_voltage * 0.13595166;
|
||||
|
||||
//leading to our 0.013595166 magic number for volts conversion
|
||||
electrical.vsupply = raw_voltage * 0.013595166f;
|
||||
}
|
||||
|
||||
@@ -49,9 +49,6 @@ struct i2c_transaction ezcurrent_i2c_trans;
|
||||
|
||||
void ezcurrent_init(void)
|
||||
{
|
||||
electrical.vsupply = 0;
|
||||
electrical.current = 0;
|
||||
|
||||
ezcurrent_i2c_trans.status = I2CTransDone;
|
||||
ezcurrent_i2c_trans.slave_addr = EZCURRENT_ADDR;
|
||||
}
|
||||
@@ -69,12 +66,12 @@ void ezcurrent_read_periodic(void)
|
||||
void ezcurrent_read_event(void)
|
||||
{
|
||||
if (ezcurrent_i2c_trans.status == I2CTransSuccess) {
|
||||
/* voltage of EzOSD sensor is provided in mV, convert to deciVolt */
|
||||
electrical.vsupply = Uint16FromBuf(ezcurrent_i2c_trans.buf, 2) / 100;
|
||||
/* consumed ? in mAh */
|
||||
electrical.consumed = Int16FromBuf(ezcurrent_i2c_trans.buf, 6);
|
||||
/* sensor provides current in 1e-1 Ampere, convert to mA */
|
||||
electrical.current = Int16FromBuf(ezcurrent_i2c_trans.buf, 8) * 100;
|
||||
/* voltage of EzOSD sensor is provided in mV */
|
||||
electrical.vsupply = (float)(Uint16FromBuf(ezcurrent_i2c_trans.buf, 2)) / 1000.f;
|
||||
/* consumed electric charge in mAh */
|
||||
electrical.charge = (float)(Int16FromBuf(ezcurrent_i2c_trans.buf, 6)) / 1000.f;
|
||||
/* sensor provides current in 1e-1 Ampere */
|
||||
electrical.current = (float)(Int16FromBuf(ezcurrent_i2c_trans.buf, 8)) / 10.f;
|
||||
|
||||
// Transaction has been read
|
||||
ezcurrent_i2c_trans.status = I2CTransDone;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user