Thomas Watson
122cd72d9c
AP_Common: improve bitmask test coverage
2024-07-09 11:51:41 +10:00
Thomas Watson
4a2f03f851
AP_Common: test more bitmask bit widths
...
Actually test different widths and reveal problems with edge cases.
2024-07-09 11:51:41 +10:00
Thomas Watson
521cf00964
AP_Common: templatify bitmask tests
...
Enables testing of different widths and edge cases.
2024-07-09 11:51:41 +10:00
Peter Barker
911375fa9a
AP_Common: rearrange get_vector_from_origin_NEU to be less destructive
...
this change means that if the origin call failes we don't half-update the object before returning false
2024-06-11 09:47:14 +10:00
Andrew Tridgell
5620fee636
AP_Common: use NEW_NOTHROW for new(std::nothrow)
2024-06-04 09:20:21 +10:00
Mykhailo Kuznietsov
4e7d5e9ecf
AP_Common: Fix some typos
...
Fixed some typos found in the code.
2023-10-12 18:30:42 +11:00
Peter Barker
a9c62fa565
AP_Common: Location: add offset(Vector3p &ned_offset)
2023-09-12 09:29:26 +10:00
Andy Piper
d94e36fccc
AP_Common: ensure that constants are float not double if not otherwise declared
...
use correct DOUBLE_PRECISION_SOURCES definition
portably define qsort argument in tests
fix test_location
add test_location to double sources
2023-08-02 16:22:59 +01:00
Andrew Tridgell
2d28b59661
AP_Common: removed set_blocking_writes
...
and moved to top level locking in UARTs
2023-07-12 17:06:02 +10:00
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