geeksville
24ac907780
auto generate channel numbers from name
...
NOTE: All radios on a channel will need to be updated to this release
before they can talk together again.
2020-03-15 17:51:57 -07:00
geeksville
5037fb830e
fix build (and autoformat in visual studio code)
2020-03-15 17:50:48 -07:00
Girts Folkmanis
79f1346359
underp include paths in lock.h
...
Had the casing wrong, but could get away with it on a mac.
2020-03-15 17:43:42 -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
74f7b7b622
print extra info the next time this error occurs
2020-03-15 16:57:21 -07:00
Girts Folkmanis
2874b22d6c
add a Lock, LockGuard and printThreadInfo
...
* `Lock`: trivial wrapper for FreeRTOS binary semaphores
* `LockGuard`: RAII wrapper for using `Lock`
* `printThreadInfo`: helper for showing which core/FreeRTOS task we are
running under
2020-03-15 16:52:19 -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
0d62a2be85
release 0.1.6
2020-03-14 18:48:15 -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
e93bc76ac9
Merge branch 'master' into gps-sleep-mode
2020-03-13 22:45:40 -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
35cf8a4859
power debugging
2020-03-13 22:38:58 -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
4999da0824
Merge branch 'dev' into gps-sleep-mode
...
# Conflicts:
# docs/software/TODO.md
# platformio.ini
2020-03-13 18:48:38 -07:00
geeksville
a783341df1
begin adding temporary support for both NEMA and UBLOX gpses
2020-03-13 18:44:14 -07:00
astro-arphid
91227b25df
#13 - add support for 433MHz Heltec boards
2020-03-12 06:05:11 +00:00
geeksville
9995d2a7ab
oops copypasta error fix #19 . Thanks @iveskins!
2020-03-10 19:33:16 -07:00
geeksville
f87cb00940
show reason for last reset
2020-03-08 14:05:12 -07:00
geeksville
011864a2d3
Fix #15 Force all devices to update preferences
2020-03-08 11:02:58 -07:00
geeksville
ffe8bf2be6
Refactor to make some real design docs
2020-03-05 18:39:24 -08: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
geeksville
2ce95ed2ce
fix typo in SDS sleep time
2020-03-04 16:10:48 -08:00
geeksville
d1b7b6c5c5
oops - I was previously stopping bluetooth before stopping the mesh bluetooth service
...
which was bad bad
2020-03-04 16:10:36 -08:00
geeksville
425c570757
don't show fake GPS level on devices without one #4
2020-03-04 10:51:29 -08:00
Kevin Hester
46dab2d496
Make devicestate.version something that only the device code cares about
2020-03-03 13:46:11 -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
Kevin Hester
fe5703c684
fix the "blank screen when a text message arrives" bug
2020-03-03 10:15:23 -08:00
Kevin Hester
28588f6730
send hw version info via protobufs
2020-03-03 08:23:58 -08:00
Kevin Hester
d074218049
no need to stop mesh service during sw update, bug was on the android side
2020-03-03 07:38:56 -08:00
Kevin Hester
1f07d6735b
fix a nasty sleep bug: we weren't stopping our old mesh service
...
so it would kinda keep living (along with the recreated one) when we
come back from sleep.
2020-03-03 07:36:35 -08:00
Kevin Hester
bb0b2e72c8
stop using ino files, visual studio doesn't like them
2020-03-03 07:34:05 -08:00
Kevin Hester
12a68026e7
clarify release of meshpacket back to pool
2020-03-02 09:02:21 -08:00
Girts Folkmanis
0b8d7768fd
some minor cleanups
...
* Suppress warnings about conflicting library names in platformio.ini by
explicitly picking the libraries by id that we want.
* fix unused static function warning by making it not static ;)
* declare arduino-fsm as dependency for BluetoothOTA. Hopefully this
fixes the CI builds?
Tested: `pio run` builds.
2020-02-28 19:26:11 -08:00
geeksville
877e312833
allow TBEAMs to provide approx GPS time to Heltec devices
2020-02-26 09:00:53 -08:00
geeksville
7b348f30ac
text messages screen not coming up if screen was already on
2020-02-25 10:29:37 -08:00
geeksville
8893be57df
kinda ugly but BLE sw update seems reliable again
2020-02-24 18:09:58 -08:00
geeksville
6b696bfdc5
hw vendor strings must match file names for auto update
2020-02-24 11:21:34 -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
51b53f406e
include region code in the BLE HW version string. ie 1.0-US
2020-02-24 09:22:34 -08:00
geeksville
bd0f35ad83
fix encoding of sw version numbers in the BLE device info
2020-02-24 09:12:13 -08:00
geeksville
0110e1d2e0
release 0.0.4
2020-02-23 20:08:20 -08:00
geeksville
82afd234a1
don't stomp on RX packets when we have something ready to send
2020-02-23 19:51:43 -08:00
geeksville
419dd44ff6
BT sleep leak now down to about 200 bytes
2020-02-23 18:09:40 -08:00
geeksville
621beadb5c
btle leak per sleep now down to about 500 bytes.
2020-02-23 16:42:09 -08:00
geeksville
8dfd7a4a71
the ble goo is still leaking on destroy, but better
2020-02-23 14:09:52 -08:00
geeksville
a45d7be922
still leaking in the BT stack but better
2020-02-23 13:54:40 -08:00
geeksville
f9ce6a53e1
ble works again after sleep - but we are still leaking
2020-02-23 13:20:46 -08:00
geeksville
5f88174dbf
wip - finally done switching to dynamic allocs
2020-02-23 12:25:59 -08:00
geeksville
76100e23eb
WIP make swupdate keep power on
2020-02-23 11:37:38 -08:00
geeksville
a678dd3ee8
WIP - all BT characteristics must be dynamically alloced
2020-02-23 11:05:55 -08:00
geeksville
356902d552
wip - make ble come back after sleep
2020-02-23 10:49:37 -08:00
geeksville
4906b12489
prevent ble powerdown while phone is connected
2020-02-23 08:53:52 -08: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
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
a1a1ceb94d
while not perfect, good enough to move power statemachine to master
2020-02-22 14:56:19 -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
geeksville
045529d91f
begin cleanup of sleep code for new state machine
2020-02-21 17:01:26 -08:00
geeksville
aebcbf767f
GPS works better now with light-sleep but not quite done.
2020-02-21 12:24:35 -08:00
geeksville
598023f5db
PMU IRQ polarity was backwards
2020-02-21 11:39:10 -08:00
geeksville
3df81682b3
now that light-sleep kinda works, use deep-sleep far more rarely
2020-02-21 11:32:33 -08:00
geeksville
20461807f3
change screen into a periodictask, so it can be used with the scheduler
2020-02-21 10:51:36 -08:00
geeksville
a6b98bec1f
cleanup period stuff for new scheduler
2020-02-21 10:20:47 -08:00
geeksville
d4efb2c44c
burn _lots_ less cpu updating the display when idle
2020-02-21 10:13:51 -08:00
geeksville
5f3e8b5309
unify periodic timers
2020-02-21 08:41:36 -08:00
geeksville
132e54ecc5
don't turn bluetooth back on every time we exit light sleep
2020-02-21 08:09:07 -08:00
geeksville
7a745c9e65
light sleep seems to work well
2020-02-21 04:57:08 -08:00
geeksville
beccc34ef1
lower cpu freq to 80MHz
2020-02-21 03:48:13 -08:00
geeksville
6ade723caa
release 0.0.3 alpha posted
2020-02-20 13:23:42 -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
bf347aad91
show users walking heading on the screen
2020-02-19 15:29:18 -08:00
geeksville
f5a2596acf
fix time scaling
2020-02-19 11:35:34 -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
ae023a57e8
don't assert fail if the txfifo is full, just drop the packet
2020-02-18 20:17:11 -08:00
geeksville
acce254685
Change RF95 to deliver packets straight from ISR and no polling for anything
2020-02-18 20:06:01 -08:00
geeksville
bf491efddf
begin support for countries besides the US
2020-02-18 16:18:01 -08:00
geeksville
9481d9e95b
loopback test support
2020-02-17 17:47:01 -08:00
geeksville
47d278b3b9
only display messages destined to us
2020-02-17 16:32:51 -08:00
geeksville
c0fdf227b7
properly show plaintext msgs on oled
2020-02-17 16:27:29 -08:00
geeksville
5c0b20e43c
If the phone writes our user settings, only broadcast if actually changed
2020-02-16 18:14:04 -08:00
geeksville
f34c29a323
experiment with axp192 power management
2020-02-16 16:03:16 -08:00
geeksville
0453ffbfd7
Make a Periodic class, use it to blink the LED less often
2020-02-15 11:15:43 -08:00
geeksville
befb06bdd9
make readme a bit more real.
2020-02-15 08:38:07 -08:00
geeksville
978abc7f63
show a kinda correct heading on the compass graphic
2020-02-14 19:11:31 -08:00
geeksville
4adddf4fd0
show real distances between nodes
2020-02-14 16:25:11 -08:00
geeksville
52b398083a
general both build types
2020-02-14 14:00:08 -08:00
geeksville
e16d5c7e39
never let phone override macadddr, only override fields the phone has set
2020-02-14 04:32:08 -08:00
geeksville
a7b5da5dd2
only one announcer seems supported in ESP32 BLE, so use that for our mesh service
2020-02-13 11:53:46 -08:00
geeksville
59aaffa3e5
show real received text messages in the gui
2020-02-12 19:58:44 -08:00
geeksville
56f884cd10
don't sleep if user pressed button recently
2020-02-12 14:29:35 -08:00
geeksville
cbe2b8cafa
only send pings a max of once per min
2020-02-12 14:24:57 -08:00
geeksville
53cc8f9da3
set rx_time in packets
2020-02-12 14:18:43 -08:00
geeksville
e79c49d100
send network pings when the user does something with their device
2020-02-12 14:07:06 -08:00
geeksville
d3ca56f91a
fix channel prefs saving
2020-02-12 13:31:09 -08:00
geeksville
efa91f6767
track last contact times for nodes and show in gui
2020-02-12 11:52:53 -08:00
geeksville
c726e5f331
leave screen off most of the time - press to wake
2020-02-12 09:58:46 -08:00
geeksville
556ad310fc
don't deepsleep if we have USB power
2020-02-12 09:13:49 -08:00
geeksville
c18306076a
work needed for deep sleep Lora radio power measurements
2020-02-12 08:44:31 -08:00
geeksville
d3ce56f1b5
gui polish
2020-02-12 07:51:04 -08:00
geeksville
a0f2d1f18a
include a human readable name for each channel
2020-02-11 19:08:17 -08:00
geeksville
03eaef2c8f
power measurement work
2020-02-11 16:04:25 -08:00
geeksville
5aaae9c4fe
we now use 13 different channel numbers
2020-02-11 12:05:46 -08:00
geeksville
124c3e2edd
show real radio signal strength
2020-02-11 11:03:03 -08:00
geeksville
6dc17bdfde
we now show correct usernames in the nodeinfo screens
2020-02-11 10:51:45 -08:00
geeksville
3e773526b7
drawing correct compass rose works
2020-02-11 09:39:47 -08:00
geeksville
9897e24453
fix reported alitude to be in meters
2020-02-10 16:44:43 -08:00
geeksville
21611e682f
3 lines of debug text on lcd debug screen
2020-02-08 19:45:37 -08:00
geeksville
112505d8e0
track radio signal levels, use wider bandwidth for incompatible radios
2020-02-08 19:45:21 -08:00
geeksville
fb043bf86a
sort of work with bicolor displays (yellow+blue), though GUI layout not right
2020-02-08 18:49:15 -08:00
geeksville
fb5b4af5be
send user messages every 5 mins
2020-02-08 16:18:02 -08:00
geeksville
422e213d2a
dynamic nodenum assignment now works
2020-02-08 12:42:54 -08:00
geeksville
b262492c75
show msecs required to send a packet
2020-02-08 10:13:04 -08:00
geeksville
c6103ac5ef
more rigorlessly pick our memory pool size
2020-02-08 10:00:15 -08:00
geeksville
c831957c0d
allow larger packets
2020-02-08 09:50:15 -08:00
geeksville
b2b832c608
nasty rxbuffer underfill bug fixed
2020-02-08 09:39:26 -08:00
geeksville
0158fcf352
get ttgo building again
2020-02-08 07:55:12 -08:00
geeksville
493d7e33c6
add the concept of a minimum version for saved settings files
2020-02-08 07:41:04 -08:00
geeksville
bf72326d20
power up the screen if we need it for bluetooth pairing
2020-02-08 07:38:08 -08:00
geeksville
593a6e6f83
BLE is now secured to require pairing with PIN
2020-02-07 20:59:21 -08:00
geeksville
0c0d4025f1
use press to cycle between screens
2020-02-07 17:48:12 -08:00
geeksville
e1f06bff6d
placeholder debug and nodeinfo screens are in
2020-02-07 17:26:42 -08:00
geeksville
039f18c80d
don't burn so much cpu spinning in loop()
2020-02-07 16:12:55 -08:00
geeksville
6f592fbb6b
only show bootscreen once
2020-02-07 15:37:25 -08:00
geeksville
0a369da4a2
make a bootscreen
2020-02-07 14:52:45 -08:00
geeksville
88436f8522
add ui sample code
2020-02-07 13:51:17 -08:00
geeksville
3e87e60d43
save db to flash
2020-02-07 09:36:23 -08:00
geeksville
d2521656db
if android changes radio settings - change the radio
2020-02-06 22:57:58 -08:00
geeksville
71a0602023
update todo list - great progress!
2020-02-06 21:47:22 -08:00
geeksville
ade30ee1ce
bidir comm works
2020-02-06 21:26:40 -08:00
geeksville
f2d7215fb3
unreliable rx works
2020-02-06 16:07:50 -08:00
geeksville
61a88a343e
we now reply to owner messages with our owner
2020-02-06 11:07:44 -08:00
geeksville
2792e2148f
we now send owner at boot
2020-02-06 10:58:19 -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
geeksville
0050e4b05a
progress
2020-02-05 22:13:27 -08:00
geeksville
83fb38b38c
jlink jtag debug now works on lora32 board, problem was gpio14 is needed
2020-02-05 15:37:58 -08:00
geeksville
1929d38226
todo progress
2020-02-04 21:24:11 -08:00
geeksville
37eca63e58
fix bt reads of owner etc
2020-02-04 13:47:42 -08:00
geeksville
b538677ad2
include our local user in the node db
2020-02-04 09:00:17 -08:00
geeksville
b04fb061c4
stop explicitly using Serial.print for debug messages
2020-02-04 08:17:44 -08:00
geeksville
4a40b9499b
allow heltec boards to boot without i2c when jtag debugging
2020-02-04 07:31:32 -08:00
geeksville
f2a731c22d
update to nanopb
2020-02-03 22:22:53 -08:00
geeksville
31ee795e9b
if android updates owner or radio, tell the network
2020-02-03 21:17:35 -08:00
geeksville
634a547030
implement nodeinfo ble charstic
2020-02-03 21:03:20 -08:00
geeksville
d0027e9f6a
update nodedb based on rx packets
2020-02-03 20:24:07 -08:00
geeksville
df2b40f5a1
report hw vendor and sw version via BLE
2020-02-03 20:18:36 -08:00
geeksville
d4284ba95d
back to battling jtag
2020-02-03 17:13:41 -08:00
geeksville
97598c9178
new ble charatristics work
2020-02-03 11:53:38 -08:00
geeksville
8f7f4d894f
begin new ble charateristics
2020-02-03 11:15:17 -08:00
geeksville
e7f12b62ba
protobuf updates
2020-02-03 10:06:16 -08:00
geeksville
d11b023c85
add beginnings of nodedb
2020-02-03 09:13:19 -08:00
geeksville
e6535f5504
we now BLE notify for the arrival of new messages
2020-02-02 20:54:40 -08:00
geeksville
d34bbffb2d
works with phone
2020-02-02 19:08:04 -08:00
geeksville
b799004f0d
rx path to phone is written
2020-02-02 18:33:46 -08:00
geeksville
74adc06f89
turn of axp led while sleeping
2020-02-02 13:55:44 -08:00
geeksville
255463f6b8
clean up bluetooth services
2020-02-02 13:29:53 -08:00
geeksville
efbe520107
use unique device name
2020-02-02 12:55:26 -08:00
geeksville
9aed5056ad
mesh sending and receving now much more real
2020-02-02 12:45:32 -08:00
geeksville
4051bf8465
begin adding rx from radio handling
2020-02-02 09:59:00 -08:00
geeksville
5dca838ba3
wip
2020-02-02 08:17:45 -08:00
geeksville
be8df34722
isolate gpios for minimum deep sleep current draw
2020-02-01 19:45:12 -08:00
geeksville
02ed249374
sleep for a very long time, because the lorawan32 board doesn't have an off switch
2020-02-01 19:09:17 -08:00
geeksville
2474b3b064
progress
2020-02-01 18:45:27 -08:00
geeksville
de03dc88f4
bt to mesh code is written
2020-02-01 16:14:34 -08:00
geeksville
490331f3cd
wip
2020-02-01 16:05:12 -08:00
geeksville
76f4b92790
Heltec LoRa32 now works
2020-02-01 14:23:21 -08:00
geeksville
70ed667727
protob work
2020-02-01 14:23:02 -08:00
geeksville
12fe7272de
make protobufs use less callbacks
2020-02-01 12:32:35 -08:00
geeksville
a36c6b07df
add protobufs
2020-02-01 11:56:32 -08:00
geeksville
240d5955e9
progress
2020-02-01 11:25:07 -08:00
geeksville
1bda9c953e
grow our app space in flash
2020-02-01 09:46:25 -08:00
geeksville
2529189a08
add beginnings of mesh radio
2020-02-01 09:05:50 -08:00
geeksville
cdb7153071
move my bt experiment into its own repo (about to remove ttn)
2020-02-01 08:30:53 -08:00