Commit Graph

4707 Commits

Author SHA1 Message Date
Ben Meadors
35cfe4318a
Stop past timestamps from setting our system time RTC (#4704)
* Ignore attempts to set times in the past (before our build epoch)

* TRONK
2024-09-13 19:42:31 -05:00
Manuel
625254cf90
Support Seeed SenseCAP Indicator (#4279)
* preliminary target environment

* add debug tool

* add screen definitions

* screen definitions

* remove rtc, debug build

* correct rotation

* Add real hwmodel

* fix width

* use IO expander ports

* link to modified arduino-esp32

* added config_detail

* rotate screen

* remove touch INT

* add delay to display log

* color log and radiolib log

* LoRa init

* make trunk happy

* add lovyanGFX patch lib for io expander

* fix lib

* fix display&touch function

* touch driver I2C scan

* remove delay

* build for release

* minor code cleanup

* allow trunk to be happy

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
2024-09-12 06:44:30 -05:00
panaceya
910b6b7512
OLED_ can be configured via userPrefs.h (#4624) 2024-09-11 19:31:30 -05:00
Tom Fifield
371c3e05bf
Beautify GPS_DEBUG getACK logging code (#4672)
This getACK is used to look for ASCII responses, so print ASCII
when GPS_DEBUG is enabled.

This markedly assisted with recent AG3335 debugging. It works great
with other chips too (tested eg ATGM336H). Even UBLOX prints
understandable "GPTXT,01,01,01,PDTI inv format*35." responses.

Credit to bluebrolly. on discord.
2024-09-11 19:30:29 -05:00
Michael Gjelsø
f37df4d6bf
Radiomaster Bandit Accelerometer support (#4667)
* Added STK8xxxx Accelerometer chip

Added detection of STK8BA53 to I2C scanner.
Change the way and order MCP9808, lLISH3DH and STK8BA53 is detected since they all shares the same I2C address.

* Accelerometer support Radiomaster Bandit.

Enables tap to wake screen if enabled in config,

* Trunk

Trunk
2024-09-11 18:53:17 -05:00
Ben Meadors
9ac0e26d42
Add option to preserve private key for factory reset (config) (#4679)
* Add option to preserve private key for factory reset (config)

* Typo fix

* Copy the key in the right direction, and set the size.

* Don't set the key size back to 0 right after setting it to 32.

* Set the key size before using it to do a memcpy.

* Use the right key_size for backing up private_key

* Don't factoryReset() for a missing nodeDB

* Disable Bluetooth in AdminModule when resetting device settings or nodeDB to avoid race

* Add checks for valid objects before deinit bluetooth

* Add disableBluetooth to handleSetConfig, handleSetModuleConfig, and commit settings

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2024-09-11 08:42:26 -05:00
zerolint
6724f1f7ea
Print Unix epoch on time_t 64bit platforms (#4673)
Fixes (#4600) by using unsigned 32bit for epoch.

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-09-10 15:51:28 -05:00
Ben Meadors
013021941e
Remove scaling of smart position broadcast minimum interval specifically (#4677)
* Remove scaling of smart position broacast minimum interval specifically

* Trunk
2024-09-10 15:30:40 -05:00
Jonathan Bennett
4e850296b6
Fix repeatedly getting new NodeNum and add more debug (#4674)
* All the debug

* Change `memccpy()` to `memcpy()`

* Brint all the bytes of the MAC Address from the NodeDB

* Check for blank MAC Address in ourown NodeDB entry

* One more `memccpy()`

* Clean-up debug log

---------

Co-authored-by: GUVWAF <thijs@havinga.eu>
2024-09-10 13:24:57 -05:00
GUVWAF
5537f98dd6
Merge branch 'master' into trFix 2024-09-09 21:29:37 +02:00
GUVWAF
4ed12bf21d
Try fix repeatedly getting a new NodeNum (#4670) 2024-09-09 14:22:32 -05:00
GUVWAF
2f9dcee954 Fix size calculation of route/SNR array 2024-09-09 19:13:00 +02:00
Thomas Göttgens
68d6ff8c24
Merge pull request #4650 from fifieldt/AG3352
Add support for AG3352 and fix AG3335 support
2024-09-09 16:40:44 +02:00
Tom Fifield
dc8cc122a6
Add explicit to JSONValue constructors (#4665) 2024-09-09 09:20:21 -05:00
Tom Fifield
e9d55de3cb
Fix out-of-bound array access in T1000X Sensor (#4663)
if u8i == 135, then u8i++ runs, the loop exits since u8i == 136,
then value for u8i is 136 after the for loop.

then in the next line, ntc_res2[u8i] will read past the end
 of the array
2024-09-09 07:54:11 -05:00
David
dacb452d47
Bugfix (#4660) 2024-09-09 07:16:58 -05:00
Thomas Göttgens
e985ee878f
Merge pull request #4658 from fifieldt/zombiegps
If GPS sleepTime is Zero, don't sleep.
2024-09-09 12:12:53 +02:00
Thomas Göttgens
b2e2f1dba3
Merge branch 'master' into AG3352 2024-09-09 11:10:36 +02:00
Tom Fifield
ebe1b40bee If GPS sleepTime is Zero, don't sleep.
At the moment if the result of sleepTime calculations comes out
to zero, we put the GPS into HARDSLEEP (losing all its status) and
then immediately make it ACTIVE again.

This patch avoids that toga.

fixes https://github.com/meshtastic/firmware/issues/4657
2024-09-09 09:28:04 +08:00
Tom Fifield
6217e97c41 Add support for AG3352 and fix AG3335 support
AG33352 is a Mediatek/Airoha GPS/GLONASS/Galileo/BeiDou receiver.
Patch adds relevant detection and setup code.

Thanks to Bluebrolly and kongduino for providing the relevant
information and testing.

This patch also fixes support for the A3335, which is a related chip.
The setup and detection code now works as tested on a real life
T-1000E!

Thanks to @gpsfan for the guidance.
2024-09-09 09:06:05 +08:00
Tom Fifield
e470619e3d
Remove undefined declaration (#4652)
The getNMEA method was introduced to the header but never defined
in code. As it's unused, remove it.
2024-09-08 12:33:56 -05:00
Jonathan Bennett
bf34329033
Adds the data bitfield and ok_to_mqtt bit (#4643)
* Don't filter PKI packets just for being encrypted.

* Add ok_to_mqtt config and bit

* Bitfield

* Adjust dontmqttmebro logic.

* Manipulate bitfield only in router.cpp

* Want_ack is not want_response

* Bitfield macros

* Use new Bitfield macro in MQTT.cpp

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-09-07 18:21:59 -05:00
Thomas Göttgens
8e88b9e819
Merge pull request #4646 from gitbisector/batt_stat
Report PWD when no battery present.
2024-09-07 10:58:17 +02:00
Tom Fifield
ba28ffb65a Simplify GNSS Probe code
This patch takes inspiration from our I2CDetect code where we have
many sensors that can be detected rather simply. It creates a new
macro,
PROBE_SIMPLE(Chip name, Command to run, response, Driver, timeout)

and converts existing simple cases to use this macro.
2024-09-07 11:59:45 +08:00
gitbisector
9651b5a0ec
Merge branch 'master' into batt_stat 2024-09-06 17:23:38 -07:00
git bisector
2f2ddae12a Report PWD when no battery present. 2024-09-06 17:19:53 -07:00
github-actions[bot]
c77b89d85c
[create-pull-request] automated change (#4645) 2024-09-06 18:51:22 -05:00
caveman99
b8cee51e84 [create-pull-request] automated change 2024-09-06 20:27:28 +00:00
Thomas Göttgens
35b47467c7
Merge pull request #4639 from zerolint/master
RAK13800 Ethernet improvements
2024-09-06 15:11:10 +02:00
Thomas Göttgens
8f35a42f4f
tryfix #4384 (#4642)
* tryfix #4384 - don't assume we want that functionality if the Accelerometer was found. This is only for T-Watch

* Add  config.display.wake_on_tap_or_motion default to RAK

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-09-06 06:55:56 -05:00
Ben Meadors
ee68e727ed
Merge branch 'master' into master 2024-09-06 06:25:07 -05:00
Robert Fisk
962d9ff220 Move defines to input broker 2024-09-06 11:54:31 +02:00
Robert Fisk
8e0a342f06 Gather canned message magic numbers into header defines. 2024-09-06 11:54:31 +02:00
Thomas Göttgens
55292f8a84
Merge pull request #4638 from fifieldt/CRLF
Add missing linefeeds to gps code
2024-09-06 11:46:57 +02:00
zerolint
d72a836e07 RAK13800 Ethernet improvements
Fixes (#3618) by allowing more time for slower requests.
Resolve Syslog not maintaining client causing issues on RAK13800.
Resolve Ethernet static IP setting subnet as gateway IP.
Reduce comment and log message ambiguity around API.
Remove duplicate #if !MESHTASTIC_EXCLUDE_WEBSERVER block.
2024-09-06 11:45:43 +02:00
Thomas Göttgens
26a3841a93
Merge pull request #4637 from todd-herbert/gps-icon
Update E-Ink GPS icon immediately when triple-pressing user button
2024-09-06 11:25:12 +02:00
Thomas Göttgens
011e640e95 Add LR11x0 firmware version to init. 2024-09-06 09:47:43 +02:00
Tom Fifield
e4e1ea971f Add missing linefeeds to gps code
As reported by @caveman99, the required CRLFs were missing from the
AG3335 setup code.
2024-09-06 08:45:57 +08:00
Todd Herbert
bcdc36c07c Refresh E-Ink to show changes in GPS icon 2024-09-06 11:25:41 +12:00
Thomas Göttgens
7c6454f171
bring 2.4G back in line with preset bandwidth (#4634) 2024-09-05 15:49:08 -05:00
Tom Fifield
9e55e6befb
Minor GPS fixes (#4630)
1. Remove unused line in GPS::probe
2. update new PositionModule::hasQualityTimeSource to handle
 MESHTASTIC_EXCLUDE_GPS
2024-09-05 06:16:06 -05:00
gitbisector
bb9ddcf2b5
Same priority packets processed in enqueue order (#4608)
* Same priority packets processed in enqueue order

* Prefer same prio pkts on mesh over new ones.

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-09-04 08:31:30 -05:00
Thomas Göttgens
ff40a3f120
fix RF switch for Tracker E (#4621)
* fix RF switch for Tracker E

* fix all flags for Radiolib

* hopefully fix LR1110

* update to latest radiolib master - thanks @GUVWAF
2024-09-03 14:21:40 -05:00
Thomas Göttgens
6fc4a1754b Radiolib API Changes 2024-09-03 13:12:39 +02:00
Thomas Göttgens
f9e513f4fd Merge branch 'Tracker-1000E' of github.com:meshtastic/firmware into Tracker-1000E
# Conflicts:
#	src/mesh/LR11x0Interface.cpp
2024-09-03 09:59:44 +02:00
Thomas Göttgens
7dad2286e2 trunk fmt 2024-09-03 09:58:27 +02:00
Thomas Göttgens
8598645931 - use setRfSwitchTable
- ditch Godmode
- fixes Signedness Error in Loop.
- add V3 factory erase for 7.3.0 softdevice
2024-09-03 09:26:41 +02:00
Tom Fifield
cdea602181
Remove unused define (#4620)
Neither RF95_DIO2 nor LORA_DIO2 are found anywhere in the code.
2024-09-02 20:08:02 -05:00
Ben Meadors
b526a3ad53
Own node should be favorited and have zero hops away (#4618) 2024-09-02 17:51:02 -05:00
Thomas Göttgens
2f0c19ebea - use setRfSwitchTable
- ditch Godmode
- fixes Signedness Error in Loop.
- add V3 factory erase for 7.3.0 softdevice
2024-09-02 15:06:06 +02:00
Thomas Göttgens
367d787d74
Merge branch 'master' into pr-fix4154 2024-09-02 10:24:31 +02:00
Thomas Göttgens
c8bf43de93
Merge pull request #4482 from dhskinner/BMP388
Add BMP388 as a new pressure and temp sensor
2024-09-02 10:23:57 +02:00
Thomas Göttgens
e543b61dd8 trunk fmt 2024-09-02 10:23:31 +02:00
Thomas Göttgens
719faf4f97 trunk fmt 2024-09-02 10:16:32 +02:00
Thomas Göttgens
3bf20dc3a6
Merge branch 'master' into pr-fix4154 2024-09-02 09:16:52 +02:00
David
d93425fde1
Merge branch 'master' into BMP388 2024-09-02 16:48:38 +10:00
Riley Nielsen
234e652a07 Fix switch 2024-09-01 20:43:56 -07:00
Riley Nielsen
cd16b7b00a fix display of degree symbol (+ other symbols) 2024-09-01 18:26:08 -07:00
GUVWAF
56223710b5
More priorities for different types of MeshPackets (#4606) 2024-09-01 10:29:53 -05:00
github-actions[bot]
e45a358de0
[create-pull-request] automated change (#4594)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-09-01 09:20:10 -05:00
Jonathan Bennett
b71e12c5e5
Phone admin work (#4599)
* Don't throw an error on the sessionkey admin tag

* Throw an error on packet sent to 0
2024-08-31 15:04:35 -05:00
David
eb1f80f520 Fix build issue with mutex 2024-08-31 19:40:54 +10:00
David
6c0911038a
Merge branch 'master' into BMP388 2024-08-31 18:18:26 +10:00
David
644e213b13 Added a singleton wrapper for bmp3xx 2024-08-31 18:15:33 +10:00
Ben Meadors
33eb073535
Ignore (from)Net time on positions with an unknown or fixed location source (#4593)
* Ignore (from)Net time on positions with an unknown or fixed location source

* Dunk a trunk
2024-08-30 19:02:48 -05:00
Ben Meadors
8729cdb699
Merge branch 'master' into pr-fix4154 2024-08-30 16:31:47 -05:00
GUVWAF
eb071ec80d
Set high priority for text messages (#4592) 2024-08-30 14:54:44 -05:00
github-actions[bot]
8144dcbc25
[create-pull-request] automated change (#4591)
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
2024-08-30 13:46:51 -05:00
Jonathan Bennett
2b0113ae82
Consider an admin timestamp to be higher quality than from net (#4589) 2024-08-30 06:02:48 -05:00
Manuel
6a24566efb
Lilygo T3S3 E-Paper support (#4569)
* t3s3 e-paper support

* remove GPS autodetect (which leads to crashes during startup when no GPS present)

* update EINK defines

* keep definitions for external GPS connector but disable GPS auto scan by default
2024-08-30 05:53:06 -05:00
Jonathan Bennett
5bc17a9911
Key regen and MQTT fix (#4585)
* Add public key regen

* Properly label and handle PKI MQTT packets

* Extra debug message to indicate PKI_UNKNOWN_PUBKEY

* Ternary!

* Don't call non-existant function on stm32

* Actually fix STM32 compilation
2024-08-29 16:28:03 -05:00
David
a1d0af6636
Merge branch 'master' into BMP388 2024-08-30 07:25:27 +10:00
Mark Trevor Birss
22454c95c7
[BOARD] Add Minewsemi MS24SF1 nRF52840 SX1262 Module (SoftDevice 7.3.0) (#4584)
* Update architecture.h

* Add files via upload

* Add files via upload

* Update variant.h

* Update variant.h

* Update variant.cpp

* Update variant.cpp

* Update variant.cpp
2024-08-29 16:17:44 -05:00
Thomas Göttgens
50631f96fc trunk fmt 2024-08-29 21:51:06 +02:00
And137
a6cc7041d3
Merge branch 'master' into polish-oled 2024-08-29 20:04:03 +02:00
Ben Meadors
171512d2f6 Fixed buzzer 2024-08-29 11:42:27 -05:00
David
47e1580a62 Integration test 2024-08-29 16:40:17 +02:00
David
fc1e60ac58 Initial upload 2024-08-29 16:40:17 +02:00
And137
f1f66cf54a
Merge branch 'master' into polish-oled 2024-08-29 12:54:06 +02:00
Jonathan Bennett
92eae39a1b
Move Time set from system to main (#4583) 2024-08-29 05:39:30 -05:00
Kevin Hester
dc9f6e1360 fix CI warnings (and change CI comment to be correct) 2024-08-28 11:25:54 -07:00
Ben Meadors
f5633bf0c5 Fix T1000-E default to turn on buzzer for Ext. Notification (#4575) 2024-08-28 11:25:54 -07:00
Ben Meadors
3ad0af5ce8 Fix super tiny T1114 tft font size and fork repo to fix compiler warnings (#4573) 2024-08-28 11:25:54 -07:00
Thomas Göttgens
94c3bb4a56 fix #4390 (#4571) 2024-08-28 11:25:54 -07:00
Power Li
cc93df27a5 set current time to system time in portduino build (#4556)
* set current time to system time in portduino build

* fix includes order

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2024-08-28 11:25:54 -07:00
Jonathan Bennett
e3ce3a3a4f Don't compare nodeDB macaddr to owner.macaddr, because in rare cases that may be unset. (#4562)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-08-28 11:25:54 -07:00
Jonathan Bennett
3c4d964334 Mask out random bits when doing queue ordering (#4561)
* Mask out random bits when doing queue ordering

* Parenthesis
2024-08-28 11:25:54 -07:00
Jonathan Bennett
574124aee5 Deal with admin_key being repeated (#4558) 2024-08-28 11:25:54 -07:00
John Milton
1fe80e0f30 Add support for Adafruit Feather RP2040 with RFM95. (#4451)
* Add support for Adafruit Feather RP2040 with RFM95.

* Update mesh.pb.h

dropping this change from the file generated by the protobuf

* Update mesh.pb.h

remove these reverting changes

* Update mesh.pb.h

oops, missed a comma
2024-08-28 11:25:54 -07:00
Ben Meadors
927a35ef51 Protos 2024-08-28 11:25:54 -07:00
Ben Meadors
c11a66030f Userlite mem comparison (#4552) 2024-08-28 11:25:54 -07:00
github-actions[bot]
059d5582d1 [create-pull-request] automated change (#4544)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-08-28 11:25:54 -07:00
geeksville
9631a1be38 remove deprecated serial/bt logging options and unify in the new (#4516)
security option.  Per discussion in https://github.com/meshtastic/firmware/issues/4375
no need to preserve the old options when changing to this new simpler
single boolean because they were newish, rarely used and only for 'advanced'
developers.
2024-08-28 11:25:54 -07:00
Kevin Hester
8a9cc727a8 for #4154 use a binary gpio transformer to manage vext on heltec-tracker (saves power) 2024-08-28 11:25:54 -07:00
Kevin Hester
cdafa87cef add lateInitVariant() as a concept. see below for docs
(from src/extra_variants/README.md)

This directory tree is designed to solve two problems.

- The ESP32 arduino/platformio project doesn't support the nice "if initVariant() is found, call that after init" behavior of the nrf52 builds (they use initVariant() internally).
- Over the years a lot of 'board specific' init code has been added to init() in main.cpp. It would be great to have a general/clean mechanism to allow developers to specify board specific/unique code in a clean fashion without mucking in main.

So we are borrowing the initVariant() ideas here (by using weak gcc references). You can now define lateInitVariant() if your board needs it.

If you'd like a board specific variant to be run, add the variant.cpp file to an appropriately named
subdirectory and check for \_VARIANT_boardname in the cpp file (so that your code is only built for your board).
You'll need to define \_VARIANT_boardname in your corresponding variant.h file.
See existing boards for examples.

This approach has no added runtime cost.
2024-08-28 11:25:54 -07:00
Kevin Hester
5ce5b7b08b Older variant.h files (IMO sloppily) don't define VEXT_ON_VALUE
But in an attempt to avoid updating lots of files, make it default to LOW
2024-08-28 11:25:54 -07:00
Ben Meadors
b285aa5bd6 Dum dum zero comparision 2024-08-28 11:25:54 -07:00
Ben Meadors
9de0b7cfac Found more places to set explicit has_optional on position (#4542) 2024-08-28 11:25:54 -07:00
Ian McEwen
fe9a80a4e0 Use the '+' wildcard for MQTT rather than '#', to subscribe only to topics one nesting level deep (#4528) 2024-08-28 11:25:54 -07:00
Michael Gjelsø
de41a054b0 Initial support for RadioMaster Bandit. (#4523)
* Initial support for RadioMaster Bandit.

* Different lighting can be made for Button 1 & 2 on the Bandit.
Changes to AmbientLighting will turn off af shutdown().

* Trunk

* Trunk again.
2024-08-28 11:25:54 -07:00