Wow, this all sounds awesome, great work!
As for you earlier question: you can use the motion commander demo
together with the flow deck to fly a simple sequence.
A.) Any active log block will continue to be sent. We have added a code very recently that resets the log subsystem if no radio packet is received for more than 1 seconds (see the commit here: https://github.com/bitcraze/crazyflie-f ... 95cf2fa8d9
), you could use something similar for the serial link. You need to set the serial link as "disconnected" and it will reset the log subsystem, or switch back to the radio link, see C..
B.) DWM1000 can be patched to not use UART1, there is 2 bridge to remove and 2 0-ohm resistor to mount. A compile flag in the firmware already exists to use the alternate pins.
Lighthouse only uses UART1, there is a row of not mounted (NM) 0 ohm resistors used for development, it allows to flash the deck over SPI. All lighthouse deck ship with a UART/I2C bootloader so that these connection are not required. It is planned that eventually the lighthouse deck will only use the I2C connection and then the UART1 will also be free.
So, you can connect the ESP32 to UART2 for your two configurations.
C.) The USB switching is there: https://github.com/bitcraze/crazyflie-f ... usb.c#L161
. It uses a USB command to switch to USB link and back to radio (radio is considered the default link). I see two possibilities for the UART link to be dynamic:
1.- Add a serial command to activate and disable the link, like it is done with USB. One thing I have been doing with the radio is to use the NULL CRTP packet (FF) as a space for link-related communication since it is normally ignored by the crazyflie. For example FF 01 01 could enable the serial link and FF 01 00 disable it.
2.- Using a more 'soft' approach like we do with the radio, and consider the link open at the first packet and closed after a timeout.
I tend to prefer 1. since it is more predictable, but both would work.
Do not hesitate to push the serial link as a pull request on github, I know that many people will be interested to use it! (us included, we will be playing around with the ESP32 that is on the AI deck prototype).