Commit Graph

264 Commits

Author SHA1 Message Date
geeksville
25cca0628d more debug output 2020-04-17 12:46:57 -07:00
geeksville
65406eaa08 mesh flooding seems to work pretty well! 2020-04-17 12:41:01 -07:00
geeksville
ea24394110 add first cut of mesh naive flooding 2020-04-17 11:52:20 -07:00
geeksville
6afeb3e456 ok - new router seems to approximately work 2020-04-17 10:38:44 -07:00
geeksville
f108c576a7 massive WIP updates to create a clean Router abstraction for mesh 2020-04-17 09:48:54 -07:00
geeksville
6eb74415ab protobuf changes as part of getting ready for mesh again 2020-04-16 17:32:36 -07:00
geeksville
2464784f00 todo updates 2020-04-15 14:51:17 -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
0b62083e35 wip - plan 2020-04-14 16:45:26 -07:00
geeksville
5ca149fac9 move radiointerface into lib 2020-04-14 14:36:26 -07:00
geeksville
80c69c28cd move pool/queue management into the rf95 lib 2020-04-14 13:20:36 -07:00
geeksville
5904d66111 Move Custom95 in with the rest of the RH code, to be ready to refactor 2020-04-14 12:38:42 -07:00
geeksville
fd17193d5e Strip out all the parts of Radiohead (most of it) that we don't need 2020-04-14 12:31:29 -07:00
geeksville
5c379c4a98 missing newline 2020-04-14 11:44:35 -07:00
geeksville
9c5d626e7d Merge remote-tracking branch 'mine/cleanupblue' into cleanupblue 2020-04-14 11:41:16 -07:00
geeksville
4757b6807e lots of changes:
* preflightSleep, notifySleep, notifyDeepSleep now allow arbitrary
drivers/devices/software to register for sleep notification.
* Use the proceeding to clean up MeshRadio - now the mesh radio is more
like an independent driver that doesn't care so much about other systems
* clean up MeshService so that it can work with zero MeshRadios added.
This is a prelude to supporting boards with multiple interfaces (wifi,
extra LORA radios etc) and allows development/testing in sim with a bare
ESP32 board
* Remove remaining ESP32 dependencies from the bare simulation target
this allows running on anything that implements the arduino API
2020-04-14 11:40:49 -07:00
Kevin Hester
04ad8bb533
Merge branch 'master' into cleanupblue 2020-04-10 21:11:46 -07:00
geeksville
640cb3bf7f allow observers to return an error code to abort further processing
Will allow me to use observers to generalize the various hooks
that need to run to preflight sleep entry.
2020-04-10 12:40:44 -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
93a06906cb begin splitting up source files, so we can have a tree of sources...
unique to each architecture.  For now, we have "esp32" and "bare"

esp32 is the old esp stuff

