Skip to content

Commit a79e206

Browse files
committed
chore: update peripheral interface for mt6701 with latest changes after base_peripheral refactor
1 parent e4250f9 commit a79e206

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

main/main.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,15 @@ extern "C" void app_main(void) {
5151
};
5252

5353
// now make the mt6701 which decodes the data
54-
std::shared_ptr<espp::Mt6701> mt6701 = std::make_shared<espp::Mt6701>(espp::Mt6701::Config{
55-
.write = std::bind(&espp::I2c::write, &i2c, std::placeholders::_1, std::placeholders::_2,
56-
std::placeholders::_3),
57-
.read = std::bind(&espp::I2c::read_at_register, &i2c, std::placeholders::_1,
58-
std::placeholders::_2, std::placeholders::_3, std::placeholders::_4),
59-
.velocity_filter = filter_fn,
60-
.update_period = std::chrono::duration<float>(core_update_period),
61-
.log_level = espp::Logger::Verbosity::WARN});
54+
std::shared_ptr<espp::Mt6701> mt6701 = std::make_shared<espp::Mt6701>(
55+
espp::Mt6701::Config{.write = std::bind(&espp::I2c::write, &i2c, std::placeholders::_1,
56+
std::placeholders::_2, std::placeholders::_3),
57+
.read_register = std::bind(&espp::I2c::read_at_register, &i2c,
58+
std::placeholders::_1, std::placeholders::_2,
59+
std::placeholders::_3, std::placeholders::_4),
60+
.velocity_filter = filter_fn,
61+
.update_period = std::chrono::duration<float>(core_update_period),
62+
.log_level = espp::Logger::Verbosity::WARN});
6263

6364
// now make the bldc driver
6465
std::shared_ptr<espp::BldcDriver> driver = std::make_shared<espp::BldcDriver>(

0 commit comments

Comments
 (0)