add power field to ENERGY message

This commit is contained in:
Pascal Brisset
2010-03-04 10:48:42 +00:00
parent ff9c38adff
commit 74b2fd5582
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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">
+1 -1
View File
@@ -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"