1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00
Commit graph

6 commits

Author SHA1 Message Date
Martin Budden
dc076c17bd Fixed up tests 2016-12-05 07:12:45 +00:00
Martin Budden
5cd5eb96e5 Fixed up tests 2016-11-20 09:36:14 +00:00
Anders Hoglund
15d9eaffd4 Added junittest XML test results. 2016-10-16 17:48:31 +02:00
Martin Budden
f6bcbff239 Got alignsensor unit test working 2016-10-16 12:51:30 +01:00
Martin Budden
2e71ac3b84 Got unit tests working by removing non-working tests 2016-10-16 10:12:41 +01:00
Phillip Jones
f239eb3f35 This addresses issue #8 by adding unit tests for sensorsAlign().
The test file includes a simple independent implementation of
vector rotation. Each of the following sensor_align_e types are
tested:
 * CW0_DEG
 * CW90_DEG
 * CW180_DEG
 * CW270_DEG
 * CW0_DEG_FLIP
 * CW90_DEG_FLIP
 * CW180_DEG_FLIP
 * CW270_DEG_FLIP

For each test, three unit vectors and a random vector are tested.
 * {1, 0, 0}
 * {0, 1, 0}
 * {0, 0, 1}
 * {R, R, R} (where R is a random number)

The vector under test is rotated using the functions defined in the
test file. The output of the test function is compared to the
output of the sensorsAlign() function. The outputs match for all
test conditions.
2015-08-18 14:00:37 -06:00