Code for automatic reconnect
Posted: Fri Aug 27, 2021 2:59 pm
Hi all,
I'm working with the basic asynchronous logging example (https://github.com/bitcraze/crazyflie-l ... asiclog.py) and trying to 1) keep trying to make an initial connection until it finds a Crazyflie, and 2) keep trying to reconnect if the logger has lost connection to a previously connected Crazyflie. I got 1) to work by just adding a while loop in the __init__ of the logger and closing and opening the link until it connects, but I'm not sure how to achieve 2). Is there any chance somebody of you has worked on this before? Thanks!
Jesse
I'm working with the basic asynchronous logging example (https://github.com/bitcraze/crazyflie-l ... asiclog.py) and trying to 1) keep trying to make an initial connection until it finds a Crazyflie, and 2) keep trying to reconnect if the logger has lost connection to a previously connected Crazyflie. I got 1) to work by just adding a while loop in the __init__ of the logger and closing and opening the link until it connects, but I'm not sure how to achieve 2). Is there any chance somebody of you has worked on this before? Thanks!
Jesse