mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:42:47 +08:00
add power field to ENERGY message
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user