Commit Graph

40 Commits

Author SHA1 Message Date
geeksville
a2ba9d3c44 new receive code works a little better 2020-04-30 13:50:40 -07:00
geeksville
def86131f0 Merge branch 'master' into nrf52
# Conflicts:
#	src/main.cpp
2020-04-26 18:34:41 -07:00
geeksville
64f6c0f5c0 clean up PeriodicTask so I can eventually use it with a scheduler 2020-04-25 10:59:40 -07:00
geeksville
2fdb75efdf make GPS 'work' on nrf52 2020-04-23 16:20:07 -07:00
geeksville
0a6af936ed Get build (kinda, not really) running on a NRF52
Lots of NO_ESP32 to remove later...
2020-04-14 20:22:27 -07:00
geeksville
6ad451eb5f move bluetooth code into something that is architecture specific...
because the ESP32 implementation will be different from NRF52
to make this possible I needed to decouple knowlege about bluetooth from
our mesh service.  Instead mesh service now uses the Obserable pattern
to let any interested consumer get notified of important mesh changes
(currently that is only bluetooth, but really we should do the same
thing for decoupling the GUI 'app' from the mesh service)

@girtsf would you mind reviewing my Observer changes? I haven't written
C++ code in a long time ;-)
2020-04-10 12:18:48 -07:00
geeksville
63e1a3f47e always set time from GPS if we can 2020-04-04 19:16:30 -07:00
geeksville
07a8972aea NEO-6M gps with empty backup batteries give super invalid times 2020-04-04 18:47:41 -07:00
Girts Folkmanis
54cd082bfe fix #49: make debug screen show real data
* Break out debug screen to a separate class and make it thread-safe.
* Break out power state to a separate class.
* Show battery voltage, charging & USB status on debug screen.
* Show GPS lock / no lock
* Fix an off-by-one that I introduced earlier in `drawRows`.
2020-03-26 22:17:47 -07:00
geeksville
32ac5ac9ae reformat everything
using @girtsf clang-format prefs settings.  This should allow us to turn
on auto format in our editors without causing spurious file changes.
2020-03-18 19:15:51 -07:00
geeksville
c8b95f7691 oops - I broke compass display with my gps changes and didn't notice till
testing with two gps equipped devices.  fixed.
2020-03-18 18:34:22 -07:00
geeksville
33437b5246 oops - I accidentally shadowed a variable I didn't want to shadow ;-) 2020-03-18 09:37:38 -07:00
geeksville
f4bacb9d87 some tbeams have occasional crap sitting in their gps rx buffer at boot? 2020-03-18 09:29:20 -07:00
geeksville
0ac218b06d allow gpses which only have the RX pin connected to also work.
(and because I'm lazy, let the autoreformat rule work on this file)
2020-03-18 09:21:28 -07:00
geeksville
30a431788d we now do bidirectional comms to GPS at startup, so we can always trust isConnected 2020-03-15 16:57:21 -07:00
geeksville
d0b8adab75 In my work for #11 I accidentially created a serious bug on Heltec...
devices.  It caused bogus i2c transactions when device would go to sleep.
Fixed now, also, I now treat GPS usage uniformly between TBEAM and HELTEC
we always probe for and use the GPS if we find it.

Which means for the extra nerds
(someone requested this, I'm sorry - I don't remember who) you can now
optionally attach an external GPS to HELTECs if you want.  The pins are:

 #define GPS_RX_PIN 34
 #define GPS_TX_PIN 12

(@girtsf, sorry about including formatting changes in this PR, apparently
I had my IDE set to not autoreformat until just now
2020-03-15 16:57:21 -07:00
geeksville
9c971d3686 Finally - new sexy ultra low power/low latency GPS code is in for TBEAM 2020-03-14 18:45:24 -07:00
geeksville
3c1357b732 ublox is better but still not perfect 2020-03-14 16:31:12 -07:00
geeksville
acd5e5d29d use power save mode on gps 2020-03-14 13:33:53 -07:00
geeksville
64109b25f2 Switch to native ublox api for GPS position and time 2020-03-14 12:46:24 -07:00
geeksville
76f21dfd6e wip 2020-03-13 22:34:44 -07:00
geeksville
9bbd658b9d begin testing native ublox api 2020-03-13 20:30:48 -07:00
geeksville
a783341df1 begin adding temporary support for both NEMA and UBLOX gpses 2020-03-13 18:44:14 -07:00
geeksville
635e189007 GPS sleep mode WIP - alas this thread will have to be back burner for a
while because my TX wire on my ONLY T-BEAM broke while I was soldering
a jtag connector - so I can only RX from the GPS.

My other 5 boards are still delayed due to corona virus.

So I'll work on other features for now
2020-02-22 20:05:38 -08:00
geeksville
6eba792537 WIP - changing to a ublox aware GPS lib so I can put it in sleep 2020-02-22 19:08:16 -08:00
geeksville
5e2044dd63 blink the led very briefly every 5 secs while in light sleep 2020-02-22 17:40:31 -08:00
geeksville
a1a1ceb94d while not perfect, good enough to move power statemachine to master 2020-02-22 14:56:19 -08:00
geeksville
c7894f3bc5 fsm WIP might work 2020-02-22 13:14:10 -08:00
geeksville
aebcbf767f GPS works better now with light-sleep but not quite done. 2020-02-21 12:24:35 -08:00
geeksville
a6b98bec1f cleanup period stuff for new scheduler 2020-02-21 10:20:47 -08:00
geeksville
5f3e8b5309 unify periodic timers 2020-02-21 08:41:36 -08:00
geeksville
4dc8af3a1b trust gps time across deep sleep 2020-02-19 20:02:57 -08:00
geeksville
b9438357b6 add support for network ping testing 2020-02-19 18:51:17 -08:00
geeksville
cd4cd6fe56 progress on keeping gps off more 2020-02-19 10:53:09 -08:00
geeksville
d9a875082c set rtc from gps time 2020-02-19 08:17:28 -08:00
geeksville
67e0f5c184 use RTC time for my timestamp (works across deep sleep) 2020-02-19 07:58:51 -08:00
geeksville
d3ca56f91a fix channel prefs saving 2020-02-12 13:31:09 -08:00
geeksville
241e262f5c we now send gps locations into the mesh and update our nodedb 2020-02-06 08:49:33 -08:00
geeksville
9625bcbd9e we now sorta set time based on gps 2020-02-06 08:18:20 -08:00
geeksville
0b226132b8 begin cleanup on gps code 2020-02-06 07:40:00 -08:00