paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [6017] move booz2_battery to rotorcraft and rename t


From: Felix Ruess
Subject: [paparazzi-commits] [6017] move booz2_battery to rotorcraft and rename to battery
Date: Tue, 28 Sep 2010 16:21:26 +0000

Revision: 6017
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6017
Author:   flixr
Date:     2010-09-28 16:21:25 +0000 (Tue, 28 Sep 2010)
Log Message:
-----------
move booz2_battery to rotorcraft and rename to battery

Modified Paths:
--------------
    paparazzi3/trunk/conf/autopilot/booz_test_progs.makefile
    paparazzi3/trunk/conf/autopilot/rotorcraft.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
    paparazzi3/trunk/sw/airborne/booz/arch/lpc21/booz2_analog_hw.c
    paparazzi3/trunk/sw/airborne/booz/booz2_telemetry.h
    paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.c
    paparazzi3/trunk/sw/airborne/lisa/lisa_analog_plug.c
    paparazzi3/trunk/sw/simulator/old_booz/booz2_sim_main.c

Added Paths:
-----------
    paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/battery.c
    paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/battery.h

Removed Paths:
-------------
    paparazzi3/trunk/sw/airborne/booz/booz2_battery.c
    paparazzi3/trunk/sw/airborne/booz/booz2_battery.h

Modified: paparazzi3/trunk/conf/autopilot/booz_test_progs.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/booz_test_progs.makefile    2010-09-28 
15:47:38 UTC (rev 6016)
+++ paparazzi3/trunk/conf/autopilot/booz_test_progs.makefile    2010-09-28 
16:21:25 UTC (rev 6017)
@@ -111,7 +111,7 @@
                                  $(SRC_BOOZ_ARCH)/booz2_analog_hw.c
 # tell me why this shit needs to know battery !!!!
 test_baro.CFLAGS += -DBOOZ2_ANALOG_BATTERY_PERIOD='SYS_TICS_OF_SEC((1./10.))'
-test_baro.srcs += $(SRC_BOOZ)/booz2_battery.c
+test_baro.srcs += $(SRC_FIRMWARE)/battery.c
 
 
 #

Modified: paparazzi3/trunk/conf/autopilot/rotorcraft.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/rotorcraft.makefile 2010-09-28 15:47:38 UTC 
(rev 6016)
+++ paparazzi3/trunk/conf/autopilot/rotorcraft.makefile 2010-09-28 16:21:25 UTC 
(rev 6017)
@@ -149,7 +149,7 @@
 #
 ifeq ($(ARCH), lpc21)
 ap.CFLAGS += -DBOOZ2_ANALOG_BATTERY_PERIOD='SYS_TICS_OF_SEC((1./10.))'
-ap.srcs += $(SRC_BOOZ)/booz2_battery.c
+ap.srcs += $(SRC_FIRMWARE)/battery.c
 ap.CFLAGS += -DADC0_VIC_SLOT=2
 ap.CFLAGS += -DADC1_VIC_SLOT=3
 ap.srcs += $(SRC_BOOZ)/booz2_analog.c \

Modified: paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile      
2010-09-28 15:47:38 UTC (rev 6016)
+++ paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile      
2010-09-28 16:21:25 UTC (rev 6017)
@@ -81,7 +81,7 @@
 sim.srcs += $(SRC_BOARD)/baro_board.c
 
 sim.CFLAGS += -DBOOZ2_ANALOG_BATTERY_PERIOD='SYS_TICS_OF_SEC((1./10.))'
-sim.srcs += $(SRC_BOOZ)/booz2_battery.c
+sim.srcs += $(SRC_FIRMWARE)/battery.c
 
 sim.srcs += $(SRC_BOOZ)/booz2_analog.c $(SRC_BOOZ_SIM)/booz2_analog_hw.c
 

Modified: paparazzi3/trunk/sw/airborne/booz/arch/lpc21/booz2_analog_hw.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/arch/lpc21/booz2_analog_hw.c      
2010-09-28 15:47:38 UTC (rev 6016)
+++ paparazzi3/trunk/sw/airborne/booz/arch/lpc21/booz2_analog_hw.c      
2010-09-28 16:21:25 UTC (rev 6017)
@@ -25,7 +25,7 @@
 
 /* analog_arch includes baro ??? naaaa we don't want double references */
 #include "firmwares/rotorcraft/baro.h"
