geeksville
1fab9c5aac
temp hack to get new rf95 driver working
2020-04-30 19:31:17 -07:00
geeksville
22bca31ce3
properly set the RF95 iface
2020-04-30 18:05:06 -07:00
geeksville
48c045a253
move SPI init into main
2020-04-30 17:56:30 -07:00
geeksville
e9ca7792eb
new RF95 driver is written
2020-04-30 17:43:29 -07:00
geeksville
b1a55b4576
old RF95 API works again
2020-04-30 16:47:56 -07:00
geeksville
dd7452ad96
old RF95 code builds again
2020-04-30 16:36:59 -07:00
geeksville
d7d8188093
implement most of sleep handling for the new radio stack
2020-04-30 15:50:07 -07:00
geeksville
62a893c760
SX1262 approximately works top-to-bottom, but need to add sleep modes
2020-04-30 15:43:41 -07:00
geeksville
a2ba9d3c44
new receive code works a little better
2020-04-30 13:50:40 -07:00
geeksville
22720e9f63
ex1262 receiving kinda works
2020-04-30 12:37:58 -07:00
geeksville
11b79a942d
add todos
2020-04-30 10:54:53 -07:00
geeksville
3c3e722181
new sending kinda works
2020-04-30 10:00:40 -07:00
geeksville
fce31560c6
the mountain of changes needed to kinda make tx work compiles.
2020-04-30 09:44:16 -07:00
geeksville
2982e197e0
radio settings now work on real sx1262 hw
2020-04-29 19:04:59 -07:00
geeksville
f69ddf168b
we now hopefully apply the same radio settings as we did for the RF95
2020-04-29 18:46:32 -07:00
geeksville
8d985cfd37
cleanup so eventually rf95 can share common msg code with sx1262
2020-04-29 16:28:11 -07:00
geeksville
4693302d82
crummy sx1262 fake init kinda works
2020-04-29 16:06:23 -07:00
geeksville
814c126e67
ugly WIP on switching to RadioLib, still need to set freq etc...
2020-04-29 14:54:03 -07:00
geeksville
2ab34357d5
emit FromRadio.rebooted to serial test harness can detect reboots
2020-04-28 17:43:16 -07:00
geeksville
b704911603
minor protobuf update
2020-04-28 11:20:00 -07:00
geeksville
59086fd477
fixes after testing stream protocol with python client
2020-04-27 18:52:57 -07:00
geeksville
88a704c4d3
for now, allow debug out to be interleaved with protobufs
2020-04-27 09:46:06 -07:00
geeksville
cceecf5f8e
New serial protobuf transport approximately works and is backward
...
compatiable with the text debug output.
2020-04-27 09:36:39 -07:00
geeksville
eb40013ddc
Create RedirectablePrint and NoopPrint for serial debug redirection
2020-04-27 09:01:25 -07:00
geeksville
dda946d933
Stream API coded but not tested
2020-04-27 08:45:39 -07:00
geeksville
178e800969
add beginnings of StreamAPI
2020-04-27 08:10:17 -07:00
geeksville
dec4870649
begin cleaning up mesh library layer so that it could be split someday
2020-04-27 07:54:19 -07:00
geeksville
15cb599cd1
move nrf52 stuff to correct directory name
2020-04-27 07:39:50 -07:00
geeksville
def86131f0
Merge branch 'master' into nrf52
...
# Conflicts:
# src/main.cpp
2020-04-26 18:34:41 -07:00
geeksville
8f1c1a9049
move debug msg
2020-04-25 11:46:46 -07:00
geeksville
3f3a1a11df
when flooding, randomly delay sent packets to decrease chances of...
...
stomping on other senders that we can't even hear.
2020-04-25 11:43:28 -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
db11d9280c
add nrf52 DFU app helper
2020-04-24 21:08:16 -07:00
geeksville
ca03110932
Update ESP32 build to work with latest NRF52 changes
2020-04-24 14:55:51 -07:00
geeksville
bebaa838c4
no need for LightSleep state on NRF52 CPUs
2020-04-24 11:21:10 -07:00
geeksville
7fa9d09d9f
placeholder guess at PMU code until I have HW
2020-04-24 09:33:45 -07:00
geeksville
7bc299573f
move esp32 specific code into esp32 land
2020-04-24 08:52:49 -07:00
geeksville
5e75beff3f
don't block but queue log messages for the ICE (and eventual crash reports)
2020-04-24 08:06:29 -07:00
geeksville
4f7e85c1a4
cleanup serial instanciation on boards where we might not use it
2020-04-24 08:05:56 -07:00
geeksville
d445cbe083
fix device name
2020-04-23 21:22:58 -07:00
geeksville
3c9c01189d
old RF95 driver probably works on NRF52 now
2020-04-23 18:47:27 -07:00
geeksville
4f3a9d8646
example BLE code approximately works
2020-04-23 18:11:32 -07:00
geeksville
0c7c3f17e5
fix nrf52 macaddr byte order
2020-04-23 18:06:46 -07:00
geeksville
5b0451f25c
add NRF52 BLE example code
2020-04-23 18:02:28 -07:00
geeksville
8f3b33c84c
use a real macaddr on the nrf52
2020-04-23 16:55:25 -07:00
geeksville
2fdb75efdf
make GPS 'work' on nrf52
2020-04-23 16:20:07 -07:00
geeksville
fbd12e1929
oled screen probably works now on nrf52
2020-04-23 13:56:15 -07:00
geeksville
ffe95f62ab
no need to pass in scl & sda into screen constructor
2020-04-23 13:53:51 -07:00
geeksville
3e4ccef992
fix warnings
2020-04-23 13:53:29 -07:00
geeksville
f0f6c4950b
on NRF52 use the Segger debug console for debug logging
2020-04-23 13:27:16 -07:00
geeksville
16998ebd8d
fix compiler warnings
2020-04-23 13:26:53 -07:00
geeksville
b77c068881
create MeshRadio even on NRF52 (though it is currently using a Sim interface)
2020-04-23 12:50:54 -07:00
geeksville
e94227cddd
cope with missing interfaces in send
2020-04-23 12:48:00 -07:00
geeksville
fe3cbeed3a
misc NRF52 fixes
2020-04-23 12:47:41 -07:00
geeksville
a0b6d57591
Fix #69 - new BLE API is in and tested from android
2020-04-23 11:41:30 -07:00
geeksville
3673f95fe5
woot! using new BLE api approximately works for reading
2020-04-23 11:02:14 -07:00
geeksville
c67b53b969
remove owner from ToRadio
2020-04-23 10:30:14 -07:00
geeksville
562b227c73
new API now seems fully implemented - now on to testing. #69
2020-04-22 16:11:54 -07:00
geeksville
169d85d0fa
handle the new set_owner and set_radio messages
2020-04-22 15:13:05 -07:00
geeksville
bd77d47215
change serial baud rate to 921600
2020-04-22 14:58:35 -07:00
geeksville
e40524baf0
begin moving comms glue from the old crufty BLE code to the new cleaner PhoneAPI class
2020-04-22 14:55:36 -07:00
geeksville
9232dfcccf
WIP - add new baseclass for all api endpoints (serial, bluetooth, udp)
...
https://github.com/meshtastic/Meshtastic-esp32/issues/69
2020-04-20 18:03:13 -07:00
geeksville
2419ebb04e
0.4.3 Fix #92 : omg - for the last couple of weeks the official builds were
...
all using US frequencies. This build fixes this (and makes the build
system cleaner in general).
If you are building your own builds in the IDE you'll need to start
setting an environment variable called COUNTRY to your two letter
country code (or leave unset to get US frequencies). See new comment
in platformio.ini.
2020-04-19 08:33:59 -07:00
geeksville
db766f18ed
Fix #99 : move spi ISR operations into helper thread. SPI from ISR is bad!
2020-04-18 14:56:09 -07:00
geeksville
e5f9a752d8
fix comments and cleanup ISR code
2020-04-18 09:22:26 -07:00
geeksville
20b41836e2
clarify log msg
2020-04-18 09:22:08 -07:00
geeksville
78470ed3f5
fix #97 , we need the RF95 IRQ to be level triggered, or we have slim chance of missing events
2020-04-18 08:48:03 -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
176532f55f
autoformat per formatting rules
2020-04-17 18:50:07 -07:00
geeksville
8eb3045451
Fix #85 , we were stalling sometimes on send while in ISR which is NEVER legal
2020-04-17 18:49:54 -07:00
geeksville
2fe145aed9
debugging goo
2020-04-17 18:48:37 -07:00
geeksville
5b17417e0c
debugging GPIO wake on heltec- seems fine.
2020-04-17 14:30:42 -07:00
geeksville
04a83fd6b7
properly detach observers at destruction
2020-04-17 13:24:38 -07:00
geeksville
7730bd762a
be less chatty about sleep
2020-04-17 13:18:33 -07:00
geeksville
62286fff52
0.4.1 release
2020-04-17 13:05:16 -07:00
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
geeksville
d647be73df
oops nasty bug probably responsible for ble mutex seeming bugs #33
...
Was calling the wrong superclass method and therfore not properly
populating radio
2020-03-24 15:16:32 -07:00
geeksville
34ead2d68e
add support for reporting device errors up through the phone to analytics
...
related to https://github.com/meshtastic/Meshtastic-esp32/issues/53
2020-03-24 13:33:24 -07:00
geeksville
3f1161b68b
bug #53 - report the error on console and fixup (will add analytics in
...
a separate call)
2020-03-24 13:04:28 -07:00
Kevin Hester
1f83f7d9df
Merge branch 'master' into fix-upside-down-screen
2020-03-24 10:55:56 -07:00
Girts Folkmanis
dee3e530de
fix #52 : bluetooth not pairing
...
Silly type error on my part - PIN was always truncated to lower 8 bits.
😬
Tested: Pairing now works from both nRF Connect and phone.
2020-03-22 19:18:49 -07:00
Girts Folkmanis
3e44c2c3e1
screen.cpp: flip the display 180
2020-03-19 20:15: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
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
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
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
5b54fd6359
screen.cpp: reformat with clang-format
2020-03-18 17:16:19 -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
0d94458c4e
bump preferences #
2020-03-18 14:59:30 -07:00
geeksville
5e55695862
fix build warning
2020-03-18 14:51:54 -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
79ce7d929c
send dynamic probed GPS status to the phone
2020-03-18 13:29: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
2134b4db9b
fix #40 force an extra redraw for the bootscreen,
...
some clones drop the first draw cmd
2020-03-17 16:36:48 -07:00
geeksville
36bee8fa53
Merge remote-tracking branch 'root/master'
2020-03-16 09:30:24 -07:00
Girts Folkmanis
41c95eaff7
fix build: add missing include to screen.cpp
2020-03-16 09:26:40 -07:00
geeksville
ca8a25f585
Merge remote-tracking branch 'root/master'
2020-03-16 09:03:21 -07:00
Kevin Hester
51a8700391
Merge pull request #35 from girtsf/underp-lock-paths
...
underp include paths in lock.h
2020-03-16 09:02:54 -07:00
Girts Folkmanis
7a4a1af332
TypedQueue: make functions return bools instead of BaseType_t
...
Minor cleanup to hide away some FreeRTOS bits.
Note: I believe src/CustomRF95.cpp:62 had a bug where it had the
condition inverted.
2020-03-15 19:29:04 -07:00