|
Page 1 of 1
|
[ 7 posts ] |
|
See all variables without being global?
| Author |
Message |
|
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 509 Location: Totally not spying on Hassenplug to see what he has for the Brickworld Chicago 2013 sumo contest.
|
 See all variables without being global?
I wanna see the status of all my variables without them being global!! Is this still possible?
_________________A.K.A. inxt-generation Self-proclaimed genius, and future world dominator. My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth Doctor Bow down to Nikola Tesla, King of the Geek Gods.
|
| Sat Sep 15, 2012 6:22 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: See all variables without being global?
In the new 3.50, it is possible to see the local variables, too. They're in a different window, though.
- Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sun Sep 16, 2012 12:00 am |
|
 |
|
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 509 Location: Totally not spying on Hassenplug to see what he has for the Brickworld Chicago 2013 sumo contest.
|
 Re: See all variables without being global?
Yeah, but only if you pause code execution. Which is bad for me.
_________________A.K.A. inxt-generation Self-proclaimed genius, and future world dominator. My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth Doctor Bow down to Nikola Tesla, King of the Geek Gods.
|
| Sun Sep 16, 2012 9:03 am |
|
 |
|
Spiked3
Expert
Joined: Tue Feb 28, 2012 3:10 pm Posts: 195
|
 Re: See all variables without being global?
You could use some sort of real time data plotter with XBees If only someone would help you out, and get you a set of XBees By the way, How's the XBee project coming?
_________________Mike aka Spiked3 http://www.spiked3.com
|
| Sun Sep 16, 2012 12:19 pm |
|
 |
|
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 509 Location: Totally not spying on Hassenplug to see what he has for the Brickworld Chicago 2013 sumo contest.
|
 Re: See all variables without being global?
Somewhat. I'm still trying to get through C#, and then I've gotta get a handle on Java to convert the code. This, combined with life, school, my other robots and Civ make for slow progress on everything. But I haven't stopped working on it! I'll get there. In time.
_________________A.K.A. inxt-generation Self-proclaimed genius, and future world dominator. My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth Doctor Bow down to Nikola Tesla, King of the Geek Gods.
|
| Sun Sep 16, 2012 2:34 pm |
|
 |
|
Spiked3
Expert
Joined: Tue Feb 28, 2012 3:10 pm Posts: 195
|
 Re: See all variables without being global?
Just saying, this is a good application, and I know someone who has working code The first time I did the line follower I used a non real-time version to log data, and it helped a lot in tuning the PID. I plan on using the latest (real-time) version again with the light sensor array once I get a IMU I can depend on working (real soon now™).
_________________Mike aka Spiked3 http://www.spiked3.com
|
| Sun Sep 16, 2012 4:15 pm |
|
 |
|
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 537
|
 Re: See all variables without being global?
In ROBOTC 3.50 and above, there is a new debugger window called "Local Variables". There are two windows now for variables: 1. Global Variables - Displays all variables declared outside of any procedure or task. 2. Local Variables - Displays all variable in the currently selected function when the debugger has the program suspended. The reason why the Local Variables is not able to display the variables during execution is that for each function calls the variables are released from the stack and ROBOTC can't keep track of which variables are associated to the stack memory addresses between function calls. This is similar to most modern IDE's (such as Visual Studio) that cannot display variables unless the program is currently suspended via a breakpoint or Step command which only show the variables in the current procedure or function. Global variables do not have this issue as they are assigned a fixed memory address at compile time. If you need a "live update" of local values, I would recommend looking at using the "WriteDebugStream" commands and watching the Debug Stream debugger window which will give you a "printf" style printing capability to a terminal like window. To learn more, take a look at http://www.robotc.net/wiki/Debug_Stream
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
| Sat Sep 22, 2012 8:22 pm |
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 3 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|