bare is an target suitable for emulation that doesn't require any
particular hardware to run (no bluetooth, no i2c devices, no spi devices)
2020-04-10 12:15:35 -07:00
BeardyWalrus
3754950a0e
pinouts are swapped for TTGO-Lora32 V1 and V2 boards.
discovered by eriktheV-king in discourse
2020-04-09 20:44:15 -04:00
Andrew
753a57230d
Fix Meshtastic#80: Increase screen timeout to 5 minutes 2020-04-06 22:53:10 -07:00
geeksville
c22df18e28 fix collision avoidance for transmit - substantially improves lora tx success 2020-04-06 09:39:44 -07:00
geeksville
13ac686c96 minor doc cleanups 2020-04-05 13:58:38 -07:00
geeksville
05a0266fc4 Fix #77: bluetooth is supposed to be on in DARK state 2020-04-05 13:09:46 -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
geeksville
d1cb45aa5d string typo 2020-04-04 18:46:19 -07:00
geeksville
da74803ffb begin cleanup on radio abstraction, details below:
* to allow changing to new mesh transport
* to allow a different chipset for the radio
* to allow testing on hardware with a SimRadio
* new "bare" build env for a devboard with virtually no hardware
* make buttons optional
2020-03-31 21:56:35 -07:00
geeksville
17de6f9532 fix #73: allow hw-model to be longer (16 bytes including terminator) 2020-03-30 19:58:06 -07:00
geeksville
1da62e5ba1 oops - we were previously not marking these protobuf structs as valid 2020-03-30 17:02:41 -07:00
geeksville
feb6f2e59e extra debug output for radio config, and bump up bax handles for BLE 2020-03-30 17:02:09 -07:00
geeksville
7dabad1b70 don't let phones send down fatally invalid RadioConfig records
and if a phone did in the past, fixup the garbage we saved in flash
2020-03-30 16:10:11 -07:00
geeksville
81734f75c8 fix review comments (don't let commands queue up if we are missing a display) 2020-03-29 11:13:53 -07:00
geeksville
11d57e721a fix #68 (@girtsf, pls review - ps: no worries ;-) )
// We don't set useDisplay until setup() is called, because some boards have a declaration of this object but the device
// is never found when probing i2c and therefore we don't call setup and never want to do (invalid) accesses to this device.
2020-03-29 11:00:25 -07:00
geeksville
ea250d9cd3 add initial guess at TBEAM 0.7 hardware support 2020-03-28 15:31:22 -07:00
geeksville
be468a2183 add reasonable guesses for TTGO LORA V1 and V2 boards - thanks @sensorsiot
for the pinouts
2020-03-28 14:45:33 -07:00
geeksville
cf2aa37635 clean up configuration.h and add support for ttgo-lora-v1 boards 2020-03-27 16:55:19 -07:00
geeksville
d1387be015 Merge remote-tracking branch 'root/master'
# Conflicts:
#	src/main.cpp
#	src/screen.cpp
2020-03-27 14:18:07 -07:00
geeksville
d831beab3d moving build selection into platformio.ini rather than nasty #defines. thanks to @sensorslot
for the pointer to https://github.com/arendst/Tasmota - where I just borrowed heavily ;-)
2020-03-27 14:03:58 -07:00
geeksville
5c4ae6c042 now that axp192 interrups work, no need to poll over i2c. #48 2020-03-27 14:03:58 -07:00
geeksville
a0c97825e8 always use gps.isConnected to check for GPS, it is the only thing
guaranteed to be fresh and accurate
2020-03-27 12:32:18 -07:00
geeksville
cc3bac7ea0 Fix AXP192 handling by @spattinson. yay! fix #48
Also - now that he fixed that, we can leave PMU interrupts on across sleep

Hopefully the following line will properly credit him in the magic github
universe...

Co-authored-by: spattinson <spattinson@users.noreply.github.com>
2020-03-27 12:29:51 -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
a579bbcb50 heltec style devices were not automatically setting their time from the mesh
due to a bug in the init of has_gps.  Now that we probe for gps we should
default has_gps to false until we hear from it
2020-03-25 13:36:54 -07:00
geeksville
12e67d3b30 add some debug output 2020-03-25 13:35:49 -07:00
geeksville
50d724780a make user presses ask other nodes for their latest status
see related bug
https://github.com/meshtastic/Meshtastic-esp32/issues/59
2020-03-25 13:09:12 -07:00
geeksville
3443e60718 never loop waiting on hardware without some sort of timeout ;-)
related to https://github.com/meshtastic/Meshtastic-esp32/issues/53
2020-03-25 12:25:46 -07:00
geeksville
65128a04c9 my new watchdog related to the the send tx bug was not quite complete
https://github.com/meshtastic/Meshtastic-esp32/issues/53
2020-03-25 11:45:18 -07:00
geeksville
b4b8abe6ec omg I was not setting the correct flag to tell phone we had gps 2020-03-24 15:20:24 -07:00