Puck.js can't send more than 4 IR signals #7774
-
I tried the IR tutorial https://www.espruino.com/Puck.js+Infrared And got my code with 135 array elements, the Puck seems to hang and after 1 min i quit with CTRL C So i wrote an loop and i can't get above 4 Array Elements. PUCKJS, 2v26 const irlen = [];
for (i = 0; i < 20; i++) {
const dtstart = Date().ms;
irlen.push(0.5);
Puck.IR(irlen);
console.log(`IR ${irlen.length} took ${Date().ms-dtstart}`);
/*
IR 1 took 1.89208984375
IR 2 took 1.80053710937
IR 3 took 1.80053710937
IR 4 took 1.8310546875
Prompt not detected - upload failed. Trying to recover...
Uncaught InternalError: Timeout on Utility Timer
at line 32 col 16
Puck.IR(irlen);
^
Execution Interrupted
*/
} Restart has no effect, any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sorry about this, I've just looked into it. For 2v26 some changes were contributed that were supposed to improve the timer accuracy, but they appear to have broken the IR transmission. If you install firmware 2v25, 2v27 when I release it (which will be soon I imagine), or the latest cutting edge build it should now be fixed:
You might expect to see 10ms + delay for |
Beta Was this translation helpful? Give feedback.
Sorry about this, I've just looked into it.
For 2v26 some changes were contributed that were supposed to improve the timer accuracy, but they appear to have broken the IR transmission.
If you install firmware 2v25, 2v27 when I release it (which will be soon I imagine), or the latest cutting edge build it should now be fixed: