QUB-ASL / bzzz

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

Refuse to arm unless throttle stick is down and switches are at the correct positions #172

Closed jamie-54 closed 5 months ago

jamie-54 commented 7 months ago

Main Changes

The quadcopter will not arm unless all switches are up except the arm switch (switch B) and the throttle is less than 5%

Associated Issues

Closes #110

Tests

Test that quadcopter will not arm

jamie-54 commented 5 months ago

I'm just after testing this on the quadcopter and it seems to be working.

It also starts to address #175 When the quadcopter is killed all the switches need to be correct and the throttle down to un-kill it. think we just need to add a Timmer in to solve #175 properly

alphaville commented 5 months ago

@jamie-54 Brilliant! If it works, let's merge this one.

alphaville commented 5 months ago

@jamie-54 regarding #175, I guess you'll do this in Python. You want to count about 3s and the accuracy isn't too important. You just need to store in memory a timestamp of the last time the kill switch was flipped and use something like

import time
time_since_killed = time_killed - time.time()
if time_since_killed >= 3:
   # cannot unkill directly...
jamie-54 commented 5 months ago

I've tested and the current version works on the quadcopter