diff --git a/conf/messages.xml b/conf/messages.xml index 693fdd0511..d703536005 100644 --- a/conf/messages.xml +++ b/conf/messages.xml @@ -338,6 +338,7 @@ + diff --git a/sw/airborne/ap_downlink.h b/sw/airborne/ap_downlink.h index a1fb951503..940a4dab43 100644 --- a/sw/airborne/ap_downlink.h +++ b/sw/airborne/ap_downlink.h @@ -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"