Fixes:
[1103/1501] Compiling libraries/SITL/SIM_Parachute.cpp
In file included from ../../libraries/AP_HAL/utility/sparse-endian.h:28,
from ../../libraries/AP_RCProtocol/AP_RCProtocol_Backend.h:24,
from ../../libraries/AP_RCProtocol/AP_RCProtocol.h:316,
from ../../libraries/AP_Logger/AP_Logger.h:16,
from ../../libraries/SITL/SIM_FlightAxis.cpp:33:
../../libraries/AP_Common/missing/byteswap.h:9:24: error: redefinition of ‘uint16_t __bswap_16(uint16_t)’
9 | static inline uint16_t __bswap_16(uint16_t u)
| ^~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from ../../libraries/AP_HAL/utility/sparse-endian.h:28,
from ../../libraries/AP_RCProtocol/AP_RCProtocol_Backend.h:24,
from ../../libraries/AP_RCProtocol/AP_RCProtocol.h:316,
from ../../libraries/AP_Logger/AP_Logger.h:16,
from ../../libraries/SITL/SIM_JSON.cpp:30:
../../libraries/AP_Common/missing/byteswap.h:9:24: error: redefinition of ‘uint16_t __bswap_16(uint16_t)’
9 | static inline uint16_t __bswap_16(uint16_t u)
| ^~~~~~~~~~
compilation terminated due to -Wfatal-errors.
AP_Logger.h is a nexus of includes; while this is being improved over
time, there's no reason for the library headers to include AP_Logger.h
as the logger itself is access by singleton and the structures are in
LogStructure.h
This necessitated moving The PID_Info structure out of AP_Logger's
namespace. This cleans up a pretty nasty bit - that structure is
definitely not simply used for logging, but also used to pass pid
information around to controllers!
There are a lot of patches in here because AP_Logger.h, acting as a
nexus, was providing transitive header file inclusion in many (some
unlikely!) places.
added Ampere hours unit in LOG_ESC_MSG
log ESC volts, amps and consumption as floats
update ESC log file structures
consumption in mAh
Correct the current_tot unit,
motor_temp unit and error_rate unit in comments (<amilcar.lucas@iav.de>)
move ESC_Telem logging to the AP_ESC_Telem class (<amilcar.lucas@iav.de>)
correct log structure (<amilcar.lucas@iav.de>)