variable workspace in object and cog causes crash
glentech
Posts: 35
Can someone give me some idea why this program causes the video driver to crash?· Something I am doing is not right within the object.· I am trying to comunicate variables between cogs within the same object.· There doesn't seem to be much documentation in the manual on this.· I am building a trip computer and want to save the last odometer and fuel reading in the eeprom when the voltage is turned off.·(using a capacitor as the voltage drops)· I am posting my code here.· I am quite sure this is a variable workspace problem.
Comments
Beau, ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot
http://fstop.crosscity.com/
http://icar.crosscity.com/
·
In your main routine, you do a ReadLong(eeprom_addr, position, 16, 8). Are you reading from different locations in EEPROM set by the rotaryef cog? In any event, position doesn't seem to be initialized.
These things are very hard to track down. Sometimes you have to eliminate parts of your program or substitute "fake" or random values for a cog that you've not started just to simplify things. Once you pare it down to a point where it runs again, you start adding back features or cogs until it breaks. Often it's an uninitialized variable or stack overflow or array index overflow.
Good luck
In Tripcomp, I see that "re.start" is indented 2, but the following "repeat" is indented three, then most of the "text" is indented 6, which should be fine, but the "if" following the "text" is only indented 5, which could be a problem.
You might try following an exact indentation policy; it will be more readable, even if it isn't the problem.
David
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
It sounds like we're working on the same type of project....· ;-)
Jim