Commit Graph

28 Commits

Author SHA1 Message Date
Peter Barker 5333f404d3 AP_Common: pre-declare print_vprintf
these seem to override a soft symbol somewhere, so can't be static or be removed or the tests fail
2023-05-20 17:28:08 +10:00
Peter Barker 44dad72dd9 AP_Common: correct example for BufferPrinter changes 2023-03-22 17:59:11 +11:00
Peter Barker d092e767ea AP_Common: correct gtests
AFAIK it's invalid to new a zero-length array.
2022-08-15 07:39:39 +10:00
Peter Barker f1069023ee AP_Common: tidy includes 2022-05-03 09:14:58 +10:00
Andrew Tridgell 8973519232 AP_Common: improved accuracy of get_bearing()
make base function ftype, then convert to int32_t for get_bearing_to()
2022-03-10 07:34:20 +11:00
Shiv Tyagi 560e24385a AP_Common: fix location sanitize unit test 2022-03-01 10:55:32 +11:00
Andrew Tridgell 19661fe981 AP_Common: added uint16_t sorting code
also added test suite
2022-02-19 18:24:56 +11:00
Patrick José Pereira b839ddcc00 AP_Common: tests: Update fwversion with the latest version
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2022-02-11 09:21:00 +11:00
Peter Barker 8cdda7dec2 AP_Common: stop passing mission in Terrain constructor
Terrain can use the mission singleton

This means Copter can have terrain while compiling mission out
2022-02-08 11:20:20 +11:00
Andy Piper 32482a29db AP_Common: define build directory for tests 2021-10-26 11:42:12 +11:00
Andy Piper ad55a570ee AP_Common: define build directory for tests 2021-10-26 11:42:12 +11:00
Josh Henderson 6c3612b51d AP_Common: enable SITL unit testing
apcommon
2021-09-28 09:11:48 +10:00
Peter Barker d73ce0ed57 AP_Common: tests: stop overriding non-virtual method
set_origin is no longer virtual.  These tests can be reinstated once we
have a single origin for the AHRS
2021-08-05 10:37:47 +10:00
Andrew Tridgell 68a33e996d AP_Common: fixed invalid nmea test 2021-08-05 09:43:35 +10:00
Peter Barker 2bd8a45c58 AP_Common: rename for AHRS restructuring 2021-07-21 21:01:39 +10:00
Andrew Tridgell 416c0724d2 AP_Common: use double precision for more location functions when available
this makes the location functions more accurate at long distances when
EKF double enabled
2021-07-14 17:34:40 +10:00
Andrew Tridgell 3ded1e6c10 AP_Common: added ftype precision offset call 2021-07-14 17:34:40 +10:00
Peter Barker fc2338612e AP_Common: stop setting terrain pointer in test_location
Also enable/disable as required for testing
2021-07-12 17:34:44 +10:00
Andrew Tridgell 56d9134e38 AP_Common: adjust test_location values
for adjusted longitude scale accuracy
2021-07-10 07:20:41 +10:00
Andrew Tridgell a924f66f70 AP_Common: fixed comment 2021-07-10 07:20:41 +10:00
Andrew Tridgell 6a3b12956a AP_Common: make longitude_scale() a static
this changes the use of longitude_scale() to use the average latitude
instead of the lattitude at one end of the line when calculating
positions and distances. It means we obey the basic geometry rule
that:

 pos1 + offs = pos2
 pos2 - offs == pos1
2021-07-10 07:20:41 +10:00
Andrew Tridgell b8e42be5d1 AP_Common: added double methods for SITL 2021-07-10 07:20:41 +10:00
Peter Barker f69e2a49f6 AP_Common: add test for longitude wrapping 2021-06-25 15:33:55 +10:00
Pierre Kancir 983e402804 AP_Common: add more unitttests 2021-06-21 21:16:29 +10:00
Pierre Kancir 614ebff842 AP_Common: add more unit tests 2021-06-18 16:03:51 +10:00
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
2019-05-28 09:43:17 +10:00
Peter Barker e51a0a7a52 AP_Common: make Bitmask a template on number of bits 2019-04-16 15:12:07 +10:00
Peter Barker 942555ceb8 AP_Common: add tests for Bitmask 2018-12-10 12:52:41 +09:00