paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [6152] set battery_voltage in init of nps sim


From: Felix Ruess
Subject: [paparazzi-commits] [6152] set battery_voltage in init of nps sim
Date: Wed, 13 Oct 2010 19:52:47 +0000

Revision: 6152
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6152
Author:   flixr
Date:     2010-10-13 19:52:47 +0000 (Wed, 13 Oct 2010)
Log Message:
-----------
set battery_voltage in init of nps sim

Modified Paths:
--------------
    paparazzi3/trunk/conf/airframes/booz2_flixr.xml
    paparazzi3/trunk/sw/simulator/nps/nps_autopilot_booz.c

Modified: paparazzi3/trunk/conf/airframes/booz2_flixr.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/booz2_flixr.xml     2010-10-13 19:52:37 UTC 
(rev 6151)
+++ paparazzi3/trunk/conf/airframes/booz2_flixr.xml     2010-10-13 19:52:47 UTC 
(rev 6152)
@@ -189,6 +189,7 @@
   <section name="BAT">
     <define name="MILLIAMP_PER_PERCENT" value="0.86" />
     <define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V" />
+    <define name="MAX_BAT_LEVEL" value="12.0" unit="V" />
     <define name="BATTERY_SENS" value="0.246" integer="16" />
     <define name="BATTERY_OFFSET" value="0" />
   </section>

Modified: paparazzi3/trunk/sw/simulator/nps/nps_autopilot_booz.c
===================================================================
--- paparazzi3/trunk/sw/simulator/nps/nps_autopilot_booz.c      2010-10-13 
19:52:37 UTC (rev 6151)
+++ paparazzi3/trunk/sw/simulator/nps/nps_autopilot_booz.c      2010-10-13 
19:52:47 UTC (rev 6152)
@@ -1,11 +1,12 @@
 #include "nps_autopilot_booz.h"
 
-#include "firmwares/rotorcraft/main.h"
+#include <firmwares/rotorcraft/main.h>
 #include "nps_sensors.h"
 #include "nps_radio_control.h"
 #include "booz_radio_control.h"
 #include <firmwares/rotorcraft/imu.h>
-#include "firmwares/rotorcraft/baro.h"
+#include <firmwares/rotorcraft/baro.h>
+#include <firmwares/rotorcraft/battery.h>
 
 #include "actuators/supervision.h"
 
@@ -22,6 +23,12 @@
 
   main_init();
 
+#ifdef MAX_BAT_LEVEL
+  battery_voltage = MAX_BAT_LEVEL * 10;
+#else
+  battery_voltage = 111
+#endif
+
 }
 
 #include <stdio.h>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]