By using the timestamp capture that the ICP1 pin provides, it would be possible to auto-adjust the timing of the IR receive ISR in order to automagically read in the data in the exact middle of the waveform.
[x] The Timer1 ISR has to be adjusted to: OCR1A top, COMP1B_vect, so that ICR1 can still be used.
[x] The INPUT_CAPTURE1_vect ISR has to be added
[x] The state-machine has to be modified to remove the in-software waveform adjustment, and instead utilise the capture ISR for this.
@A-Bielefeld, I'm adding you to this so you can tag along with how these things get done >:D
Whelp, for now the code was moved to the LZRTag project exclusively, so it sort-of is closed ...
But an overhaul of this one here is presumably a good idea too.
By using the timestamp capture that the ICP1 pin provides, it would be possible to auto-adjust the timing of the IR receive ISR in order to automagically read in the data in the exact middle of the waveform.
@A-Bielefeld, I'm adding you to this so you can tag along with how these things get done >:D