-#include "booz2_battery.h"
+#include <firmwares/rotorcraft/battery.h>
 
 #ifndef USE_EXTRA_ADC
 /* Default mode
@@ -98,7 +98,7 @@
   ISR_ENTRY();
   uint32_t tmp = AD0GDR;
   uint16_t tmp2 = (uint16_t)(tmp >> 6) & 0x03FF;
-  Booz2BatteryISRHandler(tmp2);
+  BatteryISRHandler(tmp2);
   /* trigger next convertion */
   T0MR1 += BOOZ2_ANALOG_BATTERY_PERIOD;
   /* lower clock         */
@@ -199,7 +199,7 @@
 void booz2_analog_bat_read(void) {
   uint32_t tmp = AD0DR2;
   uint16_t tmp2 = (uint16_t)(tmp >> 6) & 0x03FF;
-  Booz2BatteryISRHandler(tmp2);
+  BatteryISRHandler(tmp2);
 }
 
 void booz2_analog_extra_adc_read(void) {

Deleted: paparazzi3/trunk/sw/airborne/booz/booz2_battery.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz2_battery.c   2010-09-28 15:47:38 UTC 
(rev 6016)
+++ paparazzi3/trunk/sw/airborne/booz/booz2_battery.c   2010-09-28 16:21:25 UTC 
(rev 6017)
@@ -1,30 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING.  If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "booz2_battery.h"
-
-uint8_t booz2_battery_voltage;
-
-void booz2_battery_init(void) {
-  booz2_battery_voltage = 0;
-}

Deleted: paparazzi3/trunk/sw/airborne/booz/booz2_battery.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz2_battery.h   2010-09-28 15:47:38 UTC 
(rev 6016)
+++ paparazzi3/trunk/sw/airborne/booz/booz2_battery.h   2010-09-28 16:21:25 UTC 
(rev 6017)
@@ -1,43 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING.  If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef BOOZ2_BATTERY_H
-#define BOOZ2_BATTERY_H
-
-#include "std.h"
-
-#include "airframe.h"
-
-/* decivolts */
-extern uint8_t booz2_battery_voltage;
-
-static inline void Booz2BatteryISRHandler(uint16_t _val) {
-  uint32_t cal_v = (uint32_t)(_val) * BATTERY_SENS_NUM / BATTERY_SENS_DEN;
-  uint32_t sum = (uint32_t)booz2_battery_voltage + cal_v;
-  booz2_battery_voltage = (uint8_t)(sum/2);
-}
-
-
-extern void booz2_battery_init(void);
-
-#endif /* BOOZ2_BATTERY_H */

Modified: paparazzi3/trunk/sw/airborne/booz/booz2_telemetry.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz2_telemetry.h 2010-09-28 15:47:38 UTC 
(rev 6016)
+++ paparazzi3/trunk/sw/airborne/booz/booz2_telemetry.h 2010-09-28 16:21:25 UTC 
(rev 6017)
@@ -45,7 +45,7 @@
 
 #define PERIODIC_SEND_ALIVE(_chan) DOWNLINK_SEND_ALIVE(_chan, 16, MD5SUM)
 
-#include "booz2_battery.h"
+#include <firmwares/rotorcraft/battery.h>
 #include <firmwares/rotorcraft/imu.h>
 #include "booz_gps.h"
 #include <firmwares/rotorcraft/ins.h>
@@ -69,7 +69,7 @@
                              &autopilot_motors_on,             \
                              &guidance_h_mode,                 \
                              &guidance_v_mode,                 \
-                             &booz2_battery_voltage,                   \
+                             &battery_voltage,                 \
                              &cpu_time_sec                             \
                              );                                        \
   }
@@ -88,7 +88,7 @@
                              &autopilot_motors_on,             \
                              &guidance_h_mode,                 \
                              &guidance_v_mode,                 \
-                             &booz2_battery_voltage,                   \
+                             &battery_voltage,                 \
                              &cpu_time_sec                             \
                              );                                        \
   }

