klipper
klipper copied to clipboard
Add a BME280 report time config option to reduce mcu load
module: BME280, add bme280_report_time option
Having hooked up 2 BME280 chips on two i2c busses of the same RPI, I see a high "MCU RPI Load" utilization Looking at the code it reported every .8 seconds. I do not need the sensors to be this precise and tested reporting every 30 seconds instead which brings down the MCU load significantly but with a burst every 30 seconds
This PR is to add an option to specify a custom report time similar to the one in the LM75 temperature sensor The previous REPORT_TIME if the BME280 was used as a default/minimum value. This change reads the report time value from a bme280_report_time option in the config files
Signed-off-by: Sylvain Dansereau [email protected]
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html
There are some steps that you can take now:
- Perform a self-review of your Pull Request by following the steps at: https://www.klipper3d.org/CONTRIBUTING.html#what-to-expect-in-a-review If you have completed a self-review, be sure to state the results of that self-review explicitly in the Pull Request comments. A reviewer is more likely to participate if the bulk of a review has already been completed.
- Consider opening a topic on the Klipper Discourse server to discuss this work. The Discourse server is a good place to discuss development ideas and to engage users interested in testing. Reviewers are more likely to prioritize Pull Requests with an active community of users.
- Consider helping out reviewers by reviewing other Klipper Pull Requests. Taking the time to perform a careful and detailed review of others work is appreciated. Regular contributors are more likely to prioritize the contributions of other regular contributors.
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.
Best regards, ~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
Thanks. I'm not sure what real world tasks can be accomplished with this new config option? I regularly receive feedback that the printer config file is daunting to users and I'd prefer not to add more options unless there is a well understood requirement for it.
A high "MCU RPI Load" does not, in and of itself, indicate a problem. The statistic is a heuristic based on scheduling jitter of "low priority tasks" in the micro-controller. Sporadic i2c requests will naturally increase the scheduling jitter, but that does not indicate a problem.
Cheers, -Kevin
Thanks for looking into this.
I agree that complicated options can be make some users reluctant to use a product but I can't imagine someone not understanding the description of this new option.
I can't argue if the mcu load calculation results is a real problem or not because I don't understand how it is calculated. I will however say that every time I see a load over 100% it makes me feel like something is overloaded and could be the source of any other problem I might be having at the time. Keeping the load under control sort of removes the "Red Flag" effect.
Also, I am planning to add one of those sensors on a canbus board and I wonder how much of an effect it will have on the canbus traffic. for now I can't get the chip working and I think it's because i2c.c does not allow to use the PB3 PB4 pins of the I2C on the BTT EBB36 V1.2 board.
I am planning to add one of those sensors on a canbus board and I wonder how much of an effect it will have on the canbus traffic. for now I can't get the chip working and I think it's because i2c.c does not allow to use the PB3 PB4 pins of the I2C on the BTT EBB36 V1.2 board.
FWIW, the sensor works just fine and without any issues over CAN, have a look here: https://github.com/Klipper3d/klipper/pull/5733#issuecomment-1241411851
Unfortunately a reviewer has not assigned themselves to this GitHub Pull Request and it is therefore being closed. It is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.
Best regards, ~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.