Patrick José Pereira
adda695630
AP_Common: Update AP_FWVersion struct to be used with binary parsers
...
- Add an uint64_t header to allow easy detection of struct
- Add an uint16_t version
- MSB is for major release, compatibility break
- LSB for minor version, no compatibility break
- Add pointer size variable to allow decode of pointers
- Add vehicle type information
- Add board type and subtype to allow hardware identification
- Set type of fw_type to uint8_t since enum is declared as int
- Organize struct to be packed inside 32bits system
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
4 years ago
Randy Mackay
d9de6e8de9
AP_Common: UINT16_VALUE, UINT32_VALUE get parentheses around arguments
4 years ago
Randy Mackay
f3b193d6f8
AP_Common: add UINT32_VALUE
4 years ago
Patrick José Pereira
1ee03a0d2e
AP_Common: Add missing const in AP_FWVersion variables
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
4 years ago
Patrick José Pereira
e81f9fccd9
AP_Common: Add new AP_FWVersionDefine header
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
4 years ago
yaapu
6a0531c08a
AP_Common: added missing bit set/clear functions
5 years ago
Patrick José Pereira
6e24880f87
AP_Common: missing: Add definition for strndupa
...
`strndupa` is only available when using the GNU GCC suite.
With this definition is possible to use the MUSL compiler.
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
5 years ago
Rishabh
55923d8b7b
AP_Common: Add new method to extrapolate location from bearing and pitch
5 years ago
Andrew Tridgell
18deb1c0bd
AP_Common: added strncpy_noterm
...
used to suppress string termination warnings
5 years ago
Andrew Tridgell
7138811a57
AP_Common: fixed cast warnings for ExpandingArray
5 years ago
Michael du Breuil
ab2dea5b86
AP_Common: Add % operator to TSIndex
5 years ago
Peter Barker
8e82ea2540
AP_Common: create and use INTERNAL_ERROR macro so we get line numbers
5 years ago
bugobliterator
88de9572aa
AP_Common: use standard realloc method from HAL
5 years ago
Siddharth Purohit
faacd03e3a
AP_Common: add method that can help to put contraint on accessor type
5 years ago
Andrew Tridgell
b8f9f171e0
AP_Common: added IGNORE_RETURN() macro
5 years ago
Peter Barker
6c0b4206c5
AP_Common: remove is-zero checks for Location::offset
...
Only one call in 160 actually passes these in as zeroes, so doing the
checks vastly outweighs the benefits of not doing the maths
We do call this a lot when doing terrain checks.
5 years ago
Michael du Breuil
a99f67fd5b
AP_Common: Add a radian method for getting location bearings
5 years ago
Andrew Tridgell
c29867ecad
AP_Common: removed fcntl overrides
...
not needed with AP_Filesystem, and fixes lots of warnings with newer
compilers
5 years ago
Michael du Breuil
819d1b5246
AP_Common: Include altitude in the init check for a location
5 years ago
Randy Mackay
246bfcf4a1
AP_Common: expanding array checks memory before allocating
5 years ago
murata
a39228c453
AP_Common: Make hexadecimal character number conversion method common
6 years ago
Pierre Kancir
17c0cf8d5c
AP_Common: check for feenableexcept on WAF
6 years ago
Randy Mackay
df6c666740
AP_Common: add AP_ExpandingGeneric to reduce code size
6 years ago
Randy Mackay
4ef3005d2c
AP_Common: add AP_ExpandingArray delete
6 years ago
Randy Mackay
2cb89d9a02
AP_Common: expanding array uses realloc
...
also make chunk_size const and recommend factor of 2
also reduce top level array's initial size to 32 elements
6 years ago
Randy Mackay
073ce8c3db
AP_ExpandingArray: add class description and remove default constructor
...
also made the following changes:
replaced delete with free
renamed chunk_ptr typedef to chunk_ptr_t
6 years ago
Randy Mackay
528e7c60b0
AP_Common: add AP_ExpandingArray class
6 years ago
Peter Barker
b48c729bb1
AP_Common: add os_sw_version to AP_FWVersion
6 years ago
Michael du Breuil
6e0cceff0d
AP_Common: Remove extra comparison from longitude_scale()
6 years ago
Peter Barker
4e5842a150
AP_Common: add initialised() method to Location
...
Sometimes code paths are crossed when they shouldn't be. This method
can help in the short term if a codepath is calling methods on a
Location when it is not initialised, but generally a vehicle should be
calling position_ok() and other methods rather than this one.
6 years ago
Peter Barker
ab7ee4fefb
AP_Common: Location.cpp: add sanity checks
6 years ago
Peter Barker
9d4bdbf3d5
AP_Common: add sanity check into bitmask get/set
...
Also return false if we are asked about an out-of-bounds bit
6 years ago
Andrew Tridgell
75397c1734
AP_Common: removed old Semaphore.h
...
now moved to AP_HAL/Semaphores.h
6 years ago
Peter Barker
71d16557fa
AP_Common: Location: add WARN_IF_UNUSED to boolean methods
6 years ago
Pierre Kancir
ff4587a33a
AP_Math: move location define to Location class
6 years ago
Pierre Kancir
4f31c3dcd5
AP_Math: move line_path_proportion to Location
6 years ago
Pierre Kancir
e06d7dbbf7
AP_Math: move location_passed_point to Location and rename
6 years ago
Peter Barker
e51a0a7a52
AP_Common: make Bitmask a template on number of bits
6 years ago
Peter Barker
2352dd3f12
AP_Common: clean includes up in Location.h
6 years ago
Pierre Kancir
121e5d0abf
AP_Math: move location_3d_diff_NED to Location and rename
6 years ago
Pierre Kancir
29b2d7996b
AP_Common: move check_latlng to Location
6 years ago
Pierre Kancir
b10e75f4e1
AP_Math: move locations_are_same to Location and rename to same_latlon_as
6 years ago
Pierre Kancir
00fa07ef33
AP_Math: move location_diff to Location and rename
6 years ago
Pierre Kancir
a30404fb11
AP_Common: move location_update to Location and rename to offset_bearing
6 years ago
Pierre Kancir
6faf1d2849
AP_Common: move get_bearing_cd to Location and rename to get_bearing_to
6 years ago
Peter Barker
a6755b6406
AP_Common: correct type conversion issues in _assert_storage_size
6 years ago
Peter Barker
fd294101ec
AP_Common: Location: move sanitize to be a method on location
6 years ago
murata
7340502f18
AP_Common: Set the value of UINT16 with HIGH byte and LOW byte
6 years ago
Peter Barker
649130adcb
AP_Common: uniqify semaphore names
6 years ago
Peter Barker
22c0175d7f
AP_Location: use enum class for AltFrame enumeration
6 years ago