Sensirion / arduino-core

Shared core for Sensirions Arduino libraries
BSD 3-Clause "New" or "Revised" License
9 stars 12 forks source link

SensirionShdlcTxFrame: In begin() why is _index not set to 0? #9

Open Guswib opened 1 week ago

Guswib commented 1 week ago

Is there a reason why ìn the class SensirionShdlcTxFrame, the begin() function does not set the _index variable to 0?

As the _index is only set to 0 when the SensirionShdlcTxFrame is initialized and is private, it is not possible to make SensirionShdlcTxFrame global and reusable, which means I have to create new instantce everytime I want to use SensirionShdlcTxFrame. As the protocol only seem to allow one frame at the time to be sent, I dont see the reason why begin does not set _index to 0 in the begin function.