I have try to find the trouble with Robyn

I did not manage to replicate the problem as Markus told, but I was seeing from time to time some MRL->Arduino rx error

I was not caused by a buffer overflow, monitoring serial.available() show no number close the the Buffer size

So I decide to monitor the the incoming message in the arduino by echoing it to a 2nd arduino connected via I2C who can output the message to the serial monitor (that was fun to build)

I had the rothead and neck servo moving from 90 to 30/20 and robyn was speaking

so here's the output I got just before errors appear 

MAGIC:170 NUM:3 FCN:35 PAR1:11 PAR2:90
MAGIC:170 NUM:3 FCN:35 PAR1:10 PAR2:90
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:10
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:10
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:10
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:10
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:10
MAGIC:170 NUM:3 FCN:35 PAR1:11 PAR2:30
MAGIC:170 NUM:3 FCN:35 PAR1:10 PAR2:20
MAGIC:170 NUM:3 FCN:31 PAR1:24 PAR2:0
MAGIC:170 NUM:16 FCN:30 PAR1:24 PAR2:26
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:10
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:10
MAGIC:170 NUM:170 FCN:3 PAR1:3 PAR2:35
MAGIC:170 NUM:16 FCN:30 PAR1:24 PAR2:26
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:10
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:10
MAGIC:170 NUM:3 FCN:35 PAR1:24 PAR2:50
MAGIC:170 NUM:3 FCN:35 PAR1:11 PAR2:30
MAGIC:170 NUM:3 FCN:35 PAR1:10 PAR2:20
 
Notice the colored line, seem that MRL write 2 messages at the same time in the serial
 
Any though on this? 
 
Christian

GroG

8 years 7 months ago

That is strange....

Kudo's on the clever peep glasses with the I2C and 2nd Arduino view finder :)

Well, I'll have to check  ... 

I think it may just march off the end of the 64 byte array and whipe out memory ...

Kind-of like a Frontal Lobotomy ...  

which could cause any sort of eratic behavior ...

I'll put a safety check in MRLComm.c .. funny I thought someone mentioned this before..  if they put it in the Java side it's "nice" but not as critical, as Java will just throw an error and say you can't do the Lobotomy ...
But C code says .. Sure it's all just memory, you can do whatever you want !