slow keyboard response
krazyideas
Posts: 119
I am using the keyboard to tweak things in my progam but the keyboard respons slowly??
How could I speed it up.
I am calling the newkey object from the keyboard program in the library.
Thanks
·
How could I speed it up.
I am calling the newkey object from the keyboard program in the library.
Thanks
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1011, so be surprised!
Advertisement sponsored by dfletch:
Come and join us on the Propeller IRC channel for fast and easy help!
Channel: #propeller
Server: irc.freenode.net or freenode.net
If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
If your program takes a while to get back to the newkey routine, that would be the limiting factor since the keyboard driver can't save up typed characters (since newkey clears them out).
Post Edited (Mike Green) : 10/12/2008 1:05:53 AM GMT
But here it is
Thanks
CON
······· _clkmode······· = xtal1 + pll16x
······· _xinfreq······· = 5_000_000
OBJ
······· term··· : "tv_terminal"
······· kb····· : "keyboard"
VAR
··· long fire1
··· long fire2
··· long fire3
··· long fire4
··· long fire5
··· long fire6
··· long win1
··· long win2
··· long win3
··· long win4
··· long win5
··· long win6
···
··· long degree
···
PUB Windows
··· degree := 10
··· fire1 := 100
··· fire2 := 200
··· fire3 := 300
··· fire4 := 400
··· fire5 := 500
··· fire6 := 600
··· win1 := 100
··· win2 := 200
··· win3 := 300
··· win4 := 400
··· win5 := 500
··· win6 := 600
· term.start(12)
· term.str(string("START FIREING WINDOWS",13))
· kb.start(26,27)
··· repeat
····· if kb.newkey···· == "q"
········· fire1 := fire1 + degree
····· elseif kb.newkey == "Q"
········· fire1 := fire1 - degree
····· elseif kb.newkey == "w"
········· fire2 := fire2 + degree
····· elseif kb.newkey == "W"
········· fire2 := fire2 - degree
·········
····· elseif kb.newkey == "e"
········· fire3 := fire3 + degree
····· elseif kb.newkey == "E"
········· fire3 := fire3 - degree
····· elseif kb.newkey == "r"
········· fire4 := fire4 + degree
····· elseif kb.newkey == "R"
········· fire4 := fire4 - degree
····· elseif kb.newkey == "t"
········· fire5 := fire5 + degree
····· elseif kb.newkey == "T"
········· fire5 := fire5 - degree
····· elseif kb.newkey == "y"
········· fire6 := fire6 + degree
····· elseif kb.newkey == "Y"
········· fire6 := fire6 - degree
····· if kb.newkey···· == "z"
········· win1 := win1 + degree
····· elseif kb.newkey == "Z"
········· win1 := win1 - degree
····· elseif kb.newkey == "x"
········· win2 := win2 + degree
····· elseif kb.newkey == "X"
········· win2 := win2 - degree
·········
····· elseif kb.newkey == "c"
········· win3 := win3 + degree
····· elseif kb.newkey == "C"
········· win3 := win3 - degree
····· elseif kb.newkey == "v"
········· win4 := win4 + degree
····· elseif kb.newkey == "V"
········· win4 := win4 - degree
····· elseif kb.newkey == "b"
········· win5 := win5 + degree
····· elseif kb.newkey == "B"
········· win5 := win5 - degree
····· elseif kb.newkey == "n"
········· win6 := win6 + degree
····· elseif kb.newkey == "N"
········· win6 := win6 - degree···················
·····
····· term.dec (fire1)
····· term.str(string("·· "))
····· term.dec (fire2)
····· term.str(string("·· "))
····· term.dec (fire3)
····· term.str(string("·· "))
····· term.dec (fire4)
····· term.str(string("·· "))
····· term.dec (fire5)
····· term.str(string("·· "))
····· term.dec (fire6)
····· term.str(string(" ",13))
····· term.str(string(" ",13))
····· term.dec (win1)
····· term.str(string("·· "))
····· term.dec (win2)
····· term.str(string("·· "))
····· term.dec (win3)
····· term.str(string("·· "))
····· term.dec (win4)
····· term.str(string("·· "))
····· term.dec (win5)
····· term.str(string("·· "))
····· term.dec (win6)
····· term.str(string(" ",13))
····· term.str(string(" ",13))
····· term.str(string(" ",13))
····· term.str(string(" ",13))
····· term.str(string(" ",13))