Skip to content

Commit 8db49be

Browse files
committed
fix: change default burst size to 0
1 parent 9acdfb3 commit 8db49be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/bmi270/include/bmi270.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Bmi270 : public espp::BasePeripheral<uint8_t, Interface == bmi270::Interfa
8989
* @brief Maximum number of bytes to write in a single burst during config upload.
9090
* Default is 128 bytes. Decrease this if you encounter stack overflow.
9191
*/
92-
uint16_t burst_write_size = 128;
92+
uint16_t burst_write_size = 0;
9393
bool auto_init{true}; ///< Automatically initialize the BMI270
9494
Logger::Verbosity log_level{Logger::Verbosity::WARN}; ///< Log level
9595
};
@@ -100,7 +100,7 @@ class Bmi270 : public espp::BasePeripheral<uint8_t, Interface == bmi270::Interfa
100100
: BasePeripheral<uint8_t, Interface == bmi270::Interface::I2C>({}, "Bmi270", config.log_level)
101101
, orientation_filter_(config.orientation_filter)
102102
, imu_config_(config.imu_config)
103-
, burst_write_size_(config.burst_write_size) {
103+
, burst_write_size_(config.burst_write_size == 0 ? config_file_size : config.burst_write_size) {
104104
if constexpr (Interface == bmi270::Interface::I2C) {
105105
set_address(config.device_address);
106106
}

0 commit comments

Comments
 (0)