@@ -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 }
@@ -712,7 +712,7 @@ class Bmi270 : public espp::BasePeripheral<uint8_t, Interface == bmi270::Interfa
712712 // Member variables
713713 filter_fn orientation_filter_{nullptr };
714714 ImuConfig imu_config_{};
715- uint16_t burst_write_size_{128 };
715+ uint16_t burst_write_size_{0 };
716716 Value accel_values_{};
717717 Value gyro_values_{};
718718 float temperature_{0 .0f };
0 commit comments