diff --git a/src/unit/unit_VL53L0X.cpp b/src/unit/unit_VL53L0X.cpp index ff25b86..fa9f01c 100644 --- a/src/unit/unit_VL53L0X.cpp +++ b/src/unit/unit_VL53L0X.cpp @@ -55,12 +55,12 @@ constexpr uint8_t pre_msrc_timeout_macrop_tabke[] = {0x2B, 0x25, 0x20, 0x1C}; struct final_values_t { uint8_t phase_hi, phase_low, vcsel, phassecal_timout, phasecal_limit; }; -constexpr final_values_t final_values_table[] = {{0x10, 0x08, 0x02, 0x0C, 0x30}, - {0x28, 0x08, 0x03, 0x09, 0x20}, - {0x38, 0x08, 0x03, 0x08, 0x20}, - {0x48, 0x08, 0x03, 0x07, 0x20} -}; +constexpr final_values_t final_values_table[] = {{0x10, 0x08, 0x02, 0x0C, 0x30}, + {0x28, 0x08, 0x03, 0x09, 0x20}, + {0x38, 0x08, 0x03, 0x08, 0x20}, + {0x48, 0x08, 0x03, 0x07, 0x20}}; + constexpr uint16_t pre_and_final_timeout_macop_table[4][4] = {{0x02B0, 0x0296, 0x0284, 0x01EF}, {0x02AA, 0x028F, 0x01FE, 0x01E3}, {0x02A6, 0x028B, 0x01F2, 0x01D9}, @@ -306,7 +306,6 @@ bool UnitVL53L0X::writeSignalRateLimit(const float mcps) bool UnitVL53L0X::writeMode(const vl53l0x::Mode mode) { - /* if (_mode == mode) { return true; @@ -433,7 +432,7 @@ bool UnitVL53L0X::write_vcsel_period_range(const uint8_t pre_pclk, const uint8_t bool UnitVL53L0X::softReset() { if (soft_reset()) { - _mode = Mode::Unknown; + _mode = Mode::Unknown; _periodic = false; return begin(); } diff --git a/test/embedded/test_vl53l0x/vl53l0x_test.cpp b/test/embedded/test_vl53l0x/vl53l0x_test.cpp index 2fb0582..f0146f4 100644 --- a/test/embedded/test_vl53l0x/vl53l0x_test.cpp +++ b/test/embedded/test_vl53l0x/vl53l0x_test.cpp @@ -78,8 +78,7 @@ TEST_P(TestVL53L0X, SignalRateLimitAndReset) EXPECT_TRUE(unit->softReset()); EXPECT_TRUE(unit->readSignalRateLimit(tmp)); - EXPECT_NEAR(tmp, 0.25f, 0.0075f); // default - + EXPECT_NEAR(tmp, 0.25f, 0.0075f); // default } TEST_P(TestVL53L0X, Singleshot)