<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://iridia.ulb.ac.be/w/index.php?action=history&amp;feed=atom&amp;title=Troubleshooting</id>
	<title>Troubleshooting - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://iridia.ulb.ac.be/w/index.php?action=history&amp;feed=atom&amp;title=Troubleshooting"/>
	<link rel="alternate" type="text/html" href="https://iridia.ulb.ac.be/w/index.php?title=Troubleshooting&amp;action=history"/>
	<updated>2026-04-19T10:40:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://iridia.ulb.ac.be/w/index.php?title=Troubleshooting&amp;diff=5699&amp;oldid=prev</id>
		<title>Manubrambi: New page: The robots have the bad habit of resetting.  Some commands that might be useful (I do not know what they do or if they are useful):   /* to avoid that the math trap causes a reset: */  voi...</title>
		<link rel="alternate" type="text/html" href="https://iridia.ulb.ac.be/w/index.php?title=Troubleshooting&amp;diff=5699&amp;oldid=prev"/>
		<updated>2011-10-20T09:43:23Z</updated>

		<summary type="html">&lt;p&gt;New page: The robots have the bad habit of resetting.  Some commands that might be useful (I do not know what they do or if they are useful):   &lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;to avoid that the math trap causes a reset:: &lt;/span&gt;  voi...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The robots have the bad habit of resetting.&lt;br /&gt;
&lt;br /&gt;
Some commands that might be useful (I do not know what they do or if they are useful):&lt;br /&gt;
&lt;br /&gt;
 /* to avoid that the math trap causes a reset: */&lt;br /&gt;
 void _trapISR_MathError(void)&lt;br /&gt;
 {&lt;br /&gt;
    INTCON1bits.MATHERR = 0;	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Put this at the end of your Init function&lt;br /&gt;
&lt;br /&gt;
 if(RCONbits.POR) {	// reset if power on (some problem for few robots)&lt;br /&gt;
   RCONbits.POR=0;&lt;br /&gt;
   RESET();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, note that the robots do not have a fixed timestep (unlike the footbots). So timesteps can be shorter or longer according to what you are doing. You can use the agenda to overcome this problem, but I don't have any experience with that.&lt;/div&gt;</summary>
		<author><name>Manubrambi</name></author>
	</entry>
</feed>