puuu / ESPiLight

ESPiLight - pilight 433.92 MHz protocols library for Arduino
GNU General Public License v3.0
109 stars 41 forks source link

Support for parsing the specified repeats in stringToPulseTrain #48

Closed melyux closed 3 years ago

melyux commented 3 years ago

I know ESPiLight in stringToPulseTrain means to implement the pulse train string format seen here:

c:102020202020202020220202020020202200202200202020202020220020202203;p:279,2511,1395,9486;r:5@

but it looks like the repeats part (e.g. r:10) is not implemented. Repeats are supported in sendPulseTrain as an argument. When sending raw pulses, one would usually input the string (including the repeats) to stringToPulseTrain, and then feed the resulting codes and length into sendPulseTrain. It would complete the circle if stringToPulseTrain could also report the number of repeats specified.

I'm working on a PR to do this.