How to add a delay to companion serial port at startup?

Hello,

I’m using a TX1+J120 as companion computer, PX4 serial port is connected to TX1 serial port.
It works but I have to power the TX1 before the PX4.
If TX1 and PX4 boot at the same time the mavlink messages coming on the serial port put the TX1 in recovery mode.
In ArduCopter there is a parameter TELEM_DELAY to delay the communication at startup and allow to power both at he same time.
More info there : http://ardupilot.org/dev/docs/companion-computer-nvidia-tx1.html

Does a same parameter exist in PX4 ?
How to achieve it ? I can contribute to the code if someone give me advice on the best way to do this.

The easiest way would probably just be to add a sleep command to the nsh rcS boot script. You could do it right before mavlink is brought up if thats all you are worried about.

NSH Documentation is here:

http://nuttx.org/doku.php?id=documentation:nuttshell

1 Like