workaround to survive the bad characters that are sometimes printed by mspsim-based motes + make clean before compilation

This commit is contained in:
fros4943 2010-03-29 14:14:09 +00:00
parent 6460bc1214
commit bb7944a201

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<simconf> <simconf>
<project>[CONTIKI_DIR]/tools/cooja/apps/mrm</project> <project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
<project>[CONTIKI_DIR]/tools/cooja/apps/mspsim</project> <project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
<project>[CONTIKI_DIR]/tools/cooja/apps/avrora</project> <project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
<project>[CONTIKI_DIR]/tools/cooja/apps/native_gateway</project> <project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/native_gateway</project>
<simulation> <simulation>
<title>My simulation</title> <title>My simulation</title>
<delaytime>0</delaytime> <delaytime>0</delaytime>
@ -23,9 +23,10 @@
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
<identifier>sky1</identifier> <identifier>sky1</identifier>
<description>Sky Mote Type #1</description> <description>Sky Mote Type #1</description>
<source>[CONTIKI_DIR]/examples/sky-shell/sky-shell.c</source> <source EXPORT="discard">[CONTIKI_DIR]/examples/sky-shell/sky-shell.c</source>
<commands>make sky-shell.sky TARGET=sky</commands> <commands EXPORT="discard">make clean TARGET=sky
<firmware>[CONTIKI_DIR]/examples/sky-shell/sky-shell.sky</firmware> make sky-shell.sky TARGET=sky</commands>
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/sky-shell/sky-shell.sky</firmware>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface> <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
@ -410,6 +411,12 @@ while(true) {
YIELD(); YIELD();
/* Count sensor data packets */ /* Count sensor data packets */
if (msg.contains("ÿ")) {
log.log("WARN: Detected bad character in: '" + msg + "'\n");
msg = msg.replace("ÿ", "");
}
data = msg.split(" "); data = msg.split(" ");
if(data[24]) { if(data[24]) {
@ -518,7 +525,7 @@ while(true) {
<plugin> <plugin>
se.sics.cooja.plugins.SimControl se.sics.cooja.plugins.SimControl
<width>259</width> <width>259</width>
<z>6</z> <z>4</z>
<height>200</height> <height>200</height>
<location_x>4</location_x> <location_x>4</location_x>
<location_y>0</location_y> <location_y>0</location_y>
@ -575,7 +582,6 @@ while(true) {
<mote>19</mote> <mote>19</mote>
<showRadioRXTX /> <showRadioRXTX />
<showRadioHW /> <showRadioHW />
<showLEDs />
<split>118</split> <split>118</split>
<zoom>9</zoom> <zoom>9</zoom>
</plugin_config> </plugin_config>