-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8266 dynamic enable & factory reset features #4686
Conversation
@pkocmoud The main concern with the current default is that this will disable wifi as people arm by default. I think we will need to change the default to always on and educate users (because folks flying with a tablet will else have a drone with no control, which seems dangerous). |
@dogmaphobic I have added GPIO0 toggling - does this look right to you / workable? Can you test? |
@LorenzMeier Thanks for rebasing this. I hadn't considered the ramifications of wifi-only control. Perhaps the only way to ensure safety would be to disallow arming under specific conditions. In any case, since wifi has very limited range, the system must be safe by design even with an unreliable primary control link. We should implement a means of testing failsafe actions while a reliable RC link is still available. |
e3beb51
to
acd01f7
Compare
Sure! Once this gets merged I'll take a look. I need to add a button within QGC to activate it. What about the WIFI_TX_MODE param? Will it make to the main UI or stay only within the Parameters Dialog?
From the QGC side, we know if Tablet joystick mode is enabled. QGC could make sure WIFI_TX_MODE is always == 2 in those cases, though it would be safer if the flight controller would handle this. |
Hmm, looking at the code (ESP8266 Firmware), the pin is active low. It has a pullup resistor setup. The code below looks like active high:
I can invert the logic within the ESP8266 firmware but that will require existing users to update their firmware. |
Also, this looks suspicious:
The proper pin is GPIO2 not GPIO0 |
Which schematic is that? Looks like it may be for an early beta hardware version. |
From the bottom of this page. If that's the case, the page needs to be updated. https://pixhawk.org/modules/pixracer Regardless, the Reset To Factory pin is GPIO2, not GPIO0. |
I was just confused, since I was looking at the serial IO page of the schematic, and missing your point about it being active low. But isn't that pulldown on PB2, not PB4/8266_GPIO2 |
The "Active Low" part is on the ESP8266 side. The (ESP8266 Firmware) code currently sets up a pullup on GPIO2 and the reset is handled by an interrupt when the pin is brought to LOW. |
I should go back to bed :) |
@kd0aij Would you have bandwidth to rebase and fix / finish this? |
I'll try rebasing and addressing Gus's comments on your reset addition. |
@dogmaphobic I rebased and made the changes to GPIO2 that you called out. If the CI checks pass, would you test please? |
@dogmaphobic @kd0aij Can you pick up the testing of this so we can get this into 1.4? |
@dogmaphobic Would it be possible to rebase this on master and test it on hardware? |
stale |
Is there a replacement PR for turning WiFi off when Armed? Or is this still open? |
@devbharat There isn't. |
@kd0aij This is your PR rebased on master.