Commit Graph

27 Commits

Author SHA1 Message Date
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
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
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
05a0266fc4 Fix #77: bluetooth is supposed to be on in DARK state 2020-04-05 13:09:46 -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
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
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
534691f0c2 Merge remote-tracking branch 'root/master'
# Conflicts:
#	src/main.cpp
#	src/screen.cpp
#	src/screen.h
2020-03-18 18:44:12 -07:00
Girts Folkmanis
daf8594b99 Screen cleanups and refactoring
Work towards separating out how Screen interacts with other stuff.
* `Screen` should now be thread-safe. All commands to it are put in a
  queue and handled in `doTask` from the `loop()` task.
* Break dependency from `BluetoothUtil` to `Screen` by changing the
  pairing request into a callback.
* All accesses to screen now happen through the class.
* Fix `drawRows` so that the text scrolls along with frame animations.
* Remove example code that wasn't used.
2020-03-18 18:11:35 -07:00
geeksville
53765298e1 add a real BOOT state, to avoid glitch from redrawing bootscreen twice
also its the right thing to do ;-)
2020-03-18 15:00:17 -07:00
geeksville
dbbb62f63e fix press to properly force any node we are watching to send us a new
position report
2020-03-18 13:51:32 -07:00
geeksville
35cf8a4859 power debugging 2020-03-13 22:38:58 -07:00
geeksville
9bbd658b9d begin testing native ublox api 2020-03-13 20:30:48 -07:00
geeksville
c66e24aa4d most users are not using the phone app now, don't enter SDS state because of no phone comms 2020-03-04 18:59:10 -08:00
geeksville
951f5d11d5 fix text message display when new text arrives
The problem was we were pulsing the display power briefly down while
reentering the ON state (because the ON states exit rule turned it off).
Instead we now just turn off the screen on entry to DARK or LS states
2020-03-04 16:46:57 -08:00
Kevin Hester
375804c9e4 (needs testing) fixed the following during a plane flight
* Have state machine properly enter deep sleep based on loss of mesh and phone comms.
* Default to enter deep sleep if no LORA received for two hours (indicates user has probably left the mesh).

Signed-off-by: Kevin Hester <kevinh@geeksville.com>
2020-03-03 13:31:44 -08:00
geeksville
7b348f30ac text messages screen not coming up if screen was already on 2020-02-25 10:29:37 -08:00
geeksville
a3df099f60 until my TBEAM is fixed, leave GPS power on in sleep sometimes 2020-02-24 11:21:08 -08:00
geeksville
bb808c6c52 fix bluetooth pairing UX. enter full ON state when requested 2020-02-24 10:23:07 -08:00
geeksville
4906b12489 prevent ble powerdown while phone is connected 2020-02-23 08:53:52 -08:00
geeksville
372a3e000e button presses are fixed 2020-02-22 18:02:44 -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
ca37e50362 WIP light sleep kinda works 2020-02-22 14:45:58 -08:00
geeksville
fe2ca65a11 WIP kinda works but light sleep still busted 2020-02-22 13:50:08 -08:00
geeksville
c7894f3bc5 fsm WIP might work 2020-02-22 13:14:10 -08:00
geeksville
509f9b6e2b WIP state machine builds 2020-02-22 12:01:59 -08:00