formatting, name change ActivityClassifierEnable -> ActivityEnable
This commit is contained in:
parent
6e8b983f59
commit
acb7372699
|
|
@ -69,7 +69,7 @@ class BNO08x
|
|||
void enable_tap_detector(uint32_t time_between_reports);
|
||||
void enable_step_counter(uint32_t time_between_reports);
|
||||
void enable_stability_classifier(uint32_t time_between_reports);
|
||||
void enable_activity_classifier(uint32_t time_between_reports, ActivityClassifierEnable activities_to_enable, uint8_t (&activity_confidence_vals)[9]);
|
||||
void enable_activity_classifier(uint32_t time_between_reports, ActivityEnable activities_to_enable, uint8_t (&activity_confidence_vals)[9]);
|
||||
void enable_raw_mems_gyro(uint32_t time_between_reports);
|
||||
void enable_raw_mems_accelerometer(uint32_t time_between_reports);
|
||||
void enable_raw_mems_magnetometer(uint32_t time_between_reports);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ enum class BNO08xResetReason
|
|||
using IMUResetReason = BNO08xResetReason; // legacy version compatibility
|
||||
|
||||
/// @brief Activity Classifier enable bits passed to enable_activity_classifier()
|
||||
enum class ActivityClassifierEnable
|
||||
enum class ActivityEnable
|
||||
{
|
||||
UNKNOWN = (1U << 0U),
|
||||
IN_VEHICLE = (1U << 1U),
|
||||
|
|
|
|||
|
|
@ -2173,8 +2173,7 @@ void BNO08x::enable_stability_classifier(uint32_t time_between_reports)
|
|||
* @param activity_confidence_vals Returned activity level confidences.
|
||||
* @return void, nothing to return
|
||||
*/
|
||||
void BNO08x::enable_activity_classifier(
|
||||
uint32_t time_between_reports, ActivityClassifierEnable activities_to_enable, uint8_t (&activity_confidence_vals)[9])
|
||||
void BNO08x::enable_activity_classifier(uint32_t time_between_reports, ActivityEnable activities_to_enable, uint8_t (&activity_confidence_vals)[9])
|
||||
{
|
||||
activity_confidences = activity_confidence_vals; // Store pointer to array
|
||||
enable_report(SENSOR_REPORT_ID_PERSONAL_ACTIVITY_CLASSIFIER, time_between_reports, EVT_GRP_RPT_ACTIVITY_CLASSIFIER_BIT,
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ TEST_CASE("Init & Deinit", "[InitDenit]")
|
|||
BNO08xTestHelper::print_test_msg(TEST_TAG, "Success, deinitializing BNO08x Driver Object.");
|
||||
BNO08xTestHelper::destroy_test_imu();
|
||||
|
||||
BNO08xTestHelper::print_test_msg(TEST_TAG, "Initializing BNO08x Driver Object attempt 2.");
|
||||
BNO08xTestHelper::print_test_msg(TEST_TAG, "Initializing BNO08x Driver Object attempt 2.");
|
||||
BNO08xTestHelper::create_test_imu();
|
||||
imu = BNO08xTestHelper::get_test_imu();
|
||||
TEST_ASSERT_EQUAL(true, imu->initialize());
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,8 @@ TEST_CASE("Enable/Disable Stability Classifier", "[SingleReportEnableDisable]")
|
|||
// assert that new data from respective report has been received
|
||||
TEST_ASSERT_EQUAL(true, new_data);
|
||||
|
||||
sprintf(msg_buff, "Rx Data Trial %d Success: StabilityClassifier: %s", (i + 1), BNO08xTestHelper::BNO08xStability_to_str(report_data.stability_classifier));
|
||||
sprintf(msg_buff, "Rx Data Trial %d Success: StabilityClassifier: %s", (i + 1),
|
||||
BNO08xTestHelper::BNO08xStability_to_str(report_data.stability_classifier));
|
||||
|
||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||
|
||||
|
|
@ -1180,7 +1181,8 @@ TEST_CASE("Enable/Disable Stability Classifier", "[SingleReportEnableDisable]")
|
|||
// assert that no new data from respective report has been received
|
||||
TEST_ASSERT_NOT_EQUAL(true, new_data);
|
||||
|
||||
sprintf(msg_buff, "No Rx Data Trial %d Success: StabilityClassifierDefault: %s", (i + 1), BNO08xTestHelper::BNO08xStability_to_str(report_data.stability_classifier));
|
||||
sprintf(msg_buff, "No Rx Data Trial %d Success: StabilityClassifierDefault: %s", (i + 1),
|
||||
BNO08xTestHelper::BNO08xStability_to_str(report_data.stability_classifier));
|
||||
|
||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||
|
||||
|
|
@ -1214,7 +1216,7 @@ TEST_CASE("Enable/Disable Activity Classifier", "[SingleReportEnableDisable]")
|
|||
|
||||
BNO08xTestHelper::print_test_msg(TEST_TAG, "Report enabled testing phase started.");
|
||||
/*enable respective report to test and ensure it reports new data */
|
||||
imu->enable_activity_classifier(5*REPORT_PERIOD, ActivityClassifierEnable::ALL, activity_confidence_vals);
|
||||
imu->enable_activity_classifier(5 * REPORT_PERIOD, ActivityEnable::ALL, activity_confidence_vals);
|
||||
|
||||
for (int i = 0; i < RX_REPORT_TRIAL_CNT; i++)
|
||||
{
|
||||
|
|
@ -1232,7 +1234,8 @@ TEST_CASE("Enable/Disable Activity Classifier", "[SingleReportEnableDisable]")
|
|||
// assert that new data from respective report has been received
|
||||
TEST_ASSERT_EQUAL(true, new_data);
|
||||
|
||||
sprintf(msg_buff, "Rx Data Trial %d Success: ActivityClassifier: %s", (i + 1), BNO08xTestHelper::BNO08xActivity_to_str(report_data.activity_classifier));
|
||||
sprintf(msg_buff, "Rx Data Trial %d Success: ActivityClassifier: %s", (i + 1),
|
||||
BNO08xTestHelper::BNO08xActivity_to_str(report_data.activity_classifier));
|
||||
|
||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||
|
||||
|
|
@ -1262,7 +1265,8 @@ TEST_CASE("Enable/Disable Activity Classifier", "[SingleReportEnableDisable]")
|
|||
// assert that no new data from respective report has been received
|
||||
TEST_ASSERT_NOT_EQUAL(true, new_data);
|
||||
|
||||
sprintf(msg_buff, "No Rx Data Trial %d Success: ActivityClassifierDefault: %s", (i + 1), BNO08xTestHelper::BNO08xActivity_to_str(report_data.activity_classifier));
|
||||
sprintf(msg_buff, "No Rx Data Trial %d Success: ActivityClassifierDefault: %s", (i + 1),
|
||||
BNO08xTestHelper::BNO08xActivity_to_str(report_data.activity_classifier));
|
||||
|
||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue