paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [4843]


From: antoine drouin
Subject: [paparazzi-commits] [4843]
Date: Wed, 21 Apr 2010 09:25:53 +0000

Revision: 4843
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4843
Author:   poine
Date:     2010-04-21 09:25:52 +0000 (Wed, 21 Apr 2010)
Log Message:
-----------


Added Paths:
-----------
    paparazzi3/trunk/sw/airborne/lisa/lisa_analog_plug.c
    paparazzi3/trunk/sw/airborne/lisa/plug_sys.c
    paparazzi3/trunk/sw/airborne/lisa/test_float.c

Added: paparazzi3/trunk/sw/airborne/lisa/lisa_analog_plug.c
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/lisa_analog_plug.c                        
        (rev 0)
+++ paparazzi3/trunk/sw/airborne/lisa/lisa_analog_plug.c        2010-04-21 
09:25:52 UTC (rev 4843)
@@ -0,0 +1,16 @@
+#include "std.h"
+
+uint16_t booz2_analog_baro_offset;
+uint16_t booz2_analog_baro_value;
+uint16_t booz2_analog_baro_value_filtered;
+bool_t   booz2_analog_baro_data_available;
+uint16_t booz2_analog_baro_status;
+
+uint8_t booz2_battery_voltage;
+
+void booz2_analog_init(void) {}
+
+void booz2_analog_baro_init(void) {}
+
+void booz2_battery_init(void) {}
+

Added: paparazzi3/trunk/sw/airborne/lisa/plug_sys.c
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/plug_sys.c                                
(rev 0)
+++ paparazzi3/trunk/sw/airborne/lisa/plug_sys.c        2010-04-21 09:25:52 UTC 
(rev 4843)
@@ -0,0 +1,18 @@
+#include <unistd.h>
+extern off_t                  lseek(int, off_t, int);
+extern void                   abort(void);
+extern pid_t                  getpid(void);
+extern int                    kill(pid_t, int);
+extern void *                 _sbrk(int);
+extern ssize_t                _write(int, const void *, size_t);
+extern int                    _close(int);
+extern ssize_t                _read(int, void *, size_t);
+
+off_t                  _lseek(int a, off_t b, int c) {}
+void                   abort(void) {}
+pid_t                  getpid(void) {}
+int                    kill(pid_t a, int b) {}
+void *                 _sbrk(int a) {}
+ssize_t                _write(int a, const void *b, size_t c) {}
+int                    _close(int a) {}
+ssize_t                _read(int a, void *b, size_t c) {}

Added: paparazzi3/trunk/sw/airborne/lisa/test_float.c
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/test_float.c                              
(rev 0)
+++ paparazzi3/trunk/sw/airborne/lisa/test_float.c      2010-04-21 09:25:52 UTC 
(rev 4843)
@@ -0,0 +1,70 @@
+/*
+ * $Id$
+ *  
+ * Copyright (C) 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 <math.h>
+
+#include BOARD_CONFIG
+#include "init_hw.h"
+#include "sys_time.h"
+#include "downlink.h"
+static inline void main_init( void );
+static inline void main_periodic( void );
+
+
+int main(void) {
+
+  main_init();
+
+  while (1) {
+    if (sys_time_periodic())
+      main_periodic();
+  }
+  return 0;
+}
+
+static inline void main_init( void ) {
+  hw_init();
+  sys_time_init();
+}
+
+static inline void main_periodic( void ) {
+  static float f = 0.1f;
+  f += 0.001;
+  float f1 = sinf(f);     // ok
+  static double d = 0.1;
+  d += 0.0025;
+  double d1 = sin(d);
+
+  //  float i = sqrt(f);  // nok
+  float i = powf(f1, f1); // nok
+  //float i = atan2(f, f); // ok
+  RunOnceEvery(10, {DOWNLINK_SEND_TEST_FORMAT(DefaultChannel, &d1, &i);});
+
+  uint16_t  blaaa = f+d;
+
+  RunOnceEvery(10, {DOWNLINK_SEND_BOOT(DefaultChannel, &blaaa);});
+  LED_PERIODIC();
+}
+
+
+





reply via email to

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