You're right, 640ms waiting for a quad would be disastrous! Needless to say, our quad isn't flying just yet.
I didn't realise that serial output ended up on the same IO Event queue, but that makes more sense as to why the queue was full. Is the waiting for space in the queue that occurs the following loop in jsdevices.c? If so does that work because there is an interrupt consuming characters from the queue and sending them over the wire?
while (txHeadNext==txTail) {
// wait for send to finish as buffer is about to overflow
}
By the way, the equation you gave was 20*32 = 640ms. Does that imply that the maximum io event queue size is 32 on an Espruino?
I'll try all of the suggestions you made, thanks. I'm a little scared because we have two I2C devices to attach on top of what we have there now. I think we'll get it flying, though I expect it to be a little clunky and unresponsive.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Cheers Gordon,
You're right, 640ms waiting for a quad would be disastrous! Needless to say, our quad isn't flying just yet.
I didn't realise that serial output ended up on the same IO Event queue, but that makes more sense as to why the queue was full. Is the waiting for space in the queue that occurs the following loop in jsdevices.c? If so does that work because there is an interrupt consuming characters from the queue and sending them over the wire?
By the way, the equation you gave was 20*32 = 640ms. Does that imply that the maximum io event queue size is 32 on an Espruino?
I'll try all of the suggestions you made, thanks. I'm a little scared because we have two I2C devices to attach on top of what we have there now. I think we'll get it flying, though I expect it to be a little clunky and unresponsive.
Cheers for your help!
Cam