Oldbitcollector (Jeff)
09-16-2007, 03:47 AM
I'm writing a communication routine that checks for data from both the propeller keyboard as well as a remote source.
Here's a snippet from the routine.
PRI getline | i, c ,a,d,e
i := 0
repeat
c := key.getkey
e := ser.rx
text.out(e)
When the code hits e:=ser.tx it freezes, I assume waiting for something to actually come back
from the remote source. Can someone show me a way to make it behave more like the key.getkey function
so that it doesn't care if nothing is there or not and keeps on going? I'm running this in a loop, so it will
have a chance to check again in a few milseconds.
Thanks!
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Cavin and Hobbes.
Here's a snippet from the routine.
PRI getline | i, c ,a,d,e
i := 0
repeat
c := key.getkey
e := ser.rx
text.out(e)
When the code hits e:=ser.tx it freezes, I assume waiting for something to actually come back
from the remote source. Can someone show me a way to make it behave more like the key.getkey function
so that it doesn't care if nothing is there or not and keeps on going? I'm running this in a loop, so it will
have a chance to check again in a few milseconds.
Thanks!
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Cavin and Hobbes.