loading
 
Keboard Module Bug?
Nick Reiser from United States  [7 posts]
10 years
It seems that there might be a bug with the Keyboard module.
Three combinations of keypresses are not setting variables to the value described in keyboard.


This is what the Watch_Variable module shows when I hold down "alt + i", "alt + j", and "alt + k".
As you can see, LEFT_MOTOR and RIGHT_MOTOR aren't set to the values that I specefied in the Keyboard module.


And this is what the Watch_Variable module shows when I hold down "alt + l".
Here, LEFT_MOTOR and RIGHT_MOTOR are set properly.

"alt + u", "alt + a", " alt + 1", and "alt + 2" are all working perfectly.
I had thought that it might just be the key combinations that I had chosen, but replacing the "i, j, k, l" keys with cursor arrows yielded the same bug.

If I had to guess, I'd say that the bug was somewhere in the keydown event handler.
Based upon what I've entered into the Keyboard module, I'm guessing that the last instance of variable mapping for LEFT_MOTOR and RIGHT_MOTOR (alt + l) is overwriting the previous three instances.

Hope this helps.

And thanks for the amazing software!
I'm also having difficulty with the keyboard..
Anonymous
10 years
I have been playing with the keyboard function and haven't been able to get anything to work.  Here is a picture of my setup and the program.  I was trying to get the keys to change any variable.  I made a test variable and it didn't show up on the watch list.  So I made an other_test variable and initialized it using the set command.  It shows up on the watch list but I still can't get a key to change it.  It the keyboard function only applicable to the control modules, or can it be used for other variables, so I can give input to a program?  Come to think of it, the contol module variables don't show ip on my watch list, but I may be missing the ball on how to get that to happen also.

Pete

program.robo
Keyboard Module Fixed
Anonymous
10 years
Hi Guys,

Yes, you're right .. there was a problem with the keyboard module. We've fixed it and tested some of your key combinations above and it seems to work. Can you download RR again and give it a try?

Thanks very much for the bug tips!
STeven.
Still Buggy
Nick Reiser from United States  [7 posts]
10 years
I'm afraid that it's still buggy, for me.
:(

I downloaded version 1.7 (the new version, correct?) and gave the same program a try.
But, the Watch_Variables module still only displays the proper values of RIGHT_MOTOR and LEFT_MOTOR" when I hold down "alt + l".

All other combinations (alt + i, alt + j,  and alt + k) display nothing, as seen here:

I opened up the Options dialog box in this screenshot so you could verify that I have the corrected version of RoboRealm.

Hope this helps.
And, thanks for the speedy reply!
Keys working now
Pete  [6 posts]
10 years
I tested out my test key setup and it ran fine.  It worked on existing variables and will initiate new variable made in the key module.

I recreated Nicks I,J,K,L key setup and it worked on my computer.
I saved it and its at the bottom of this post.

I don't think the version listed in the program has been updated.  The previous version that didn't work was also listed as Ver 1.7, as well as this one that does work.

Thank you for fixing it!
program.robo
Thought!
Pete  [6 posts]
10 years
Nick, it just dawned on me... in order for me to see the variables in the watch window I have to press the keys at least once to have them create themselves.  I don't know if this helps.

Pete
Versioning ..
Anonymous
10 years
Nick, Pete is correct, you will have to press the keys at least once to have the variables created. Also be careful on the usage of "Clear on Release" as using that on the same variable in two keystroke combinations will cause some very strange results. The "Clear on Release" is really meant for a single keystroke to switch "off" when released. If you are using another keystroke to turn it off then these two action will basically cause the variable to never exist. So use one technique or the other.

Also, we've updated the version information. Be sure that the version you are running is at least 1.7.2 You can check the version by clicking on the options dialog (its at the top) or right click in explorer on the .exe file and select the version tab. If it is less than that number check that your browser did not cache the download. You can force the cache to expire by simply adding something like ?1234 to the end of the url. That will cause the browser to redownload the file from the website.

Let me know how it goes!
STeven.
Fixed!
Nick Reiser from United States  [7 posts]
10 years
Thanks, Steven and Pete for the tips!
I'll have to remember that cache tip for when I'm on the college computers.
However, it appears that I do indeed have the newest version (my download manager took care of dumping the cashe).

As it turns out, it was exactly like you said, STeve.
I was using "Clear On Release" with all of the buggy variables.
I fixed it by employing simple boolean variables for the four directions.
I like the new way better, anyhow, since I can concatenate them into a single byte, which is always nice with serial transactions.
I'll just reformat incoming data on the microcontroller side to adapt to the different variables.

Thanks again!

-Nick-

P.S.  Here's my current program for any others who run into the same kind of troubles.
I didn't do any of the camera processing or autonomous serial transaction, yet, but it does show how I rearanged things in the Keyboard module.

program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index