diff --git a/include/BNO08x.hpp b/include/BNO08x.hpp index 5b2cd46..96da1c7 100644 --- a/include/BNO08x.hpp +++ b/include/BNO08x.hpp @@ -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); diff --git a/include/BNO08xTestHelper.hpp b/include/BNO08xTestHelper.hpp index 8f728ff..9d6ceeb 100644 --- a/include/BNO08xTestHelper.hpp +++ b/include/BNO08xTestHelper.hpp @@ -661,7 +661,7 @@ class BNO08xTestHelper case Stability::UNDEFINED: return "UNDEFINED"; default: - return "INVALID"; + return "INVALID"; } } diff --git a/include/BNO08x_global_types.hpp b/include/BNO08x_global_types.hpp index 6bda742..86c5fe2 100644 --- a/include/BNO08x_global_types.hpp +++ b/include/BNO08x_global_types.hpp @@ -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), diff --git a/source/BNO08x.cpp b/source/BNO08x.cpp index 8b43499..a873471 100644 --- a/source/BNO08x.cpp +++ b/source/BNO08x.cpp @@ -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, diff --git a/test/InitDeinitTests.cpp b/test/InitDeinitTests.cpp index 4f3c092..2c73a5f 100644 --- a/test/InitDeinitTests.cpp +++ b/test/InitDeinitTests.cpp @@ -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()); diff --git a/test/SingleReportTests.cpp b/test/SingleReportTests.cpp index f409e4d..97d8fc1 100644 --- a/test/SingleReportTests.cpp +++ b/test/SingleReportTests.cpp @@ -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);