fix sanity tests
This commit is contained in:
parent
ff24ba5185
commit
884df6aba0
|
|
@ -52,8 +52,8 @@ class BNO08x
|
||||||
bool dynamic_calibration_autosave_enable();
|
bool dynamic_calibration_autosave_enable();
|
||||||
bool dynamic_calibration_autosave_disable();
|
bool dynamic_calibration_autosave_disable();
|
||||||
bool dynamic_calibration_save();
|
bool dynamic_calibration_save();
|
||||||
bool dynamic_calibration_clear_data_ram();
|
bool dynamic_calibration_data_clear_ram();
|
||||||
bool dynamic_calibration_delete_data();
|
bool dynamic_calibration_data_delete();
|
||||||
bool dynamic_calibration_run_routine();
|
bool dynamic_calibration_run_routine();
|
||||||
|
|
||||||
constexpr static float SQRT2OVER2 = 0.7071067811865476f; // sqrt(2)/2, used for setting system orientation
|
constexpr static float SQRT2OVER2 = 0.7071067811865476f; // sqrt(2)/2, used for setting system orientation
|
||||||
|
|
|
||||||
|
|
@ -1413,7 +1413,7 @@ bool BNO08x::dynamic_calibration_save()
|
||||||
*
|
*
|
||||||
* @return True if save dynamic/ME calibration data succeeded.
|
* @return True if save dynamic/ME calibration data succeeded.
|
||||||
*/
|
*/
|
||||||
bool BNO08x::dynamic_calibration_clear_data_ram()
|
bool BNO08x::dynamic_calibration_data_clear_ram()
|
||||||
{
|
{
|
||||||
int op_success = SH2_ERR;
|
int op_success = SH2_ERR;
|
||||||
|
|
||||||
|
|
@ -1686,7 +1686,7 @@ bool BNO08x::dynamic_calibration_run_routine()
|
||||||
* Follows the steps outlined in ref. manual 6.4.9
|
* Follows the steps outlined in ref. manual 6.4.9
|
||||||
* @return True if delete dynamic calibration data operation succeeded.
|
* @return True if delete dynamic calibration data operation succeeded.
|
||||||
*/
|
*/
|
||||||
bool BNO08x::dynamic_calibration_delete_data()
|
bool BNO08x::dynamic_calibration_data_delete()
|
||||||
{
|
{
|
||||||
// 1. Reset hub (using hard_reset)
|
// 1. Reset hub (using hard_reset)
|
||||||
if (!hard_reset()) {
|
if (!hard_reset()) {
|
||||||
|
|
@ -1702,7 +1702,7 @@ bool BNO08x::dynamic_calibration_delete_data()
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// 3. Issue Clear DCD and Reset Command (atomic clear DCD from RAM and reset)
|
// 3. Issue Clear DCD and Reset Command (atomic clear DCD from RAM and reset)
|
||||||
if(!dynamic_calibration_clear_data_ram())
|
if(!dynamic_calibration_data_clear_ram())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32_BNO08x_LOG_STATEMENTS
|
#ifdef CONFIG_ESP32_BNO08x_LOG_STATEMENTS
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ TEST_CASE("Void Input Param Flavor Cb", "[CallbackAllReportVoidInputParam]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f "
|
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f "
|
||||||
"accuracy: %s ",
|
"accuracy: %s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
else if (imu->rpt.linear_accelerometer.has_new_data())
|
else if (imu->rpt.linear_accelerometer.has_new_data())
|
||||||
|
|
@ -82,7 +82,7 @@ TEST_CASE("Void Input Param Flavor Cb", "[CallbackAllReportVoidInputParam]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f z: "
|
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f z: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
else if (imu->rpt.gravity.has_new_data())
|
else if (imu->rpt.gravity.has_new_data())
|
||||||
|
|
@ -92,7 +92,7 @@ TEST_CASE("Void Input Param Flavor Cb", "[CallbackAllReportVoidInputParam]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: "
|
"Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
else if (imu->rpt.cal_gyro.has_new_data())
|
else if (imu->rpt.cal_gyro.has_new_data())
|
||||||
|
|
@ -102,7 +102,7 @@ TEST_CASE("Void Input Param Flavor Cb", "[CallbackAllReportVoidInputParam]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: "
|
"Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data_vel.x, data_vel.y, data_vel.z, BNO08x::accuracy_to_str(data_vel.accuracy));
|
(i + 1), data_vel.x, data_vel.y, data_vel.z, BNO08xAccuracy_to_str(data_vel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
else if (imu->rpt.cal_magnetometer.has_new_data())
|
else if (imu->rpt.cal_magnetometer.has_new_data())
|
||||||
|
|
@ -112,7 +112,7 @@ TEST_CASE("Void Input Param Flavor Cb", "[CallbackAllReportVoidInputParam]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: CalMagnetometer: [uTesla] x: %.2f y: "
|
"Rx Data Trial %d Success: CalMagnetometer: [uTesla] x: %.2f y: "
|
||||||
"%.2f z: %.2f accuracy: %s ",
|
"%.2f z: %.2f accuracy: %s ",
|
||||||
(i + 1), data_magf.x, data_magf.y, data_magf.z, BNO08x::accuracy_to_str(data_magf.accuracy));
|
(i + 1), data_magf.x, data_magf.y, data_magf.z, BNO08xAccuracy_to_str(data_magf.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
else if (imu->rpt.rv.has_new_data())
|
else if (imu->rpt.rv.has_new_data())
|
||||||
|
|
@ -123,7 +123,7 @@ TEST_CASE("Void Input Param Flavor Cb", "[CallbackAllReportVoidInputParam]")
|
||||||
"Rx Data Trial %d Success: RV: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
"Rx Data Trial %d Success: RV: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
||||||
BNO08x::accuracy_to_str(data_quat.accuracy));
|
BNO08xAccuracy_to_str(data_quat.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
else if (imu->rpt.rv_game.has_new_data())
|
else if (imu->rpt.rv_game.has_new_data())
|
||||||
|
|
@ -134,7 +134,7 @@ TEST_CASE("Void Input Param Flavor Cb", "[CallbackAllReportVoidInputParam]")
|
||||||
"Rx Data Trial %d Success: RV Game: [n/a] real: %.2f i: %.2f j: "
|
"Rx Data Trial %d Success: RV Game: [n/a] real: %.2f i: %.2f j: "
|
||||||
"%.2f k: %.2f accuracy: %s ",
|
"%.2f k: %.2f accuracy: %s ",
|
||||||
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
||||||
BNO08x::accuracy_to_str(data_quat.accuracy));
|
BNO08xAccuracy_to_str(data_quat.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
else if (imu->rpt.rv_geomagnetic.has_new_data())
|
else if (imu->rpt.rv_geomagnetic.has_new_data())
|
||||||
|
|
@ -145,7 +145,7 @@ TEST_CASE("Void Input Param Flavor Cb", "[CallbackAllReportVoidInputParam]")
|
||||||
"Rx Data Trial %d Success: RV Geomagnetic: [n/a] real: %.2f i: "
|
"Rx Data Trial %d Success: RV Geomagnetic: [n/a] real: %.2f i: "
|
||||||
"%.2f j: %.2f k: %.2f accuracy: %s ",
|
"%.2f j: %.2f k: %.2f accuracy: %s ",
|
||||||
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
||||||
BNO08x::accuracy_to_str(data_quat.accuracy));
|
BNO08xAccuracy_to_str(data_quat.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -257,7 +257,7 @@ TEST_CASE("Report ID Input Param Flavor Cb", "[CallbackAllReportIDInputParam]")
|
||||||
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: "
|
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z,
|
(i + 1), data_accel.x, data_accel.y, data_accel.z,
|
||||||
BNO08x::accuracy_to_str(data_accel.accuracy));
|
BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -268,7 +268,7 @@ TEST_CASE("Report ID Input Param Flavor Cb", "[CallbackAllReportIDInputParam]")
|
||||||
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f "
|
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f "
|
||||||
"z: %.2f accuracy: %s ",
|
"z: %.2f accuracy: %s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z,
|
(i + 1), data_accel.x, data_accel.y, data_accel.z,
|
||||||
BNO08x::accuracy_to_str(data_accel.accuracy));
|
BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -279,7 +279,7 @@ TEST_CASE("Report ID Input Param Flavor Cb", "[CallbackAllReportIDInputParam]")
|
||||||
"Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: "
|
"Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z,
|
(i + 1), data_accel.x, data_accel.y, data_accel.z,
|
||||||
BNO08x::accuracy_to_str(data_accel.accuracy));
|
BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -289,7 +289,7 @@ TEST_CASE("Report ID Input Param Flavor Cb", "[CallbackAllReportIDInputParam]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: "
|
"Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data_vel.x, data_vel.y, data_vel.z, BNO08x::accuracy_to_str(data_vel.accuracy));
|
(i + 1), data_vel.x, data_vel.y, data_vel.z, BNO08xAccuracy_to_str(data_vel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -299,7 +299,7 @@ TEST_CASE("Report ID Input Param Flavor Cb", "[CallbackAllReportIDInputParam]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: CalMagnetometer: [uTesla] x: %.2f "
|
"Rx Data Trial %d Success: CalMagnetometer: [uTesla] x: %.2f "
|
||||||
"y: %.2f z: %.2f accuracy: %s ",
|
"y: %.2f z: %.2f accuracy: %s ",
|
||||||
(i + 1), data_magf.x, data_magf.y, data_magf.z, BNO08x::accuracy_to_str(data_magf.accuracy));
|
(i + 1), data_magf.x, data_magf.y, data_magf.z, BNO08xAccuracy_to_str(data_magf.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -310,7 +310,7 @@ TEST_CASE("Report ID Input Param Flavor Cb", "[CallbackAllReportIDInputParam]")
|
||||||
"Rx Data Trial %d Success: RV: [n/a] real: %.2f i: %.2f j: "
|
"Rx Data Trial %d Success: RV: [n/a] real: %.2f i: %.2f j: "
|
||||||
"%.2f k: %.2f accuracy: %s ",
|
"%.2f k: %.2f accuracy: %s ",
|
||||||
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
||||||
BNO08x::accuracy_to_str(data_quat.accuracy));
|
BNO08xAccuracy_to_str(data_quat.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -321,7 +321,7 @@ TEST_CASE("Report ID Input Param Flavor Cb", "[CallbackAllReportIDInputParam]")
|
||||||
"Rx Data Trial %d Success: RV Game: [n/a] real: %.2f i: %.2f "
|
"Rx Data Trial %d Success: RV Game: [n/a] real: %.2f i: %.2f "
|
||||||
"j: %.2f k: %.2f accuracy: %s ",
|
"j: %.2f k: %.2f accuracy: %s ",
|
||||||
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
||||||
BNO08x::accuracy_to_str(data_quat.accuracy));
|
BNO08xAccuracy_to_str(data_quat.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -332,7 +332,7 @@ TEST_CASE("Report ID Input Param Flavor Cb", "[CallbackAllReportIDInputParam]")
|
||||||
"Rx Data Trial %d Success: RV Geomagnetic: [n/a] real: %.2f i: "
|
"Rx Data Trial %d Success: RV Geomagnetic: [n/a] real: %.2f i: "
|
||||||
"%.2f j: %.2f k: %.2f accuracy: %s ",
|
"%.2f j: %.2f k: %.2f accuracy: %s ",
|
||||||
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k,
|
||||||
BNO08x::accuracy_to_str(data_quat.accuracy));
|
BNO08xAccuracy_to_str(data_quat.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -432,7 +432,7 @@ TEST_CASE("Single Report Void Input Param Flavor Cb", "[CallbackSingleReportVoid
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f "
|
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f "
|
||||||
"accuracy: %s ",
|
"accuracy: %s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ TEST_CASE("Hard Reset", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@ TEST_CASE("Hard Reset", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,7 +95,7 @@ TEST_CASE("Soft Reset", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,7 +108,7 @@ TEST_CASE("Soft Reset", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -140,7 +140,7 @@ TEST_CASE("Sleep", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,7 +162,7 @@ TEST_CASE("Sleep", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -195,7 +195,7 @@ TEST_CASE("Get Metadata", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -215,7 +215,7 @@ TEST_CASE("Get Metadata", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -248,7 +248,7 @@ TEST_CASE("Get Sample Counts", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -265,7 +265,7 @@ TEST_CASE("Get Sample Counts", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -299,7 +299,7 @@ TEST_CASE("Enable Dynamic Calibration", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -327,7 +327,7 @@ TEST_CASE("Save Dynamic Calibration", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -355,7 +355,7 @@ TEST_CASE("Autosave Dynamic Calibration", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -385,7 +385,7 @@ TEST_CASE("Disable Dynamic Calibration", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -405,7 +405,7 @@ TEST_CASE("Clear Dynamic Calibration", "[FeatureTests]")
|
||||||
|
|
||||||
imu = BNO08xTestHelper::get_test_imu();
|
imu = BNO08xTestHelper::get_test_imu();
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL(true, imu->dynamic_calibration_clear());
|
TEST_ASSERT_EQUAL(true, imu->dynamic_calibration_data_clear_ram());
|
||||||
|
|
||||||
for (int i = 0; i < RX_REPORT_TRIAL_CNT; i++)
|
for (int i = 0; i < RX_REPORT_TRIAL_CNT; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -413,7 +413,7 @@ TEST_CASE("Clear Dynamic Calibration", "[FeatureTests]")
|
||||||
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
TEST_ASSERT_EQUAL(true, imu->rpt.accelerometer.has_new_data());
|
||||||
data_accel = imu->rpt.accelerometer.get();
|
data_accel = imu->rpt.accelerometer.get();
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data_accel.x,
|
||||||
data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ TEST_CASE("Enable/Disable Dual Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data.x, data.y, data.z, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.x, data.y, data.z, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ TEST_CASE("Enable/Disable Dual Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data.x, data.y, data.z, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.x, data.y, data.z, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -124,7 +124,7 @@ TEST_CASE("Enable/Disable Quad Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -135,7 +135,7 @@ TEST_CASE("Enable/Disable Quad Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -146,7 +146,7 @@ TEST_CASE("Enable/Disable Quad Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@ TEST_CASE("Enable/Disable Quad Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data_vel.x, data_vel.y, data_vel.z, BNO08x::accuracy_to_str(data_vel.accuracy));
|
(i + 1), data_vel.x, data_vel.y, data_vel.z, BNO08xAccuracy_to_str(data_vel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -221,7 +221,7 @@ TEST_CASE("Enable/Disable Octo Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -232,7 +232,7 @@ TEST_CASE("Enable/Disable Octo Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: LinAccel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -243,7 +243,7 @@ TEST_CASE("Enable/Disable Octo Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08x::accuracy_to_str(data_accel.accuracy));
|
(i + 1), data_accel.x, data_accel.y, data_accel.z, BNO08xAccuracy_to_str(data_accel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -254,7 +254,7 @@ TEST_CASE("Enable/Disable Octo Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data_vel.x, data_vel.y, data_vel.z, BNO08x::accuracy_to_str(data_vel.accuracy));
|
(i + 1), data_vel.x, data_vel.y, data_vel.z, BNO08xAccuracy_to_str(data_vel.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -265,7 +265,7 @@ TEST_CASE("Enable/Disable Octo Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: CalMagnetometer: [uTesla] x: %.2f y: %.2f z: %.2f "
|
"Rx Data Trial %d Success: CalMagnetometer: [uTesla] x: %.2f y: %.2f z: %.2f "
|
||||||
"accuracy: %s ",
|
"accuracy: %s ",
|
||||||
(i + 1), data_magf.x, data_magf.y, data_magf.z, BNO08x::accuracy_to_str(data_magf.accuracy));
|
(i + 1), data_magf.x, data_magf.y, data_magf.z, BNO08xAccuracy_to_str(data_magf.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -276,7 +276,7 @@ TEST_CASE("Enable/Disable Octo Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: RV: [n/a] real: %.2f i: %.2f j: %.2f k: %.2f "
|
"Rx Data Trial %d Success: RV: [n/a] real: %.2f i: %.2f j: %.2f k: %.2f "
|
||||||
"accuracy: %s ",
|
"accuracy: %s ",
|
||||||
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k, BNO08x::accuracy_to_str(data_quat.accuracy));
|
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k, BNO08xAccuracy_to_str(data_quat.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -287,7 +287,7 @@ TEST_CASE("Enable/Disable Octo Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: RV Game: [n/a] real: %.2f i: %.2f j: %.2f k: %.2f "
|
"Rx Data Trial %d Success: RV Game: [n/a] real: %.2f i: %.2f j: %.2f k: %.2f "
|
||||||
"accuracy: %s ",
|
"accuracy: %s ",
|
||||||
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k, BNO08x::accuracy_to_str(data_quat.accuracy));
|
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k, BNO08xAccuracy_to_str(data_quat.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -298,7 +298,7 @@ TEST_CASE("Enable/Disable Octo Report", "[MultiReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: RV Geomagnetic: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
"Rx Data Trial %d Success: RV Geomagnetic: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k, BNO08x::accuracy_to_str(data_quat.accuracy));
|
(i + 1), data_quat.real, data_quat.i, data_quat.j, data_quat.k, BNO08xAccuracy_to_str(data_quat.accuracy));
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ TEST_CASE("Enable Incorrect Report", "[SingleReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"No Rx Data Trial %d Success: LinAccelDefaults: [m/s^2] x: %.2f y: %.2f z: %.2f "
|
"No Rx Data Trial %d Success: LinAccelDefaults: [m/s^2] x: %.2f y: %.2f z: %.2f "
|
||||||
"accuracy: %s ",
|
"accuracy: %s ",
|
||||||
(i + 1), data.x, data.y, data.z, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.x, data.y, data.z, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -96,7 +96,7 @@ TEST_CASE("Enable/Disable Accelerometer", "[SingleReportEnableDisable]")
|
||||||
data = imu->rpt.accelerometer.get();
|
data = imu->rpt.accelerometer.get();
|
||||||
|
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Accel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data.x,
|
||||||
data.y, data.z, BNO08x::accuracy_to_str(data.accuracy));
|
data.y, data.z, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -136,7 +136,7 @@ TEST_CASE("Enable/Disable Linear Accelerometer", "[SingleReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: LinearAccel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
"Rx Data Trial %d Success: LinearAccel: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data.x, data.y, data.z, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.x, data.y, data.z, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -174,7 +174,7 @@ TEST_CASE("Enable/Disable Gravity", "[SingleReportEnableDisable]")
|
||||||
data = imu->rpt.gravity.get();
|
data = imu->rpt.gravity.get();
|
||||||
|
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: Gravity: [m/s^2] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data.x,
|
||||||
data.y, data.z, BNO08x::accuracy_to_str(data.accuracy));
|
data.y, data.z, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -214,7 +214,7 @@ TEST_CASE("Enable/Disable Cal Magnetometer", "[SingleReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: CalMagnetometer: [uTesla] x: %.2f y: %.2f z: %.2f "
|
"Rx Data Trial %d Success: CalMagnetometer: [uTesla] x: %.2f y: %.2f z: %.2f "
|
||||||
"accuracy: %s ",
|
"accuracy: %s ",
|
||||||
(i + 1), data.x, data.y, data.z, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.x, data.y, data.z, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -256,7 +256,7 @@ TEST_CASE("Enable/Disable Uncal Magnetometer", "[SingleReportEnableDisable]")
|
||||||
"Rx Data Trial %d Success: UncalMagnetometer: [uTesla] x: %.2f y: %.2f z: %.2f "
|
"Rx Data Trial %d Success: UncalMagnetometer: [uTesla] x: %.2f y: %.2f z: %.2f "
|
||||||
"x_bias: %.2f y_bias: %.2f z_bias: %.2f accuracy: %s ",
|
"x_bias: %.2f y_bias: %.2f z_bias: %.2f accuracy: %s ",
|
||||||
(i + 1), data_magf.x, data_magf.y, data_magf.z, data_bias.x, data_bias.y, data_bias.z,
|
(i + 1), data_magf.x, data_magf.y, data_magf.z, data_bias.x, data_bias.y, data_bias.z,
|
||||||
BNO08x::accuracy_to_str(data_magf.accuracy));
|
BNO08xAccuracy_to_str(data_magf.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -294,7 +294,7 @@ TEST_CASE("Enable/Disable Cal Gyro", "[SingleReportEnableDisable]")
|
||||||
data = imu->rpt.cal_gyro.get();
|
data = imu->rpt.cal_gyro.get();
|
||||||
|
|
||||||
sprintf(msg_buff, "Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data.x,
|
sprintf(msg_buff, "Rx Data Trial %d Success: CalGyro: [rad/s] x: %.2f y: %.2f z: %.2f accuracy: %s ", (i + 1), data.x,
|
||||||
data.y, data.z, BNO08x::accuracy_to_str(data.accuracy));
|
data.y, data.z, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -336,7 +336,7 @@ TEST_CASE("Enable/Disable Uncal Gyro", "[SingleReportEnableDisable]")
|
||||||
"Rx Data Trial %d Success: UncalGyro: [rad/s] x: %.2f y: %.2f z: %.2f x_bias: %.2f "
|
"Rx Data Trial %d Success: UncalGyro: [rad/s] x: %.2f y: %.2f z: %.2f x_bias: %.2f "
|
||||||
"y_bias: %.2f z_bias: %.2f accuracy: %s ",
|
"y_bias: %.2f z_bias: %.2f accuracy: %s ",
|
||||||
(i + 1), data_vel.x, data_vel.y, data_vel.z, data_bias.x, data_bias.y, data_bias.z,
|
(i + 1), data_vel.x, data_vel.y, data_vel.z, data_bias.x, data_bias.y, data_bias.z,
|
||||||
BNO08x::accuracy_to_str(data_vel.accuracy));
|
BNO08xAccuracy_to_str(data_vel.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -376,7 +376,7 @@ TEST_CASE("Enable/Disable RV", "[SingleReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: RV: [n/a] real: %.2f i: %.2f j: %.2f k: %.2f accuracy: "
|
"Rx Data Trial %d Success: RV: [n/a] real: %.2f i: %.2f j: %.2f k: %.2f accuracy: "
|
||||||
"%s ",
|
"%s ",
|
||||||
(i + 1), data.real, data.i, data.j, data.k, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.real, data.i, data.j, data.k, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -416,7 +416,7 @@ TEST_CASE("Enable/Disable Game RV", "[SingleReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: RV Game: [n/a] real: %.2f i: %.2f j: %.2f k: %.2f "
|
"Rx Data Trial %d Success: RV Game: [n/a] real: %.2f i: %.2f j: %.2f k: %.2f "
|
||||||
"accuracy: %s ",
|
"accuracy: %s ",
|
||||||
(i + 1), data.real, data.i, data.j, data.k, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.real, data.i, data.j, data.k, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -456,7 +456,7 @@ TEST_CASE("Enable/Disable ARVR Stabilized RV", "[SingleReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: RV ARVR Stabilized: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
"Rx Data Trial %d Success: RV ARVR Stabilized: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data.real, data.i, data.j, data.k, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.real, data.i, data.j, data.k, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -496,7 +496,7 @@ TEST_CASE("Enable/Disable ARVR Stabilized Game RV", "[SingleReportEnableDisable]
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: RV ARVR Stabilized Game: [n/a] real: %.2f i: %.2f j: "
|
"Rx Data Trial %d Success: RV ARVR Stabilized Game: [n/a] real: %.2f i: %.2f j: "
|
||||||
"%.2f k: %.2f accuracy: %s ",
|
"%.2f k: %.2f accuracy: %s ",
|
||||||
(i + 1), data.real, data.i, data.j, data.k, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.real, data.i, data.j, data.k, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -536,7 +536,7 @@ TEST_CASE("Enable/Disable Gyro Integrated RV", "[SingleReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: RV Gyro Integrated: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
"Rx Data Trial %d Success: RV Gyro Integrated: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data.real, data.i, data.j, data.k, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.real, data.i, data.j, data.k, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
@ -576,7 +576,7 @@ TEST_CASE("Enable/Disable Geomagnetic RV", "[SingleReportEnableDisable]")
|
||||||
sprintf(msg_buff,
|
sprintf(msg_buff,
|
||||||
"Rx Data Trial %d Success: RV Geomagnetic: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
"Rx Data Trial %d Success: RV Geomagnetic: [n/a] real: %.2f i: %.2f j: %.2f k: "
|
||||||
"%.2f accuracy: %s ",
|
"%.2f accuracy: %s ",
|
||||||
(i + 1), data.real, data.i, data.j, data.k, BNO08x::accuracy_to_str(data.accuracy));
|
(i + 1), data.real, data.i, data.j, data.k, BNO08xAccuracy_to_str(data.accuracy));
|
||||||
|
|
||||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue