Fix bebop camera startup and view video with gstreamer (#3615)
Some checks failed
Issues due date / Add labels to issues (push) Has been cancelled
Doxygen / build (push) Has been cancelled

* [conf] gstreamer instead of vlc
* Quickfix for now video

At first boot of a Bebop1, the camera did not work. Wait half a second more,  and the camera works now also at 1st boot time.

* OpenCV 4.10

---------

Co-authored-by: OpenUAS <OpenUAS@users.noreply.github.com>
This commit is contained in:
Christophe De Wagter
2026-03-18 12:07:47 +01:00
committed by GitHub
parent 29f001478a
commit ff56b97d74
3 changed files with 17 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
<control_panel name="paparazzi control panel"> <control_panel name="paparazzi control panel">
<section name="programs"> <section name="programs">
<program name="UnifiedMoCap" command="sw/ext/unifiedmocaprouter/build/mocap-router"/> <program name="UnifiedMoCap" command="sw/ext/unifiedmocaprouter/build/mocap-router"/>
<program name="GST" command="/usr/bin/gst-launch-1.0"/>
</section> </section>
<section name="sessions"> <section name="sessions">
@@ -29,6 +30,12 @@
<arg flag="-s" constant="1"/> <arg flag="-s" constant="1"/>
<arg flag="-r" constant="3"/> <arg flag="-r" constant="3"/>
</program> </program>
<program name="GST" command="/usr/bin/gst-launch-1.0">
<arg flag="udpsrc"/>
<arg flag="port=5000"/>
<arg flag="caps=application/x-rtp,payload=26"/>
<arg flag="! rtpjpegdepay ! jpegdec ! videoflip method=counterclockwise ! autovideosink"/>
</program>
<program name="VLC"> <program name="VLC">
<arg flag="./sw/tools/rtp_viewer/rtp_5000.sdp"/> <arg flag="./sw/tools/rtp_viewer/rtp_5000.sdp"/>
</program> </program>
@@ -76,8 +83,13 @@
<program name="VLC"> <program name="VLC">
<arg flag="./sw/tools/rtp_viewer/rtp_6000.sdp"/> <arg flag="./sw/tools/rtp_viewer/rtp_6000.sdp"/>
</program> </program>
<program name="GST" command="/usr/bin/gst-launch-1.0">
<arg flag="udpsrc"/>
<arg flag="port=5000"/>
<arg flag="caps=application/x-rtp,payload=26"/>
<arg flag="! rtpjpegdepay ! jpegdec ! videoflip method=counterclockwise ! autovideosink"/>
</program>
</session> </session>
<session name="Distance Counter"> <session name="Distance Counter">
<program name="Optitrack Distance Counter"/> <program name="Optitrack Distance Counter"/>
</session> </session>

View File

@@ -1049,7 +1049,7 @@ void mt9f002_init(struct mt9f002_t *mt)
/* Software reset */ /* Software reset */
write_reg(mt, MT9F002_SOFTWARE_RESET, 0x1, 1); write_reg(mt, MT9F002_SOFTWARE_RESET, 0x1, 1);
usleep(1000000); // Wait for one second usleep(1500000); // Wait 1.5 seconds to give time for reset to finish
/* Based on the interface configure stage 1 */ /* Based on the interface configure stage 1 */
if (mt->interface == MT9F002_MIPI || mt->interface == MT9F002_HiSPi) { if (mt->interface == MT9F002_MIPI || mt->interface == MT9F002_HiSPi) {

View File

@@ -244,7 +244,7 @@ static void write_reg(struct mt9v117_t *mt, uint16_t addr, uint32_t val, uint16_
} }
// Transmit the buffer // Transmit the buffer
i2c_blocking_transmit(mt->i2c_periph, &mt->i2c_trans, MT9V117_ADDRESS, len + 2, 0.5); i2c_blocking_transmit(mt->i2c_periph, &mt->i2c_trans, MT9V117_ADDRESS, len + 2, 0.1);
} }
/** /**
@@ -257,7 +257,7 @@ static uint32_t read_reg(struct mt9v117_t *mt, uint16_t addr, uint16_t len)
mt->i2c_trans.buf[1] = addr & 0xFF; mt->i2c_trans.buf[1] = addr & 0xFF;
// Transmit the buffer and receive back // Transmit the buffer and receive back
i2c_blocking_transceive(mt->i2c_periph, &mt->i2c_trans, MT9V117_ADDRESS, 2, len, 0.5); i2c_blocking_transceive(mt->i2c_periph, &mt->i2c_trans, MT9V117_ADDRESS, 2, len, 0.1);
/* Fix sigdness */ /* Fix sigdness */
for (uint8_t i = 0; i < len; i++) { for (uint8_t i = 0; i < len; i++) {
@@ -315,7 +315,7 @@ static inline void mt9v117_write_patch(struct mt9v117_t *mt)
} }
// Transmit the buffer // Transmit the buffer
i2c_blocking_transmit(mt->i2c_periph, &mt->i2c_trans, mt->i2c_trans.slave_addr, mt9v117_patch_lines[i].len, 0.5); i2c_blocking_transmit(mt->i2c_periph, &mt->i2c_trans, mt->i2c_trans.slave_addr, mt9v117_patch_lines[i].len, 0.1);
} }
write_reg(mt, MT9V117_LOGICAL_ADDRESS_ACCESS, 0x0000, 2); write_reg(mt, MT9V117_LOGICAL_ADDRESS_ACCESS, 0x0000, 2);