meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3k stars 715 forks source link

Fix GPS toggle on Heltec v3 #3937

Closed slabua closed 1 month ago

slabua commented 1 month ago

The definition of PIN_GPS_EN was missing from the heltec_v3 variant. Originally, I thought it was removed for some reason, and perhaps was it indeed? But while testing this change, it seems like I have encountered no malfunctioning with the GPS. If I am missing some important detail, I'd be happy to hear some news about it.

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

CLAassistant commented 1 month ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

b8b8 commented 1 month ago

Heltec V3 doesnt normally have a GPS and an external one needs to be added by the user. The pins you actually use for TX RX and EN are set by the user with the app. Why explicitly define them now?

slabua commented 1 month ago

That's what I thought too, but without that line, the specified GPIO on the app never turns off when triple clicking, despite the message showing up on the screen.

todd-herbert commented 1 month ago

That's what I thought too, but without that line, the specified GPIO on the app never turns off when triple clicking, despite the message showing up on the screen.

I have a suspicion that adding this line may not have helped; that it might have been a co-incidence and that different timing during testing might have given this different result? Definitely interested to hear if this PR's changes do consistently help though.

I remember we chatted about this on the discord server recently. A couple of people have been looking into it since then, so it might be worth jumping back over and having a read of #alphanauts-testing and then the thread that's splintered off.

It seems like for the most part, the code is actually working as intended. PIN_GPS_EN apparently only changes if your GPS Update Interval setting is longer than 15 minutes (+ however long it takes to get a GPS lock).

It does seem like there is probably one bug though, where a triple press won't move the GPS hardware from a "standby" state to a true "powered-off" state.

slabua commented 1 month ago

@todd-herbert thanks! yes sorry I couldn't find anymore the thread on discord the other day. I will check on discord and also try different timeouts. So far I have tested the voltage on the pin itself, and across the gps module power pins upon triple clicking, to rule out the transistor situation.