QUB-ASL / bzzz

Quadcopter with ESP32 and RaspberryPi
MIT License
7 stars 1 forks source link

Disarm when losing connection #50

Closed patchedByBatman closed 1 year ago

patchedByBatman commented 1 year ago

Main Changes

This is an attempt to address issue 29. The issue is to add a fail-safe that shuts down the drone when the radio connection has been lost for a preset amount of period, which is 500ms.

Associated Issues

patchedByBatman commented 1 year ago

The code has been tested.

jamie-54 commented 1 year ago

@gunturiCM I added a few comments mainly just to tidy up code but it worked well when testing :+1:

jamie-54 commented 1 year ago

Has this been tested on the quadcopter?

Yes

patchedByBatman commented 1 year ago

Made the changes suggested above. Please have a look.

patchedByBatman commented 1 year ago

Chandra, I made some changes and simplified the API. Now FailSafes is independent of MotorDriver (see SOLID principles).

I tested using the serial: indeed, if we don't send data for a few ms, it disarms, but we should test on the quadcopter once again.

Yes, professor. I will test it tomorrow and update it here accordingly.