Copied: paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/battery.c (from rev 
6016, paparazzi3/trunk/sw/airborne/booz/booz2_battery.c)
===================================================================
--- paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/battery.c                 
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/battery.c 2010-09-28 
16:21:25 UTC (rev 6017)
@@ -0,0 +1,30 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <firmwares/rotorcraft/battery.h>
+
+uint8_t battery_voltage;
+
+void battery_init(void) {
+  battery_voltage = 0;
+}

Copied: paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/battery.h (from rev 
6016, paparazzi3/trunk/sw/airborne/booz/booz2_battery.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/battery.h                 
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/battery.h 2010-09-28 
16:21:25 UTC (rev 6017)
@@ -0,0 +1,43 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef BOOZ2_BATTERY_H
+#define BOOZ2_BATTERY_H
+
+#include "std.h"
+
+#include "airframe.h"
+
+/* decivolts */
+extern uint8_t battery_voltage;
+
+static inline void BatteryISRHandler(uint16_t _val) {
+  uint32_t cal_v = (uint32_t)(_val) * BATTERY_SENS_NUM / BATTERY_SENS_DEN;
+  uint32_t sum = (uint32_t)battery_voltage + cal_v;
+  battery_voltage = (uint8_t)(sum/2);
+}
+
+
+extern void battery_init(void);
+
+#endif /* BOOZ2_BATTERY_H */

Modified: paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.c
===================================================================
--- paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.c    2010-09-28 
15:47:38 UTC (rev 6016)
+++ paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.c    2010-09-28 
16:21:25 UTC (rev 6017)
@@ -44,7 +44,7 @@
 #include "booz/booz2_analog.h"
 #include <firmwares/rotorcraft/baro.h>
 
-#include "booz2_battery.h"
+#include <firmwares/rotorcraft/battery.h>
 
 #include "booz_fms.h"
 #include <firmwares/rotorcraft/autopilot.h>
@@ -109,7 +109,7 @@
   booz2_pwm_init_hw();
 #endif
 
-  booz2_battery_init();
+  battery_init();
   imu_init();
 
   booz_fms_init();

Modified: paparazzi3/trunk/sw/airborne/lisa/lisa_analog_plug.c
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/lisa_analog_plug.c        2010-09-28 
15:47:38 UTC (rev 6016)
+++ paparazzi3/trunk/sw/airborne/lisa/lisa_analog_plug.c        2010-09-28 
16:21:25 UTC (rev 6017)
@@ -6,15 +6,15 @@
 bool_t   booz2_analog_baro_data_available;
 uint16_t booz2_analog_baro_status;
 
-uint8_t booz2_battery_voltage;
+uint8_t battery_voltage;
 
 void booz2_analog_init(void);
 void booz2_analog_baro_init(void);
-void booz2_battery_init(void);
+void battery_init(void);
 
 void booz2_analog_init(void) {}
 
 void booz2_analog_baro_init(void) {}
 
-void booz2_battery_init(void) {}
+void battery_init(void) {}
 

Modified: paparazzi3/trunk/sw/simulator/old_booz/booz2_sim_main.c
===================================================================
--- paparazzi3/trunk/sw/simulator/old_booz/booz2_sim_main.c     2010-09-28 
15:47:38 UTC (rev 6016)
+++ paparazzi3/trunk/sw/simulator/old_booz/booz2_sim_main.c     2010-09-28 
16:21:25 UTC (rev 6017)
@@ -33,7 +33,7 @@
 #include "booz_sensors_model.h"
 #include "booz_wind_model.h"
 #include "booz_rc_sim.h"
-#include "booz2_battery.h"
+#include <firmwares/rotorcraft/battery.h>
 
 #include "main.h"
 
@@ -141,7 +141,7 @@
     booz_flight_model_run(SIM_DT, booz_sim_actuators_values);
 
     booz_sensors_model_run(sim_time);
-    booz2_battery_voltage = bfm.bat_voltage * 10;
+    battery_voltage = bfm.bat_voltage * 10;
     
     /* outputs models state */
     booz2_sim_display();




reply via email to

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