paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] BAT or ENERGY message improvement possible?


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] BAT or ENERGY message improvement possible?
Date: Wed, 2 Nov 2011 13:09:29 +0100

sounds good to me

-Christophe 



On Tue, Nov 1, 2011 at 10:04 PM, Chris <address@hidden> wrote:
Hi.
Is it possible if there is no higher cause to change the BAT message so it can include
a more precise current value?
Up to know i had to include both "BAT" and "ENERGY" messages because of the current field low resolution (The "BAT" message also includes the throttle field so it is essential)
It looks like the "ENERGY" or "BAT" message can be modified in order to be more complete/
Currently the value has a resolution of 1A but i changed it to:
#define PERIODIC_SEND_BAT(_chan) { \
   uint16_t amps = (int16_t) (current/100);                \ //was (current/1000)
   Downlink({ int16_t e = energy;                    \
   DOWNLINK_SEND_BAT(_chan,                    \
&v_ctl_throttle_slewed,            \
&vsupply,                    \
&amps,                    \
&estimator_flight_time,            \
&kill_throttle,                \
&block_time,                    \
&stage_time,                    \
&e);                        \
     });                                \
}

This way the current field has a resolution of 0.1A and still can display more than enough amperes.
Chris


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

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