cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.69k stars 397 forks source link

First pass at adapting T-Beam to AXP2101 #991

Closed dirkbeer closed 2 weeks ago

dirkbeer commented 8 months ago

I'm not a programmer, but this does get the T-Beam with the new AXP2101 working. It senses devices and successfully uplinks packets to Helium. There are probably some functions that are not yet working correctly.

cyberman54 commented 8 months ago

@dirkbeer Thanks for the PR! With this changes the AXP192 won't be supported any more. That's not what we want to achieve, we want backward compatibility. We need a device agnostic approach, e.g. detect chip at first, then select appropriate chip driver.

dirkbeer commented 8 months ago

Understood. If I find some time, I'll work on a better implementation.

TD-er commented 2 weeks ago

@cyberman54 I do have boards with the AXP2101 and the previous AXP192.

Not sure yet if we can detect it properly at boot, but would it also be OK if we added a new board definition for the 1.2 revision? Then the defines can be set to either add code for the AXP192 or the AXP2101.

cyberman54 commented 2 weeks ago

Sure! You're welcome to create a PR on this. I assume chiptype should be identifyable by the used Xpowers library.

TD-er commented 2 weeks ago

I will look into this, but I will create my own PR for it, so you can keep this one closed I guess :)

Also I am struggling with the AXP192 on the T-beam 1.0, but will open another issue about it.