Commit Graph

22 Commits

Author SHA1 Message Date
geeksville
4f7a25f562 remove unneeded include 2020-05-01 16:33:40 -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
4ce7df295e don't poll for completion so quickly - the log messages scare people 2020-04-18 08:39:05 -07:00
geeksville
5b17417e0c debugging GPIO wake on heltec- seems fine. 2020-04-17 14:30:42 -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
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
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
ea250d9cd3 add initial guess at TBEAM 0.7 hardware support 2020-03-28 15:31:22 -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
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
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
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
Girts Folkmanis
b5201f928b fix the build: remove includes for TinyGPS that's not longer used or in deps 2020-03-15 13:27:00 -07:00
geeksville
1107c6d23d Fix serious bug: button presses were not waking from light-sleep on TBEAM
Root cause seems to be the axp192 interrupt, which on some boards fires
during sleep.  I'm not sure why, but we don't need this yet, so leaving
masked during sleep.
2020-03-13 22:42:43 -07:00
geeksville
f87cb00940 show reason for last reset 2020-03-08 14:05:12 -07:00
geeksville
356902d552 wip - make ble come back after sleep 2020-02-23 10:49:37 -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
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
geeksville
045529d91f begin cleanup of sleep code for new state machine 2020-02-21 17:01:26 -08:00