Hi,
I want to implement a custom process in order to allow the pixhawk (cube black) to a custom device.
I need to read/write on a serial port. I do not use GPS2 port, thus I chose this one to communicate.
Here is the very simple code (that does not work) :
AP_HAL::UARTDriver* uart;
uart = hal.uartE;
if(uart == nullptr){
return;
}
uart->begin(9600);
uart->configure_parity(0);
uart->set_stop_bits(1);
The thing is, it does not work as the autopilot does not boot. After flashing the firmware, i cannot connect to the autopilot, as there is no usb port to connect to.
If I’m replacing hal.uartE by hal.uartH, it works properly ( ls -l /dev/tty* shows me a /dev/ttyACM0, and I can connect to my autopilot with MissionPlanner).
Why doesn’t it work with uartE ? How should I do to use GPS2 port ?
I’m using latest firmware, latest MissionPlanner, and Cube Black as an autopilot