Commit Graph

373 Commits

Author SHA1 Message Date
Charles Crossan
0f573901d5 didn't need power.h 2021-01-11 20:28:09 -05:00
Charles Crossan
fdc9bf5783 add power statistics for #635 2021-01-11 20:25:02 -05:00
Jm
0c06d8db3c maybe this will fix the linux build? 2021-01-09 19:31:16 -08:00
Jm
69391e186b Fix for breaking the linux build 2021-01-09 13:47:10 -08:00
Jm
d458f673be Web server is now treaded and moved to mesh/wifi/* 2021-01-08 22:25:44 -08:00
Jm
cfcb00b943 that's enough for tonight. web server is in its own thread, needs to be further optimized but it works enough. next is to refactor. 2021-01-08 20:43:51 -08:00
Jm
977e47d109 partial work 2021-01-08 20:06:11 -08:00
Jm Casler
cfeb40f36d
Merge pull request #41 from mc-hamster/master
Updated osthread branch from master
2021-01-08 19:57:19 -08:00
Kevin Hester
7aacfd66ef add assertIsSetup() and use it from OSThread constructor
fixes nasty bug @mc-hamster discovered with plugin order of operations
2021-01-08 13:15:49 +08:00
Kevin Hester
3636b87db0 formatting 2021-01-08 11:52:43 +08:00
Jm
f7dcef39ce intermediate work 2021-01-05 23:21:14 -08:00
Jm Casler
35bcb5297a
Merge pull request #38 from mc-hamster/master
update from master to osthread
2021-01-05 19:04:15 -08:00
Kevin Hester
94a47dba7d fix #624 - update battery level and current time on mynodeinfo 2021-01-04 09:59:53 +08:00
Kevin Hester
edd1268f5f portduino: begin adding wifi implementation 2021-01-03 10:11:20 +08:00
Kevin Hester
aa176b6593 portuino now kinda works with the pinetab lora USB module.
still need to add an AEX256 impl for the linux port and optimize a bit
2021-01-02 12:38:18 +08:00
Kevin Hester
5ceee50bb5 bug: we've always been setting gpio 0 as an input on rf95 based devices
found because portduino provides full visibility to all IO operations
to the hw simulator.
2021-01-02 11:23:18 +08:00
Jm
925829dc58 Partial work to migrate to OSThread model 2021-01-01 12:31:46 -08:00
Kevin Hester
cdf416cb73 partial fix for #608 - when a new TCP API connection arrives, close old one completely 2020-12-31 10:02:18 +08:00
Kevin Hester
6e31ba30c7 move generated protobuf c code to own directory 2020-12-30 12:34:22 +08:00
Kevin Hester
8fe1c518d9 Merge branch 'mqtt' into dev
# Conflicts:
#	proto
2020-12-30 12:25:00 +08:00
Kevin Hester
adc71e7ed2 mqtt doc progress 2020-12-28 14:42:24 +08:00
Kevin Hester
4777e53c23 more mqtt design work 2020-12-28 13:36:11 +08:00
Kevin Hester
d6912cfd8e mqtt design progress 2020-12-28 13:22:10 +08:00
Jm Casler
0e507e1923
Merge branch 'master' into master 2020-12-27 12:39:36 -08:00
Jm Casler
58859848a3 Add RX and RX_ALL analytics for #588 2020-12-27 09:29:48 -08:00
Kevin Hester
c972197643 fix #598 don't corrupt the heap when a TCP connection drops 2020-12-27 16:58:32 +08:00
Jm Casler
e55c5e10bc
Merge branch 'master' into master 2020-12-26 22:43:56 -08:00
Kevin Hester
186a52172c fix #577 don't make invalid radio settings reboot the board
instead raise a critical fault (note though: this is still not ideal
because the radio will be in an undefined state until valid settings
are used)
2020-12-27 13:09:20 +08:00
Kevin Hester
0c74303e9d move criticalerror defs into .proto for cross platform support 2020-12-27 11:22:08 +08:00
Kevin Hester
651bd71454 show critical faults on the screen 2020-12-26 13:36:21 +08:00
Jm Casler
ded2b86e55 Calculate TX air time duty cycles #588 -- UNTESTED 2020-12-25 16:10:38 -08:00
Kevin Hester
031c58e21c remove logspam that was busting serial api 2020-12-23 17:12:48 +08:00
Kevin Hester
a8d7700295 move more of is_router out of python and into the device code 2020-12-21 11:38:03 +08:00
Kevin Hester
15e1a3870c When new node joins mesh, all other nodes reply with their current state 2020-12-17 10:53:29 +08:00
Kevin Hester
5bdc7216b3 begin support for multiple simultanous channels 2020-12-17 10:32:19 +08:00
Kevin Hester
be38a58a62 finish channel name cleanup 2020-12-15 16:13:16 +08:00
Kevin Hester
c9f2318e78 Use simpler names for standard channels 2020-12-15 13:14:36 +08:00
Kevin Hester
5cdc2f5142 Make ChannelSettings SUPER short for common channels 2020-12-14 21:09:29 +08:00
Kevin Hester
0cdc1fc959 make gpiowatch work correctly 2020-12-13 16:11:38 +08:00
Kevin Hester
e80c79edbe clean up debug msgs 2020-12-13 15:59:26 +08:00
Kevin Hester
ee8f4de5ab make plugin reply handling simpler 2020-12-13 12:57:37 +08:00
Kevin Hester
b9f1ce70cb begin plugin-api tutorial 2020-12-11 09:11:53 +08:00
Kevin Hester
df8b3ebbc7 always pull min_app_version from appload 2020-12-10 11:32:51 +08:00
Kevin Hester
a0076eb394 better position debug output 2020-12-09 13:42:36 +08:00
Kevin Hester
32b8e4f20a fix #536 allow fixed positions
meshtastic --setlat 32.7767 --setlon -96.7970 --setalt 1337
2020-12-09 12:05:15 +08:00
Kevin Hester
3753fef298 add debug_log_enabled 2020-12-09 11:56:41 +08:00
Kevin Hester
a4bb1937c1 Merge remote-tracking branch 'root/master' into udp 2020-12-09 11:21:59 +08:00
Kevin Hester
79a24c200e use autogened protobuf init code 2020-12-07 10:27:31 +08:00
Kevin Hester
90060e84c0 WIP on GPIO example 2020-12-07 10:18:11 +08:00
Kevin Hester
8f5a1f19d3 add remote gpio control as an example plugin
https://github.com/meshtastic/Meshtastic-device/issues/182
2020-12-06 18:33:42 +08:00
Kevin Hester
3e0dc44210 move want_replies into new plugin system 2020-12-05 11:15:06 +08:00
Kevin Hester
91b99bd584 require apps to be 1.1.20 or later 2020-12-05 10:27:04 +08:00
Kevin Hester
b6e21bcbcd add SinglePortPlugin to simpilify api 2020-12-05 10:14:15 +08:00
Kevin Hester
ae7d3ee5ed move nodeinfo messages into new plugin system 2020-12-05 10:00:46 +08:00
Kevin Hester
f1179bd3ea positions now sent using the new API 2020-12-05 08:46:19 +08:00
Kevin Hester
9b24cc6dd6 update protobufs 2020-12-04 18:54:00 +08:00
Kevin Hester
d3cb9bdd4a WIP moving positions to new system 2020-12-03 16:48:44 +08:00
Kevin Hester
7737123d0f begin moving position stuff into plugin 2020-11-28 18:10:31 +08:00
Kevin Hester
5138aff4b2 fix static initializer bug with mesh plugins 2020-11-28 13:25:03 +08:00
Kevin Hester
0b0d293a66 Move text message handling into the new plugin system 2020-11-28 12:10:19 +08:00
Kevin Hester
ddab4a0235 remove support for 8bit nodenums 2020-11-28 09:56:21 +08:00
Kevin Hester
f5e42b2533 update protos 2020-11-28 09:17:20 +08:00
Kevin Hester
cc36e3a9a6
Merge branch 'dev-https' into spiffs-bug496 2020-11-27 16:15:14 -08:00
Jm Casler
3ab9d2a50e Removing stuff I accidently checked in for the duplexer 2020-11-22 16:24:22 -08:00
Kevin Hester
d7d13d637c clean up filesystem goo, add spiffs to install scripts, fix #496
@mc-hamster seems to work pretty good for me, so I'll send a PR to you
for the dev-http branch.

I'll push out an android alpha build later today (once the build is
complete).  Once this new device load is out in the field _future_
device builds will support updating spiffs from android. (i.e. device
loads older than 1.1.9 must be updated to 1.1.9 or later before spiffs
support is implemented on the device side - so some users might need to
update twice before the new spiffs contents will appear on their device)
2020-11-19 09:25:02 +08:00
Jm Casler
a02979d564
Merge branch 'externalAmp' into master 2020-11-16 19:54:06 -08:00
Kevin Hester
ccc1600bc9 remove stale fixme 2020-11-14 10:19:55 +08:00
Kevin Hester
1839f8f7ca fix #513 scale retransmission times based on true packet time on wire 2020-11-14 10:07:25 +08:00
Kevin Hester
68937d52fe bug #503 wip 2020-11-12 17:49:04 +08:00
Jm Casler
e33657eb75 Toggle GPIO2 to HIGH when transmitting a packet out the LORA radio. 2020-11-09 19:47:31 -08:00
Kevin Hester
bbc36f7b6f switch to my new SD 7.2.0 S113 based bootloader 2020-10-31 12:22:20 +08:00
Kevin Hester
d7368d5a51 begin deep sleep support for nrf52 2020-10-30 17:05:32 +08:00
Kevin Hester
47bbde3c60 fix #505 allow forced standby mode to not assert fail 2020-10-29 16:13:44 +08:00
Kevin Hester
04942a3570 fix #505 - device can reboot due to race condition in sending 2020-10-29 15:27:05 +08:00
Kevin Hester
cfcb62bd18 Make region changes take effect immedately 2020-10-29 13:26:36 +08:00
Kevin Hester
0767c8be03 PPR1 fix screen mirroring on LCD 2020-10-24 08:16:15 +08:00
Kevin Hester
c078c08c3e Merge branch 'dev' into ppr1 2020-10-23 16:53:38 +08:00
Kevin Hester
a5d7bacdbf Show current region on the boot screen 2020-10-21 17:27:13 +08:00
Kevin Hester
e1f0e11cb8 ppr1 WIP DO NOT MERGE - will break other clients 2020-10-17 13:15:12 +08:00
Kevin Hester
c73ee98739 Merge branch 'master' into ppr1 2020-10-17 11:00:28 +08:00
Kevin Hester
d9dcb33576
Merge branch 'master' into dev-https 2020-10-16 17:05:06 -07:00
Kevin Hester
22f23bb07d Merge branch 'dev' into ppr1
# Conflicts:
#	src/gps/NMEAGPS.cpp
2020-10-16 15:59:55 +08:00
Jm Casler
4ccbe6ff71
Merge pull request #480 from meshtastic/master
Updating dev-https from master
2020-10-15 19:40:01 -07:00
Kevin Hester
9134faaed1 turn off segger debug in ttgo eink build 2020-10-15 16:11:40 +08:00
Kevin Hester
5f2f3c94b9 PPR1 and allow boards to set lower or higher sx1262 power limits 2020-10-15 13:47:10 +08:00
Kevin Hester
1ebd7b0c3e make lightsleep default time 5 minutes, with 1 minute in for BLE syncing 2020-10-14 08:53:12 +08:00
Kevin Hester
5457541244 fix #477: sleep behavior was broken in app due to device bug since 1.1.1
+        // NOTE: The phone app needs to know the ls_secs value so it can properly expect sleep behavior.
+        // So even if we internally use 0 to represent 'use default' we still need to send the value we are
+        // using to the app (so that even old phone apps work with new device loads).
2020-10-14 08:45:29 +08:00
Jm Casler
76b4be3b87
Merge pull request #469 from mc-hamster/master
Switched to esp32_https_server from the Espressif (Issue #452) and Enable RX LNA (#466)
2020-10-10 22:28:08 -07:00
Kevin Hester
999b292717 fixes for the posix port 2020-10-11 09:18:47 +08:00
Jm Casler
c16acb904e Merge branch 'master' of https://github.com/mc-hamster/Meshtastic-device 2020-10-10 17:59:46 -07:00
Jm Casler
5b777219be Enable the RX LNA #466
Enabling the RX LNA
2020-10-10 17:59:32 -07:00
Kevin Hester
49b4ed2a89 coroutine: kinda works now 2020-10-10 18:03:45 +08:00
Kevin Hester
4b9ea4f808 Merge branch 'dev' into coroutine 2020-10-10 09:22:23 +08:00
Kevin Hester
95cb6b06e4 fix #462 publish immediately on any GPS state change
(don't wait until end of aquisition window)
2020-10-10 09:20:38 +08:00
Kevin Hester
2044427e97 coroutines: wip compiles but does not link 2020-10-09 14:16:51 +08:00
Kevin Hester
4a70ba1f7a fix nodeinfo stored times (I think) for @lgoix 2020-10-09 10:01:13 +08:00
Kevin Hester
7a4b8cde11 keep rf95 max power at 20 dBm so users don't smoke their boards 2020-10-08 10:51:31 +08:00
Kevin Hester
113859e791 increase sx1272 max power
+#define MAX_POWER 27
 // if we use 20 we are limited to 1% duty cycle or hw might overheat.  For continuous operation set a limit of 17
+// In theory up to 27 dBm is possible, but the modules installed in most radios can cope with a max of 20.  So BIG WARNING
+// if you set power to something higher than 17 or 20 you might fry your board.
2020-10-08 09:57:59 +08:00
Kevin Hester
023f1c24fb RTC: add notion of 'quality' for different time sources
Allow use of mesh based time until a GPS time arrives
2020-10-08 07:46:20 +08:00
Kevin Hester
f00d07baa3 RTC: pull rtc code into own file for cleanup 2020-10-08 07:28:57 +08:00
Kevin Hester
1a3cc40c7e sx1262 better to check for header because preamble might never result in irq 2020-10-08 06:23:05 +08:00
Kevin Hester
c0c83ad389 If we are not supposed to share locations make sure phone doesn't either 2020-10-07 17:46:25 +08:00
Kevin Hester
7a5832ab8a SX1262: fix serious bug with detecting if we have a rx packet in progress
Could cause hangs on the way into sleep (and enormous power consumption).
Instead of checking for rx packet length (which only changes at completion)
check if we've received preamble bits but haven't yet received a completed
packet interrupt.

notes:


wait to sleep loop problem
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
Can not send yet, busyRx
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0

vs normal run
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
radio wait to sleep, txEmpty=0
Starting low level send (id=0x53fe1dd0 Fr0xe5 To0xff, WantAck0, HopLim3 encrypted)
Completed sending (id=0x53fe1dd0 Fr0xe5 To0xff, WantAck0, HopLim3 encrypted)
2020-10-07 13:43:51 +08:00
Kevin Hester
943d5cb08d bug #376 we were not staying in light sleep as long as intended 2020-10-06 11:48:53 +08:00
Kevin Hester
7480eb1826 Change to use zeros for timeout values that are 'default' 2020-10-06 09:43:00 +08:00
Kevin Hester
b072eec4ac wip for #376 2020-10-05 14:43:44 +08:00
geeksville
d66cede7fc Merge branch 'eink' into power 2020-10-01 07:51:01 -07:00
geeksville
3a638090a2 update protos for #376 2020-09-30 07:47:16 -07:00
Jm Casler
423cbc2c6d Added frequency information to debug output (#447) and cleanup of screen.cpp and meshwifi.cpp 2020-09-29 00:59:26 -07:00
geeksville
3e5f81bf2a move region into userpreferences, to end region specific firmwares 2020-09-25 12:52:08 -07:00
geeksville
1a064a4666 Merge remote-tracking branch 'root/master' 2020-09-25 09:19:58 -07:00
Jm Casler
b39f6c96bd Merge remote-tracking branch 'origin/dev-wifi' 2020-09-22 22:00:07 -07:00
comgram
55cb0c52ee Add Korean Frequency 2020-09-21 16:10:20 +09:00
geeksville
3c0429deee Add new factory_reset preferences option clients can set 2020-09-19 11:19:42 -07:00
Kevin Hester
5fb0bf2575
Merge branch 'master' into anz 2020-09-18 10:19:43 -07:00
geeksville
d3e28e3e2c Merge branch 'dev' 2020-09-17 11:20:41 -07:00
r51n
91305c2c84
add AU/NZ channel definitions 2020-09-17 12:02:38 +00:00
Jm Casler
c83ff03d66
Merge pull request #4 from meshtastic/master
Updating form head
2020-09-16 22:51:19 -07:00
geeksville
8e988cc926 fix #397 from @a-f-G-U-C - bogus GPS positions during locking could be reported
btw - from my read of the NMEA, the lowest value that means 'has a valid
position' is 1 not 2.  But I only know this because you pointed me at
it ;-)

Thanks!
2020-09-16 09:18:44 -07:00
geeksville
8c240b59f6 fix #393. immediately save node db to disk if user changes name 2020-09-16 09:08:35 -07:00
geeksville
3e64d8439d Merge branch 'master' into dev 2020-09-15 21:13:24 -07:00
geeksville
435c955acd make hash prototype a bit stricter 2020-09-15 21:05:57 -07:00
Jm Casler
c656a95a84
Merge pull request #3 from meshtastic/master
Update from meshtastic main
2020-09-15 20:34:30 -07:00
geeksville
c6d93d1a28 fix #346 limit tx power in japan 2020-09-15 18:54:50 -07:00
geeksville
7d4058f49d let users set 20 dBm if they wish 2020-09-15 18:00:21 -07:00
geeksville
31fc8fafec make default power level radio chipset specific 2020-09-15 17:55:33 -07:00
Jm Casler
e508306395 Refactoring to break out HTTP from WiFi 2020-09-13 16:58:36 -07:00
Jm Casler
f129b458ad Initial Checkin for WiFi and HTTP Server Framework 2020-09-12 21:43:41 -07:00
geeksville
92df77f228 Merge remote-tracking branch 'root/master' into dev 2020-09-11 18:15:13 -07:00
geeksville
ee27c15c2c likely fix for bug #373. fix #339. great gps fixes from @a-f-G-U-C
fixes described in bug #376
2020-09-10 09:25:10 -07:00
geeksville
f3d38d84c9 fix nrf52 build 2020-09-07 13:03:37 -07:00
geeksville
2a067e7f6b make gps optional. Portduino almost works in sim! 2020-09-06 14:45:43 -07:00
geeksville
fefd3d78f3 Portduino WIP now compiles but does not link 2020-09-05 12:34:48 -07:00
geeksville
6a475d8288 WIP 2020-09-04 17:23:17 -07:00
geeksville
6cdaf8c600 fix #349 channel suffix letter didn't match between device and phone 2020-08-30 12:38:15 -07:00
geeksville
8dc4492ba3 add taiwan frequencies 2020-08-30 12:20:43 -07:00
geeksville
dffb6c2f06 If display is on on the @BigCorvus board and we xmit the board browns out? 2020-08-28 17:38:23 -07:00
geeksville
7f214ffbb0 TFT kinda correct now - but slow because of bit banging 2020-08-28 15:33:33 -07:00
geeksville
de196810a2 add debugging for SNR values on SX1262 2020-08-25 12:06:36 -07:00
geeksville
ff885ef215 Merge remote-tracking branch 'root/post1' 2020-08-21 10:50:49 -07:00
geeksville
d7a1cef046 fix #327 always factory reset the GPS once 2020-08-21 10:14:03 -07:00
geeksville
ca75dcd64d Add support for SX1262 based TBEAMs, see below for more details.
We probe dynamically for the SX1262 or RF95 based radios on TBEAM1.0
boards now.  If either is present it will be used.
2020-08-20 15:42:36 -07:00
geeksville
781077e799 Turn on buck converter for @BigCorvus board, now radio works 2020-08-17 11:42:19 -07:00
geeksville
9b25818a50 fix #249: report battery levels even if no GPS lock
@professr I noticed you added a "newStatus" observable to the GPS class.
Do you remember why you didn't remove the old GPS status (which seemed
to be dumber).  Is it just because you didn't want to risk breaking
MeshService?  (I assume) In this change I removed the old Observable
and all seems well (just using newStatus everywhere).
2020-08-12 15:51:57 -07:00
geeksville
55dafcbecb fix #269 see below
/**
 * Generate a short suffix used to disambiguate channels that might have the same "name" entered by the human but different PSKs.
 * The ideas is that the PSK changing should be visible to the user so that they see they probably messed up and that's why they
their nodes
 * aren't talking to each other.
 *
 * This string is of the form "#name-XY".
 *
 * Where X is a letter from A to Z (base26), and formed by xoring all the bytes of the PSK together.
 * Y is not yet used but should eventually indicate 'speed/range' of the link
 *
 * This function will also need to be implemented in GUI apps that talk to the radio.
 *
 * https://github.com/meshtastic/Meshtastic-device/issues/269
 */
const char *getChannelName();
2020-08-12 11:04:03 -07:00
geeksville
178958c165 allow advanced users to specify channel numbers if they wish 2020-08-12 10:46:44 -07:00
geeksville
d7cf7e2eb4 Allow advanced users to set arbitrary spreadfactor/codingrate/bandwidth 2020-08-12 10:42:25 -07:00
geeksville
047141eb34 make TXEN/RXEN immediately low once changed to be outputs 2020-08-03 11:29:26 -07:00
geeksville
12bf3795ea less logspam when debugging the serial API 2020-08-02 12:55:22 -07:00
geeksville
a5b7501a4e nimble add debug output 2020-07-24 10:12:25 -07:00