paparazzi-devel
[Top][All Lists]
Advanced

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

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


From: Chris
Subject: [Paparazzi-devel] BAT or ENERGY message improvement possible?
Date: Tue, 01 Nov 2011 23:04:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15

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




reply via email to

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