Files
esphome-lsm6ds/esphome/components
356efdb92c Add support for multiple devices in bme680_bsec (#3550)
* Add initial support for multiple devices

Re-introduce support for multiple I2C devices (it was suppressed in https://github.com/trvrnrth/esphome-bsec-bme680/commit/df37a7635f6acc3f7520f257d2645eda10b863a5). Devices are identified by their I2C address, and the BME680 can only have the 0x76 or 0x77 address, so this adds support for a maximum of two devices.

* Reintegrate commit ebf13a0b

Reintegrate commit https://github.com/esphome/esphome/commit/ebf13a0ba0a48453c2cc80bfc942d6a588859233 which was lost in my changes (I were working on old files)

* wrong commit

* wrong commit

* Reintegrate commit ebf13a0b

Reintegrate commit https://github.com/esphome/esphome/commit/ebf13a0ba0a48453c2cc80bfc942d6a588859233 which was lost due to me working on old files

* Reintroduce newlines at end of files

* Reintroduce newlines at end of files

* Adhere to codebase standards

Obey the "All uses of class members and member functions should be prefixed with this-> to distinguish them from global functions in code review" rule of the Codebase Standards

* Fix formatting according to clang-format

* Perform the BSEC library reinitialization+snapshot only when more than one device is present

* Fix formatting according to clang-format

* Degrade abort message in restore_state_() from warning to verbose

This always happen at initial setup, so it's not a really useful message; when some real problems arise, we'll have a more useful warning from snapshot_state_()

Co-authored-by: Trevor North <trevor@freedisc.co.uk>

* Reduce peak stack usage to avoid bootloops on ESP8266

Achieved mainly by moving the work_buffer needed by the BSEC library to the heap, as a single global work buffer shared by all instances.
::set_config_ has been reverted to a code path similar to the original, as that reduces peak stack usage enough to be OK on ESP8266 even without moving the work_buffer to the heap.

* Fix formatting according to clang-format

* Add support for devices with the same i2c address

Devices are now identified using their index in the BME680BSECComponent::instances member, which became a vector. This allows adding two devices with the same i2c address (which should be placed on different i2c buses). Since a BME680 can only have an address of 0x76 or 0x77, a maximum of 2 devices could be added before this commit. Now there is no theoretical limit on the number of devices which could be added.

* Fix formatting according to clang-format

* Fix formatting according to clang-format

---------

Co-authored-by: Trevor North <trevor@freedisc.co.uk>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-07 07:15:40 +00:00
..
2022-11-24 13:12:55 +13:00
2023-01-26 17:20:45 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2023-01-17 10:36:44 +13:00
2022-08-11 13:57:42 +12:00
2023-01-18 10:42:43 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2023-03-07 04:25:14 +00:00
2022-12-06 23:25:19 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2023-02-23 02:05:33 +00:00
2022-11-24 13:12:55 +13:00
2023-01-18 10:42:47 +13:00
2023-02-23 01:31:35 +00:00
2022-11-24 13:12:55 +13:00
2023-02-09 07:30:00 +13:00
2023-02-13 15:53:40 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-01-08 21:35:55 +13:00
2023-02-09 10:25:44 +13:00
2021-09-09 09:10:02 +12:00
2022-11-24 13:12:55 +13:00
2022-02-21 12:23:26 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-12-22 18:39:25 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-01-04 10:35:15 +13:00
2022-11-24 13:12:55 +13:00
2023-02-23 17:38:34 +00:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2023-03-05 18:45:54 +00:00
2022-11-24 13:12:55 +13:00
2021-07-29 19:11:56 +02:00
2021-09-26 21:34:06 +13:00
2021-09-26 21:34:06 +13:00
2021-09-26 21:34:06 +13:00
2022-11-24 13:12:55 +13:00
2022-06-07 22:43:46 +12:00
2022-11-24 13:12:55 +13:00
2022-10-05 20:09:27 +13:00
2022-09-06 12:57:21 +12:00
2022-04-13 10:19:48 +12:00
2022-05-19 12:47:33 +12:00
2023-02-03 07:53:46 +13:00
2022-10-28 12:33:15 +13:00
2023-02-22 01:47:50 +00:00
2022-04-26 09:50:36 +12:00
2022-04-13 10:19:48 +12:00
2022-11-24 13:12:55 +13:00
2023-01-18 10:43:16 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2023-01-18 10:17:31 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-11-24 13:12:55 +13:00
2022-09-14 16:51:20 +12:00
2023-02-07 12:17:17 +13:00
2023-02-22 23:40:20 +00:00
2022-10-19 13:44:26 +13:00
2022-11-24 13:12:55 +13:00