What is the default timeout value set to?


#1

Hi,
I am progressing with my robot, for ease I am controlling it from my iPad using raspiconnect.

I have got a button for each direction plus stop.
When I press forward the robot moves forward for a short period and then stops.

I have not expicitly set the timeout and looking at BrickPI.h it is set to zero.

So my questions are, if I do not explicitly set the timeout what is the default value?
I thought I had read somewhere that a value of zero ignores the timeout, is this correct?

I am going to call the set timeout function and see if this solves my problem, but would like to understand the design.

Thanks

Steve


#2

Hey Steve,
I think the default timeout is 250 ms. It’s defined in “BrickPiFW_Compressed_Communication” on line 150.
Hopefully that helps?


#3

Cheers, found it on line 191.

Turns out the BrickPI timeout was not my problem, in the raspiconnect server if an invalid message was received from my iPad i had added a call to stop the motors and that is what was causing it to stop!

I am almost ready to post my project, just got to prove that I can calibrate my compass sensor and then I have finished, well finished the first iteration that is.

Cheers

Steve Gale