paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [4626] add power field to ENERGY message


From: Pascal Brisset
Subject: [paparazzi-commits] [4626] add power field to ENERGY message
Date: Thu, 04 Mar 2010 10:48:42 +0000

Revision: 4626
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4626
Author:   hecto
Date:     2010-03-04 10:48:42 +0000 (Thu, 04 Mar 2010)
Log Message:
-----------
 add power field to ENERGY message

Modified Paths:
--------------
    paparazzi3/trunk/conf/messages.xml
    paparazzi3/trunk/sw/airborne/ap_downlink.h

Modified: paparazzi3/trunk/conf/messages.xml
===================================================================
--- paparazzi3/trunk/conf/messages.xml  2010-03-04 09:36:09 UTC (rev 4625)
+++ paparazzi3/trunk/conf/messages.xml  2010-03-04 10:48:42 UTC (rev 4626)
@@ -338,6 +338,7 @@
     <field name="bat"      type="float" unit="V"/>
     <field name="amp"      type="float" unit="A"/>
     <field name="energy"   type="uint16" unit="Wh"/>
+    <field name="power"   type="float" unit="W"/>
   </message>
 
  <message name="WINDTURBINE_STATUS_" id="50">

Modified: paparazzi3/trunk/sw/airborne/ap_downlink.h
===================================================================
--- paparazzi3/trunk/sw/airborne/ap_downlink.h  2010-03-04 09:36:09 UTC (rev 
4625)
+++ paparazzi3/trunk/sw/airborne/ap_downlink.h  2010-03-04 10:48:42 UTC (rev 
4626)
@@ -183,7 +183,7 @@
 #define PERIODIC_SEND_AIRSPEED(_chan) {}
 #endif
 
-#define PERIODIC_SEND_ENERGY(_chan) Downlink({ int16_t e = energy; float vsup 
= ((float)vsupply) / 10.0f; float curs = ((float) current)/1000.0f;  
DOWNLINK_SEND_ENERGY(_chan, &vsup, &curs, &e); })
+#define PERIODIC_SEND_ENERGY(_chan) Downlink({ const int16_t e = energy; const 
float vsup = ((float)vsupply) / 10.0f; const float curs = ((float) 
current)/1000.0f;  const float power = vsup * curs; DOWNLINK_SEND_ENERGY(_chan, 
&vsup, &curs, &e, &power); })
 
 
 #include "fw_h_ctl_a.h"





reply via email to

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