Commit Graph
4753 Commits
Author SHA1 Message Date
Thomas GöttgensandGitHub a39280e9df Merge pull request #4893 from meshtastic/softSleep
Only check hardsleep threshold if GPS softsleep is supported
2024-09-28 11:35:57 +02:00
GUVWAF 48fa9f2242 Only check threshold if GPS softsleep is supported 2024-09-28 09:34:37 +02:00
Ben MeadorsandGitHub 8efc15f4d9 Ignore seen phoneapi packets (#4888)
* Ignore PhoneAPI packet if it's been seen

* ignoramus

* Also keep track of the last 20 packet IDs

* Fill

* Make this match the nimble one

* Add the log too

* Ignore zero ID packets

* Remove message entirely

* TRunkt
2024-09-27 20:09:53 -05:00
Ken PiperandGitHub 0e0811eccd Implement GPIO pin allowlist (#4882) 2024-09-27 19:31:05 -05:00
fd1b68513a Add sx126x_ant_sw for Native (#4887)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-09-27 19:29:44 -05:00
Jonathan BennettandGitHub ef223b1195 use delete[] to avoid leaking memory (#4883) 2024-09-27 14:55:55 -05:00
Ben Meadors 30356dcd97 Retroactive trunkinate 2024-09-26 19:46:17 -05:00
Jonathan BennettandGitHub 5f6d9c3e27 Add pkc test (#4878)
* Add a second delay() to get the unit tests running on Rak4631

* Add test_PKC_Decrypt

* Remove cruft from test case
2024-09-26 19:33:08 -05:00
4794cdb120 Fix (some ?) memory alignment issues on the crypto part - resulting in crashes or strange behavior (#4867)
* Replace multiple potentially non aligned pointer dereference (#4855)
First step to fix some Crypto crashes or strange behaviors

* Makes the two Crypto byte buffers aligned (#4855)
Fix #4855, and probably multiple Crypto problems depending on hardware

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
2024-09-26 17:44:11 -05:00
Thomas Göttgens 8f84a96b69 refactor: typo fix in macro definition 2024-09-26 12:12:08 +02:00
Ben Meadors 9bebad2dbe Trunkt 2024-09-25 19:54:14 -05:00
SzetyaandGitHub 14019f2afa Update WaypointModule.cpp (#4870)
In INVERTED display mode, the compass ring was not visible.
2024-09-25 19:09:27 -05:00
Thomas GöttgensandGitHub 12481b568a fix a lot of nuisances reported by cppcheck (#4872)
* fix a lot of nuisances reported by cppcheck

* fix portduino
2024-09-25 19:09:06 -05:00
Thomas GöttgensandGitHub 118809fbfc Account for size of Envelope when allocating buffer. (#4819)
* Account for size of Envelope when allocating buffer.

INFO  | 09:29:20 568 [mqtt] Subscribing to msh/2/e/LongFast/+
INFO  | 09:29:20 568 [mqtt] Subscribing to msh/2/json/LongFast/+
INFO  | 09:29:20 568 [mqtt] Subscribing to msh/2/e/PKI/+
DEBUG | 09:29:20 568 [mqtt] Publishing enqueued MQTT message
ERROR | 09:29:20 568 [mqtt] Panic: can't encode protobuf reason='bytes size exceeded'

assert failed: size_t pb_encode_to_bytes(uint8_t*, size_t, const pb_msgdesc_t*, const void*) mesh-pb-constants.cpp:18 (0)

* save some mem
2024-09-25 17:13:04 -05:00
Ben MeadorsandGitHub baf9cf5a59 Encapsulate RadioLibInterface receive IRQ logic (#4866)
* Encapsulate RadioLibInterface receive IRQ logic

* More concise

* Trunk
2024-09-25 16:19:18 -05:00
Ben MeadorsandGitHub 3a2fa118a2 Merge branch 'master' into detsensor_broadcast_changes 2024-09-25 13:57:49 -05:00
Thomas GöttgensandGitHub d4e8452c60 Tbeams have no ADC (#4871) 2024-09-25 13:51:11 -05:00
Ben MeadorsandGitHub 4128d75ad4 IS_ONE_OF macro to make long chains of conditions more concise and easy to follow (#4860)
* Is one of macro

* Moar

* Whoops

* Trunk

* isOneOf function backed macro
2024-09-25 13:50:00 -05:00
Augusto Zanellato ed4527cfa5 address review comments 2024-09-25 20:02:22 +02:00
Ben Meadors a7c379961a New detection sensor trigger type value 2024-09-25 07:01:15 -05:00
Ben MeadorsandGitHub 02d9d8b76c Merge branch 'master' into detsensor_broadcast_changes 2024-09-25 06:30:09 -05:00
todd-herbertandGitHub d1138d51e5 Wrangle module frames with I2C keyboard (#4817)
* Only suppress UI nav if module using keyboard input

* CardKB combo to dismiss text message and waypoint
Currently assigned to Fn + Delete
2024-09-25 06:27:04 -05:00
Ben MeadorsandGitHub 31e952c72e Merge branch 'master' into detsensor_broadcast_changes 2024-09-25 06:26:14 -05:00
9d7938f570 [create-pull-request] automated change (#4865)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-09-25 06:25:56 -05:00
9456c42fc0 Refactor AccelerometerThread.h (#4831)
* Initial upload

* Tidy up

* Update ICM20948Sensor.cpp

* Update AccelerometerThread.h

* Initial upload

* Tidy up

* Update ICM20948Sensor.cpp

* Update AccelerometerThread.h

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-09-25 06:25:31 -05:00
40b3dbaa70 Add MAX17048 lipo fuel gauge (#4851)
* Initial commit

* Update MAX17048Sensor.cpp

* Update EnvironmentTelemetry.cpp

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-09-25 05:34:53 -05:00
1293c5cdd4 Support for Seeed XIAO S3 Board (#4850)
* feat: add seeed-xiao-s3 board defination and pins defination

* chore:  add SEEED XIAO S3 into mesh pb

* fix: fix trunk fmt check failed

* Trunk fmt variant.h

* Restore automatically generated file

---------

Co-authored-by: Tom Fifield <tom@tomfifield.net>
2024-09-25 18:27:14 +08:00
caveman99andgithub-actions[bot] f73aa8aa82 [create-pull-request] automated change 2024-09-25 08:28:33 +00:00
Thomas GöttgensandGitHub 65104d5d8c fix #4844 (#4859) 2024-09-24 16:51:07 -05:00
Augusto ZanellatoandGitHub 881f133021 Merge branch 'master' into detsensor_broadcast_changes 2024-09-24 23:00:35 +02:00
Tom FifieldandGitHub adb094ebc9 Remove old comments from main (#4849)
These comments were circa 4 years old. Remove them.
2024-09-24 06:08:32 -05:00
b709d47832 Fix Ublox M10 Setup (#4842)
There is no EXTINT pin available on the Tdeck, which uses
the Ublox M10 GPS. Therefore our previous hack to use that pin
makes the GPS not work. That workaround was implemented to
fix sleep issues which have now since been fixed with the
state machine.

This patch restores the state prior to the hack, which is
known-working.

Additionaly, it was discovered that M10s hate it when you
try and save to non-extistent eeprom/SPI flash.

This patch creates a new SAVE command for the M10 that fixes
this issue.

Many thanks to @MisterC925 whose report and testing was
essential for this fix.

fixes https://github.com/meshtastic/firmware/issues/4625

Co-authored-by: Ken McGuire <kenm@paonia.com>
2024-09-24 05:50:03 -05:00
Augusto ZanellatoandGitHub 01d42d4728 Merge branch 'master' into detsensor_broadcast_changes 2024-09-24 11:53:41 +02:00
Augusto Zanellato ce480ae626 fix comment style 2024-09-24 11:16:04 +02:00
Augusto Zanellato 139686d639 bump protobufs 2024-09-24 11:11:16 +02:00
Jonathan BennettandGitHub c39d270f40 Build message in printBytes, to not spam BLE log (#4843) 2024-09-24 12:41:28 +08:00
Tom FifieldandGitHub 428a567078 Wire 1 is PIN_WIRE1_SDA (#4840)
Based on #4745, PIN_WIRE1_SDA is the 'second' wire interface.

This pach amends the check to determine whether a device has two
wire interfaces should use PIN_WIRE1_SDA, rather than PIN_WIRE_SDA.
2024-09-23 19:16:44 -05:00
Ben Meadors 0ad1f776ae Manually regen protos for now 2024-09-23 18:53:01 -05:00
Ben MeadorsandGitHub e78c706999 Fix RAK4631 accelerometer (#4837) 2024-09-23 18:40:54 -05:00
Ben Meadors c442cd7267 Remove some straggler now 2024-09-23 15:53:42 -05:00
Ben MeadorsandGitHub 9cbabb0468 Teardown bluetooth phoneAPI better and fix client notification issue (#4834)
* Teardown bluetooth phoneAPI better and fix client notification issue

* Fix client notification draining
2024-09-23 15:51:05 -05:00
Jonathan BennettandGitHub 9a7a4d3814 Check for null before printing debug (#4835) 2024-09-23 13:56:26 -05:00
fa1cc59841 Rename message length headers and set payload max to 255 (#4827)
* Rename message length headers and set payload max to 255

* Add MESHTASTIC_PKC_OVERHEAD

* compare to MESHTASTIC_HEADER_LENGTH

---------

Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
2024-09-23 09:20:32 -05:00
Augusto Zanellato d4dc4dec76 Merge branch 'master' into detsensor_broadcast_changes 2024-09-23 16:20:20 +02:00
Augusto Zanellato be01c18c74 DetectionSensor: more flexible triggering 2024-09-23 16:15:44 +02:00
e8829b8f52 Refactor and consolidate time window logic (#4826)
* Refactor and consolidate windowing logic

* Trunk

* Fixes

* More

* Fix braces and remove unused now variables.

There was a brace in src/mesh/RadioLibInterface.cpp that was breaking
compile on some architectures.

Additionally, there were some brace errors in
src/modules/Telemetry/AirQualityTelemetry.cpp
src/modules/Telemetry/EnvironmentTelemetry.cpp
src/mesh/wifi/WiFiAPClient.cpp

Move throttle include in WifiAPClient.cpp to top.

Add Default.h to sleep.cpp

rest of files just remove unused now variables.

* Remove a couple more meows

---------

Co-authored-by: Tom Fifield <tom@tomfifield.net>
2024-09-23 08:58:14 -05:00
Todd Herbert 1487ca2a30 Tidier macros 2024-09-24 00:25:43 +12:00
Todd Herbert 11598beb16 Implement optional second I2C bus for NRF52840
Enabled at compile-time if WIRE_INFERFACES_COUNT defined as 2
2024-09-24 00:25:43 +12:00
Tom FifieldandGitHub 1f8aa1efc7 Minor fix (#4666)
* Minor fixes

It turns out setting a map value with the index notation causes
an lookup that can be avoided with emplace. Apply this to one line in
the StoreForward module.

Fix also Cppcheck-determined highly minor performance increase by
passing gpiochipname as a const reference :)

The amount of cycles used on this laptop while learning about these
callouts from cppcheck is unlikely to ever be more than the cycles
saved by the fixes ;)

* Update PortduinoGlue.cpp
2024-09-23 18:22:06 +08:00
Jonathan Bennett 18aac0ba25 Consider the LoRa header when checking packet length 2024-09-22 16:09:46 -05:00