Commit Graph

1609 Commits

Author SHA1 Message Date
Ben Meadors
4720b2874f
Cpp-check warnings cleanup (#3014)
* cpp-check warnings cleanup

* Supressions and more fixes
2023-12-14 07:35:46 -06:00
Ben Meadors
9f85279e74
Lost and found mode (#3012)
* Lost and found WIP

* 5 minutes

* ASCII bell character correction

* Memory
2023-12-13 17:43:20 -06:00
Jonathan Bennett
2ebaea317a
Refactor display handling add Raspbian TFT display (#2998)
* Refactor display handling add Raspbian TFT display

* Add missed change

* Add static casts

* Add missed TFT refactor for RAK14014

* Add missed GPIO configuration

* Adds Native keyboard input option

* Get the ifdefs right

* CannedMessage send via queue, not run immediately.

* Fixup systemd service file

* Add display blanking for Raspberry Pi

* Add a couple missed key definitions

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-12-12 20:27:31 -06:00
Ben Meadors
d14d2c89c3
RTTTL ringtones on T-Deck / T-Watch S3 and potentially more I2S audio enabled devices (#2917)
* WIP

* ESP8266 SAM fun

* I2S audio / ext. notification module

* Remove

* Protos

* Add use_i2s_as_buzzer from protos

* Fixes

* Stuff

* Thing

* Ext. Notification working(ish)

* Remove SAM commented code

* Trunk upgrade

* Trunk

* Fixes

* Slow not fast... :-|

* T-Deck and T-Watch don't use normal buttons

* Stop ext. notification nagging with touchscreen as well

* Add button gpio back for T-Deck, but guard against long-press during ext. notification

* Ext. notification wrap up

* Better place to guard against long-press false positives

* Adjust default gain and guard against non-i2s devices referencing audio-thread

* Simplify guard logic with a boolean

* Supress uninitMemberVar

* Protos merge got out of wack

* Trunk resolution

* Remove extra crap

* Cleanup and thread-interval

* Default to alert message buzzer and add nag timeout

* Formatting
2023-12-12 08:36:37 -06:00
Thomas Göttgens
d952da8b1e make sure the queue stays in te same order
the memory pool can NOT be iterated easily, since it's not a linear object.
2023-12-11 15:44:32 +01:00
Thomas Göttgens
385b29c977 we don't use the static MemoryPool anywhere, ditch dead code. 2023-12-11 15:35:22 +01:00
Thomas Göttgens
dc309f61e8 Look into tophone queue for the received packet.
- only works if we don't have a phone connected, but that is probably dsired
- this will send a copy of device-originating text messgaes to a connected phone. Breaking change.
- this will iterate the tophone queue by deconstructing and reconstructing it every time we look for an ID. Probably also mangles the queue oder since it aborts when a ID is found.
- Can we navigate the packet pool instead? If so, how?
- Let's keep this in draft state for now
2023-12-11 15:11:10 +01:00
github-actions[bot]
17f1a450b2
[create-pull-request] automated change (#2995)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-12-06 18:14:41 -06:00
GUVWAF
ba021c97b2
Pico W: Handle Wi-Fi reconnects and update core (#2994)
* Fix time lost on the Pico W right after NTP
Shouldn't check for `#ifdef` as it will always be defined, but might be set to 0

* Handle reconnect for Wi-Fi on RP2040

* Update arduino-core for Wi-Fi + FreeRTOS fixes

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-12-06 15:49:56 -06:00
Ben Meadors
b4ad6b0f41
Added client-hidden role behavior (#2992)
* Added client-hidden role behavior

* Trunkt

* That line got all boogered up
2023-12-06 14:04:09 -06:00
Ben Meadors
28502a762f
Added Known-Only rebroadcast mode behavior (#2993) 2023-12-06 14:02:41 -06:00
github-actions[bot]
89f0464233
[create-pull-request] automated change (#2991)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-12-06 06:17:50 -06:00
GUVWAF
46d02affe8
Pico W: Wi-Fi improvements (#2989)
* Pico W: Initial WiFi support: connects, but freezes after a while

* Update arduino-pico core to fix hang with Wi-Fi

* Add `picow` to workflow since it's different from `pico` now

* Show Wi-Fi frame on screen for all devices with Wi-Fi

* Pico W: Disable mDNS as it's unsupported with FreeRTOS

* Fix printing IP address

* Fix Raspbian build
2023-12-04 15:45:07 -06:00
GUVWAF
6ff61b3e04
Pico W: Initial Wi-Fi support (#2980)
* Pico W: Initial WiFi support: connects, but freezes after a while

* Update arduino-pico core to fix hang with Wi-Fi

* Add `picow` to workflow since it's different from `pico` now
2023-12-02 14:47:52 -06:00
S5NC
2544733ad4
Standardise order for setting GPIO pin default values (#2942)
* Update SX126xInterface.cpp

* Update GPS.cpp

* Update TFTDisplay.cpp

* Update SX128xInterface.cpp

* Update EInkDisplay2.cpp

* trunk fmt

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
2023-12-02 07:40:31 -06:00
Thomas Göttgens
1b6c11c5f1
tryfix crash (#2964)
* tryfix crash

* only use this when wifi is not enabled. (poking around)

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-12-02 07:00:20 -06:00
Ben Meadors
a05bab35ad = 2023-12-01 07:17:38 -06:00
Ben Meadors
ac506a581c
Merge branch 'master' into g2-defaults 2023-12-01 07:07:59 -06:00
Ben Meadors
def4ec5822
Always set user (nodeinfo) role to device config's current role (#2973) 2023-12-01 07:00:19 -06:00
Ben Meadors
209fb585b0 Default to what G2 comes with 2023-11-30 20:49:00 -06:00
Thomas Göttgens
6fa026a78b fix radiolib API for 6.3.0 release 2023-11-30 10:59:01 +01:00
Jonathan Bennett
d10b1e1d00 Add better error reporting for RF95 init failure 2023-11-29 20:19:10 -06:00
Ben Meadors
1feb74f525
Add number of sats to default position flags (#2962) 2023-11-25 19:34:30 -06:00
Ric In New Mexico
57542ce9e6
Retain device nodeinfo during reset-nodedb (#2951)
* INA3221 bugfixes & refinement
Reorganized and refactored some INA3221 code
Added comments
Added missing shunt resistor value (100mΩ)
Added INA3221 Channel 1 to getINAVoltage() for device battery monitoring
	modified:   src/Power.cpp
	modified:   src/modules/Telemetry/PowerTelemetry.cpp
	modified:   src/modules/Telemetry/Sensor/INA3221Sensor.cpp
	modified:   src/modules/Telemetry/Sensor/INA3221Sensor.h
	modified:   src/power.h

* reset-nodedb retain device nodeinfo
	modified:   src/mesh/NodeDB.cpp

* reset-nodedb #2
	modified:   src/mesh/NodeDB.cpp

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2023-11-20 06:33:14 -06:00
Jonathan Bennett
4af90eeb39 Revamp yaml config for Raspbian 2023-11-19 14:53:49 -06:00
Ben Meadors
46bd6ca7ba
YAML based config for PI / Portduino (#2943)
* Add configuration via /etc/meshtastic/config.yaml

* Move example config, support more locations

* Fix config check

* Use access() to check for config file presence

* Throw an error and exit on radio init fail

* Adds error check for reading Bluetooth MAC

* Settle on meshtasticd, add install script

* Shell fixes

* Fine. I'll put it back and then disable you

* Get wrekt, shellchekt

* Firat attempt at adding raspbian CI build

* Tickle the workflow

* Beatings will continue til morale improves

* Permissions are overrated

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2023-11-18 08:12:34 -06:00
Ben Meadors
f2210d8f8d
Merge branch 'master' into raspi-portduino 2023-11-16 06:57:52 -06:00
Ben Meadors
5d917885df
Added Remove node by nodenum admin message (#2941)
* Remove node by nodenum

* It were backerds! DERP
2023-11-16 06:57:22 -06:00
Jonathan Bennett
a144d5d6cc Clean up, fix reboot, minimize changes 2023-11-15 20:33:53 -06:00
S5NC
0b9accc3b6
Remove redundant checks for power of 0 (#2934)
* Add comment explaining necessity for second 0 check

Thank you @GUVWAF

* Update RF95Interface.cpp

* Update STM32WLE5JCInterface.cpp

* Update SX126xInterface.cpp

* Update SX128xInterface.cpp

* remove whitespace...

* Update SX128xInterface.cpp
2023-11-13 06:19:02 -06:00
Ben Lipsey
600541ac25
Fix Documentation Links in Comments (#2929)
* update external notification

* ContentHandler
2023-11-06 22:03:44 +00:00
Ben Meadors
4a6cc8fd8c
Extend packet history expire time to 10 minutes (#2921) 2023-11-03 15:43:26 -05:00
github-actions[bot]
527bffb7e0
[create-pull-request] automated change (#2926)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-11-03 06:36:24 -05:00
GUVWAF
4c35a7fb7d
Handle AmbientLighting Module config (#2923) 2023-11-03 07:36:36 +00:00
GUVWAF
0f9936a0e0
Change default Coding Rate to 4/5 for <=LongFast (#2920)
Increases througput at the cost of a little bit of sensitivity
Non-breaking as the CR is sent in the LoRa header
2023-11-02 09:21:07 -05:00
GUVWAF
8b8fffda81
Drop packets if toPhoneQueue is full, unless it's text/RangeTest (#2918) 2023-10-30 06:12:22 -05:00
Andre K
e6b20bff77
refactor: simplify MQTT defaults (#2893)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-10-15 18:56:47 -05:00
Ben Meadors
f4b40562d3
Start of TAK role (#2890)
* Start of TAK role

* Position flags change for CoT friendly altitudes

* Trunk
2023-10-14 06:49:38 -05:00
github-actions[bot]
9e203532d0
[create-pull-request] automated change (#2889) 2023-10-13 20:02:59 -05:00
Ben Meadors
092c6cac66
Convert from inline to static class methods (#2883) 2023-10-11 06:17:05 -05:00
Ben Meadors
87396d9105
Refactor away some code duplication in screen frames and display formatter for modem presets (#2872)
* Refactor away some duplication

* Refactor preset names to display formatter method

* Remove unused screen brightness adjustment and extract wifi disconnect reason name to display formatter method

* Tronk

* Let's be more clear with this naming

* Effed

* DisplayFormatters static class and use native wifi disconnect reason names method

* git mv file so casing should match now

* Include titlecase

* Trunk
2023-10-09 20:43:16 -05:00
Ben Meadors
10265aabd5
Fix buggy phone positions (#2876)
* Guard-clause channel util. to reduce nesting

* Try-fix PhoneAPI position not updating

* Trunk

* Missed it

* Really disable GPS when asked to

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2023-10-09 18:33:04 -05:00
github-actions[bot]
3ddad671a5
[create-pull-request] automated change (#2875)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-10-08 08:12:42 -05:00
Ben Meadors
a6e4402e41
Screen on secs router default (#2855) 2023-10-02 06:28:05 -05:00
github-actions[bot]
6ebec8fcd9
[create-pull-request] automated change (#2849)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-09-30 20:40:04 -05:00
S5NC
4e3576ae48
Simplify SX126x variant configuration (#2813)
* Update SX126xInterface.cpp

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update SX126xInterface.cpp

* Update SX126xInterface.cpp

* Update variant.h

* Update variant.h

* trunk fmt

* trunk fmt

* Update variant.h

* trunk fmt

* trunk fmt

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update pins_arduino.h

* Update pins_arduino.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* trunk fmt

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* trunk fmt

* trunk fmt

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

Specify behavior

* Update variant.h

Maintain behavior

* trunk fmt

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

* Update variant.h

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-09-27 16:01:40 -05:00
Ben Meadors
ad529924f1
Code duplication cleanup for smart position logic (#2840) 2023-09-27 10:32:35 -05:00
github-actions[bot]
47301a5ac0
[create-pull-request] automated change (#2836)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-09-26 11:11:54 -05:00
Ben Meadors
0d023ea215
Revert "Fix compression (#2806) (#2819)" (#2835)
This reverts commit cdac643749.
2023-09-26 07:02:06 -05:00
Andre K
61f6fb22c5
move STATE_SEND_METADATA to beginning of wantConfig (#2820)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-09-24 07:22:54 -05:00
github-actions[bot]
db7b77c76e
[create-pull-request] automated change (#2823)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-09-24 07:01:46 -05:00
GUVWAF
cdac643749
Fix compression (#2806) (#2819)
* Fix compression: encode to bytes after `decoded` is modified

* Change payload size to decompressed length

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-09-24 06:49:21 -05:00
Jonathan Bennett
1a2c7f00e1
Gps cleanup and powersave (#2807)
* Refactor GPS to not probe if pins not defined

* Use Named Constructor to clean up code

* Move doGPSPowerSave to GPS class

* Make sure to set GPS awake on triple-click

* Cleanup and remove dead code

* Rename GPS_PIN_WAKE to GPS_PIN_STANDBY

* Actually put GPS to sleep between fixes

* add GPS_POWER_TOGGLE for heltec-tracker and t-deck

* Change GPS_THREAD_INTERVAL to 200 ms

* More dead code, compiler warnings, and add returns

* Add Number of sats to log output

* Add pgs enable and triple-click config

* Track average GPS fix time to judge low-power time

* Feed PositionModule on GPS fix

* Don't turn off the 3v3_s line on RAK4631
when the rotary is present.

* Add GPS power standbyOnly option

* Delay setting time currentQuality
to avoid strange log message.

* Typos, comments, and remove unused variable

* Short-circuit the setAwake logic on GPS disable

* heltec-tracker 0.3 GPS power saving

* set en_gpio to defined state

* Fix fixed_position logic with GPS disabled

* Don't process GPS serial when not isAwake

* Add quirk for Heltec Tracker GPS powersave

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
2023-09-23 23:45:35 -05:00
caveman99
0a12d67d19 [create-pull-request] automated change 2023-09-19 10:45:28 +00:00
github-actions[bot]
e8970ad66b
[create-pull-request] automated change (#2810)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-09-18 13:26:09 -05:00
code8buster
f737ee59ec
Deny maxhops to anyone who sets >7 (#2808)
* Deny maxhops to anyone who sets >7

* Use reliable hop count instead of 3
2023-09-18 12:58:09 -05:00
Manuel
1bae926576
fix: nodenum 4 (#2798)
* tryfix: nodenum 4

* trunk fmt

* rename vars and fix brackets

* purge invalid db entries

* trunk fmt
2023-09-18 06:16:37 -05:00
Ric In New Mexico
822c150e0d
Fixing typo in src/mesh/mesh-pb-constants.cpp logging (#2800)
* Update variant.h

Add second i2c channel on external connector for Station G1

* Create trunk-check.yml

* Fix typo in logging

Corrected typo in pb_msgdesc logging for packets failing to be decoded.

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-09-16 15:24:59 -05:00
github-actions[bot]
b53cb38a09
[create-pull-request] automated change (#2790)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-09-12 16:50:52 -05:00
Ben Meadors
c608f0ba81
Fix time=0 bug for fixed_position nodes (#2789) 2023-09-12 15:54:50 -05:00
github-actions[bot]
e256520336
[create-pull-request] automated change (#2782)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-09-08 14:34:58 -05:00
Ben Meadors
dcdf9b64de
Ambient lighting (#2779)
* This was already defined and throwing a ton of warnings

* Ambient lighting module feature

* Use local instance type
2023-09-07 12:24:47 -05:00
github-actions[bot]
3bcab0e223
[create-pull-request] automated change (#2768)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-09-04 18:38:58 -05:00
Ben Meadors
ad40493a39
Add speed, heading, and DOP to default position flags (#2759)
* Add speed and heading

* Add DOP
2023-09-04 06:46:27 -05:00
Ben Meadors
03dc36ea12
Use fixed position regardless of gps lock (#2744) 2023-08-24 10:55:49 -05:00
github-actions[bot]
5453e4d123
[create-pull-request] automated change (#2742)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-08-22 17:11:22 -05:00
Ben Meadors
5d78795065
Portnum promiscuity for text messages from other modules (#2732)
* Add interested portnums to TextMessageModule

* Send Detection Sensor Module messages on its own portnum

* Add to Ext. Notification and consolidate logic

* RANGE_TEST_APP portnum for RangeTestModule
2023-08-19 07:46:34 -05:00
github-actions[bot]
2dbdda204f
[create-pull-request] automated change (#2731)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-08-18 10:17:55 -05:00
Ben Meadors
144dfe9805
Initial Detection sensor module feature (#2722)
* WIP

* Updates

* Doh!

* Move it out of the macro guard so portduino can build

* Changes from feedback
2023-08-14 19:00:51 -05:00
Ben Meadors
6e0b6684ee
Extend node max to 100 and remove mesh_sds_timeout_secs (#2713)
* Extend node max to 100 and remove mesh_sds_timeout_secs

* Const pointers for you and you and you

* Fixes and supressions

* Missed it

* uint

* Resize

* Derp
2023-08-12 09:29:19 -05:00
Manuel
84ddfea491
try-fix: max nodes crash during boot (#2712)
* try-fix: nodenum crash during boot

* Revert "try-fix: nodenum crash during boot"

This reverts commit 632012e197.

* try-fix: max nodes crash during boot

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-08-12 09:28:58 -05:00
Ben Meadors
23fb377fd7
Don't cancel sending "seen" messages on MQTT enabled nodes (#2690) 2023-08-08 06:27:26 -05:00
Ben Meadors
dc31024764 Merge remote-tracking branch 'origin/master' into 2.2-working-changes 2023-08-07 13:24:10 -05:00
Ben Meadors
5bbcb40f7a Updated protos 2023-08-07 13:23:21 -05:00
caveman99
1afe9f75bd [create-pull-request] automated change 2023-08-07 19:46:28 +02:00
Thomas Göttgens
f5d323fdd3 trunk fmt 2023-08-06 16:21:39 +02:00
Thomas Göttgens
568cc259af Don't crash when no radio detected. 2023-08-06 16:21:39 +02:00
Ben Meadors
cfe5c7f31d
Tweaking Power FSM states (#2676)
* Tweaking Power FSM states

* Turn bluetooth back on after serial disconnected

* Remove references to deprecated mesh_sds_timeout_secs
2023-08-04 06:01:01 -05:00
GUVWAF
e05c8e60d9 Save Neighbors to flash 2023-08-02 20:56:24 +02:00
Ben Meadors
11be856507
Merge branch 'master' into 2.2-working-changes 2023-08-01 21:00:58 -05:00
Ben Meadors
191a69dd26
Don't create potential NodeInfo storm on telemetry reponse from Repeater (#2673)
* Don't create potential NodeInfo storm on telemetry reponse from Repeaters

* Check decoded
2023-08-01 18:24:40 -05:00
github-actions[bot]
b799b7bf62
[create-pull-request] automated change (#2672)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-07-31 18:51:15 -05:00
Ben Meadors
90ec8eae6c Backmerge master protos 2023-07-31 18:28:27 -05:00
GUVWAF
297708a50b Manually update protos 2023-07-30 17:27:43 +02:00
Ben Meadors
97d7a89644 Update protobufs 2023-07-30 07:58:11 -05:00
Ben Meadors
5aedd84c7d
Merge branch 'master' into 2.2-working-changes 2023-07-29 08:15:17 -05:00
Ben Meadors
3d697f8cf4
Enable SX126X RX Boosted gain by default (#2663) 2023-07-28 10:39:40 -05:00
Ben Meadors
0eefd0912f Move node_broadcast_interval_secs 2023-07-28 10:28:14 -05:00
Ben Meadors
2cf648928a Add node_broadcast_interval_secs to Neighbor 2023-07-28 06:43:21 -05:00
Andre K
3cd7d8d6af
update min_app_version to 2.2.0 2023-07-28 06:22:16 -03:00
Ben Meadors
702a83b525 Bumb device state version 2023-07-27 16:03:57 -05:00
Ben Meadors
0141bbe772 Regen 2023-07-27 12:59:06 -05:00
Ben Meadors
049c587ca2 Add phoneapi plumbing. Need to regen protos on my other machine 2023-07-27 12:51:31 -05:00
Thomas Göttgens
ff11506922
Merge pull request #2649 from meshtastic/neighborinfo
add Neighborinfo
2023-07-26 13:07:01 +02:00
Ben Meadors
f35b422365 Trunk 2023-07-25 20:54:01 -05:00
Ben Meadors
08f1ac785a Gut NodeDb and remove deprecated protos 2023-07-25 19:13:19 -05:00
Ben Meadors
146ed067a1
Merge branch 'master' into neighborinfo 2023-07-25 16:14:50 -05:00
github-actions[bot]
81edf363d7
[create-pull-request] automated change (#2645)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-07-25 05:46:11 -05:00
Ben Meadors
2e7c95a110
Merge branch 'master' into neighborinfo 2023-07-24 07:24:34 -05:00
github-actions[bot]
fb21bfe0f5
[create-pull-request] automated change (#2635)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-07-22 09:37:51 -05:00
Ben Meadors
0739bc0cea
T-Watch S3 Support (#2632)
* T-Watch WIP

* Updates

* Temp

* Update screen spi bus and and backlight en

* Peripherals progress

* Fixes

* Fixes

* Updates

* DRV scaffolding

* Fixed touch-screen driver selection. WIP on DRV haptic feedback

* DRV2605 pmu channel

* Trunk

* Fixes and defaults

* Dropped an s

* Move PMU and turn off screen that way

* Add t-deck and t-watch-s3 to CI and cleanup

* More cleanup
2023-07-22 09:26:54 -05:00
Ben Meadors
3a24882e76
Merge branch 'master' into neighborinfo 2023-07-22 08:46:27 -05:00
andrew-moroz
1c74479555
xiao-ble: add initial support for the Xiao BLE + Ebyte E22-900M30S (#2633)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-07-21 20:37:00 -05:00
Manuel
2486892e6d
Basic T-Deck support (#2630)
* add hwid for auto-detection

* fix: heltec-wireless-tracker USB serial

* T-Deck support

* trunk fmt

* set FRAMERATE to 1

* fix some defines

* trunk fmt

* corrected vendor link
2023-07-19 08:13:51 -05:00
github-actions[bot]
69beef8310
[create-pull-request] automated change (#2625)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-07-18 06:19:37 -05:00
Ben Meadors
41b07de5a2
Merge branch 'master' into neighborinfo 2023-07-17 09:21:08 -05:00
luzpaz
003047baaf
Fix various typos (#2607)
* Fix various typos

Found via `codespell -q 3 -L acount,clen,dout`

* Trunk reformatting

---------

Co-authored-by: code8buster <communismisgreat@national.shitposting.agency>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-07-14 16:25:20 -05:00
Ben Meadors
65aafe7ea1 Update protos 2023-07-08 20:46:34 -05:00
Ben Meadors
6e96216ba3
MQTT client proxying (#2587)
* WIP on MQTT proxy message queue

* Fix copy paste goof

* Progress on uplink

* Has packets

* Avoid trying to connect if we're proxying

* Pointer correctly

* Remove wifi guards

* Client proxy subscribe

* Fixed method that got bababababorked somehow... personally I blame CoPilot

* Short circuit logic

* Remove canned settings

* Missed some stuff in the move

* Guard pubsub client for non-networked variants

* Has networking guard

* else

* Return statement for fall-thru

* More gaurd removals

* Removed source filters. No wonder I was confused

* Bounding

* Scope guard around else and fix return

* Portduino

* Defs instead

* Move macro up to actually fix portduino

* Size_t

* Unsigned int

* Thread interval

* Protos

* Protobufs ref
2023-07-08 20:37:04 -05:00
prokrypt
5c34e36bec
Temporary band-aid to address mesh [un]reliability after queue "fix" (#2588) 2023-07-06 06:43:21 -05:00
GUVWAF
b9ad274104
Update retransmission timer based on client offset (#2583) 2023-07-02 16:30:28 -05:00
github-actions[bot]
7ca2e818df
[create-pull-request] automated change (#2579)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-06-27 19:38:45 -05:00
Thomas Göttgens
f02923435b Fix build warning 2023-06-27 23:10:53 +02:00
Ben Meadors
eb0a96a79e
Default ext. notification output for RAK to LED #2 (#2570)
* Default ext. notification output for RAK to LED #2

* Enabled by default

* Update

* Wrong macro

* Output and nag
2023-06-27 12:21:06 -05:00
Thomas Göttgens
b665786c77
Merge branch 'master' into neighborinfo 2023-06-27 18:00:20 +02:00
GUVWAF
ccb682bbb8
Call getMacAddr within pickNewNodeNum() (#2576)
It could be called from within NodeDB::init() before it is set
2023-06-26 19:26:12 -05:00
Ben Meadors
bbfd62c47e
Merge branch 'master' into neighborinfo 2023-06-21 21:11:06 -05:00
GUVWAF
47168d5063
Always assign NodeNum based on MAC address (#2567)
* Always assign NodeNum based on MAC address
Step one of trying to fix infinite loop

* Store our mac.addr again to ignore an already existing NodeNum if it's us
2023-06-20 16:29:25 -05:00
Ben Meadors
a07e30544d
Merge branch 'master' into neighborinfo 2023-06-19 06:16:42 -05:00
Ben Meadors
a2c5b92840
NodeDB Lite migration (#2554)
* Skadoosh

* Removing deprecated fields

* Remove remaining deprecations

* Macro

* Macro

* WIP conversion

* Lots of type conversions between Lite versions and new NodeDB methods

* Trunk

* Conversion

* NULL

* Init

* Rename

* Position

* Reworked conversion to NodeInfo for PhoneAPI
2023-06-17 09:10:09 -05:00
Ben Meadors
c2168dd450
Merge branch 'master' into neighborinfo 2023-06-09 19:51:22 -05:00
Ben Meadors
f71869215d
Set pin for RAK-12039 to allow I2C auto-detect (#2555)
* SET pin for RAK-12039 and put back macaddr for now

* Guard against epaper RAK variant

* Update main.cpp

* Add these back
2023-06-09 05:58:58 -05:00
GUVWAF
66c71250b8 Update last_sent_by_id in FloodingRouter 2023-06-08 20:59:09 +02:00
Ben Meadors
81f80546b4
Remove deprecated MyNodeInfo fields (#2552)
* Skadoosh

* Removing deprecated fields

* Remove remaining deprecations

* Macro

* Macro
2023-06-08 08:07:32 -05:00
Ben Meadors
44a54278b3
Skadoosh (#2549) 2023-06-07 12:59:01 -05:00
Ben Meadors
5c438ae792
Merge branch 'master' into neighborinfo 2023-06-06 19:29:59 -05:00
Michel Jung
194833d77f
Fix static ethernet config (#2544)
With static ethernet config, `status` stayed `0` which let the function return
without setting `ethEvent`. Therefore, `reconnectETH` was never called and network services were never started.

Also, the RAK4631 uses little endian, which is why the IP addresses need to be
converted before setting them.

Fixes #2543
2023-06-06 19:26:13 -05:00
Andre K
207d421fca
refactor tx delay calculation for routers and non-routers (#2542) 2023-06-06 17:33:51 -05:00
Ben Meadors
b42ead4400
Merge branch 'master' into neighborinfo 2023-06-02 06:46:45 -05:00
GUVWAF
344baf7ffc
Cancel rebroadcast in Tx queue upon receiving another rebroadcast (#2538)
* Make portduino great again

* Upon receiving packet that was seen recently, cancel a rebroadcast if there was one in Tx queue already

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-06-01 13:36:30 -05:00
Ben Meadors
a491ceefcd
Wio-e5 wip (#2265)
* Wio-e5 / STM32WL wip

* Stubbing some FS stuff out

* Wio-e5 / STM32WL wip

* Stubbing some FS stuff out

* Wio-e5 / STM32WL wip

* Stubbing some FS stuff out

* Wio-e5 / STM32WL wip

* Stubbing some FS stuff out

* LittleFS compiles. Can't check with actual device.

* make cppcheck happy again

* Guard against accelerometer thread

* Missed a spot

* Upload via ST-LINK

* Derive MAC address from UID

* upload port

* Trunk it

* Guard it

* Maybe fix the cache error on startup.

* Latest RadioLib ref to fix SubGHZ

* revert nasty Sub-GHz Hack

* Boots and radio inits with RadioLib 6.0, LittleFS doesn't seem to work

---------

Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: GUVWAF <thijs@havinga.eu>
2023-06-01 07:14:55 -05:00
github-actions[bot]
1524c2365f
[create-pull-request] automated change (#2537)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-06-01 06:02:23 -05:00
Thomas Göttgens
61661aed50 Broadcast neighbor info
also update trunk
2023-05-31 13:18:43 +02:00
Ben Meadors
113026c372
Allow overriding the default Serial console output settings (#2528)
* Implement override_console_serial_port

* It's opposite day in Logictown

* Try to use native serial types for platforms

* Fix for s3

* Trunk

* Screw it... just declare as Print and handle init

* Alright, chatty kathy

* Missed a spot

* I'll take "Kill that FIXME" for 800, Alex

* Badunkadunk

* Refactor out a lot of duplicated code

* Boogers

* Okay I probably should stop changing everything
2023-05-30 05:26:34 -05:00
Ben Meadors
696afeef41 Protos 2023-05-28 09:44:47 -05:00
Thomas Göttgens
52df85c338 tryfix cppcheck errors
also ignore temporary files
2023-05-24 02:44:30 +02:00
Thomas Göttgens
1dfa8f2d9e
RAK11310 (#2299)
* POC. Board definition JSON upcoming. Generic for now

* side-effect: RP2040 is building again.

* WIP Pico Targets

* current state of affairs

* ahem

* POC. Board definition JSON upcoming. Generic for now

* side-effect: RP2040 is building again.

* WIP Pico Targets

* current state of affairs

* ahem

* fmt

* update toolkit and fmt

* Add built in LED pin

* Use arduino pins

* init SPI bus on right pins.

* Use SPI1 and control chip select manually

* Use macro define for SPI selection. This needs to be defined in the ini file since portduino needs it inside the framework source

* Remove manual CS; works when not using setCS()

* Remove whoopsie debug line

* we are not ARDUINO_AVR_NANO_EVERY any more

* fix rp2040 compilation

* fix RadioLibHAL

* Use new arduino-pico core

* Use cortex-m0plus for BSEC2 library

* Forgot RAK11310 target for BSEC2 library

* That branch was merged

* RAK11310 is working too

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: GUVWAF <thijs@havinga.eu>
2023-05-23 16:19:36 -05:00
github-actions[bot]
eb916da8ce
[create-pull-request] automated change (#2506)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-05-22 20:19:13 -05:00
Ben Meadors
1b68408f2f
Remote hardware overhaul (#2495)
* Update protos

* WIP

* Param

* Has remote hardware

* Protos

* Initializer

* Added new admin message for node remote hardware pins

* Badunkatrunk

* Init and memcpy
2023-05-22 07:00:20 -05:00
IhorNehrutsa
9c683f4c87
Fix LOG_DEBUG messages when no DEBUG_PORT. (#2485)
* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.
2023-05-13 05:33:14 -05:00
Ben Meadors
c52fddac53
Adding device.is_managed protobuf (#2487) 2023-05-12 08:38:30 -05:00
Ben Meadors
6cdf2817f4 Put this back in place 2023-05-11 20:09:34 -05:00
Ben Meadors
75504793e8 Skip setting dio2 as rf switch altogether if txen is defined 2023-05-11 06:52:27 -05:00
Thomas Göttgens
c1a1b450e3 RadioLib6 support 2023-05-08 14:40:10 +02:00
Ben Meadors
7ef12c77a8
Add initial screen for receiving waypoints (#2452) 2023-05-01 16:10:27 -05:00
github-actions[bot]
d43ddc9ec2
[create-pull-request] automated change (#2436) 2023-04-17 15:42:42 -05:00
Thomas Göttgens
a30c07e6b4
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-04-14 19:56:01 +02:00
Thomas Göttgens
309d4fc7f2 add flush to filesystem before closing write file. 2023-04-14 13:25:06 +02:00
Thomas Göttgens
5d41e9fe9d don't grow nodedb if memory is tight.
also remove unconditional reboot on low heap. This is counter productive with this change
2023-04-13 23:09:02 +02:00
Thomas Göttgens
a284439d7e
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-04-12 16:27:36 +02:00
github-actions[bot]
ee971e376a
[create-pull-request] automated change (#2424)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-04-11 08:01:49 -05:00
Manuel Verch
f0c4c18a79 Fix for nodeInfo change to inform phone 2023-04-11 14:01:01 +02:00
Thomas Göttgens
320bf57687 tryfix #2416 - lock some guards. 2023-04-10 17:00:15 +02:00
Ben Meadors
4b89f7dfcb
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-04-07 07:55:26 -05:00
github-actions[bot]
d4e42898b1
[create-pull-request] automated change (#2417)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-04-07 07:14:40 -05:00
Ben Meadors
de08360271 Protos tag for release 2023-04-04 08:15:59 -05:00
Ben Meadors
f8db02c622
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-04-04 07:22:40 -05:00
Manuel
b1937e03ac
fix: store NodeDB persistently (#2405)
* fix for 2404

* fix for 2404

* removed superfluous saveToDisk in reloadOwner()
2023-04-03 16:01:05 -05:00
github-actions[bot]
918b509be8
[create-pull-request] automated change (#2408)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-04-03 10:45:37 -05:00
Ben Meadors
b4bcae98cd
Fixed invalid channel name text (#2400) 2023-04-02 08:33:38 -05:00
Thomas Göttgens
ed96321406 fix newline detection in error printing
Our code check for newline in the format string, not in the parameter
2023-03-31 11:04:15 +02:00
Thomas Göttgens
39d8ae64e7
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-03-30 11:10:18 +02:00
Ben Meadors
5679a82195
Support double tap as button press for supported accelerometers (#2393)
* For Garth

* Push it real good

* Wut

* Double tap

* Move disable logic

* Actually return

* Reinitialize setClick in thread body

* Initialize later so that we actually have nodedb on init

* Fixes
2023-03-29 13:04:02 -05:00
Thomas Göttgens
2edc35d34b
Logic Late-Fix to the last PR 2023-03-29 15:14:48 +02:00
sbias
26d18244f0
Add nodedb channel handling (#2384)
* send ourNodeInfo to channel we got a message we heared someone new

* store node-channel into nodeDB

* use channel from nodeDb to send local messages

* update protobufs

* fmt and fix braces

* respect requested channel for local send, only store channel while getting a nodeinfo packet

---------

Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-03-29 06:51:22 -05:00
Ben Meadors
23272daffe
Threshold based smart position broadcasts (#2388)
* Overhaul smart broadcast with new thresholds

* Fixed badly spelt protos

* That's not the right thing

* Format specifiers

* Fmt

* Units

* Default distance threshold of 100
2023-03-27 14:09:22 -05:00
Thomas Göttgens
6e685b0a54
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-03-27 15:31:32 +02:00
GUVWAF
8f736c8ecc Remove sending network ping to displayed node on interval 2023-03-26 16:16:01 +02:00
Thomas Göttgens
1425657a3c
fix channel num in json output 2023-03-25 20:14:04 +01:00
caveman99
1f130d671b [create-pull-request] automated change 2023-03-25 13:38:35 +00:00
Thomas Göttgens
5ac24bb33b
Update SX128xInterface.cpp 2023-03-25 14:23:30 +01:00
Thomas Göttgens
2c259b8464 Add Power Restraint for 1280 PA Model
Add Debug Print for all module parameters
Add RX/TX Switch to 1280
2023-03-24 16:57:30 +01:00
Ben Meadors
5cb1f96240
Use accelerometer to wake up screen (#2371)
* WIP accelerometer tinkering

* Debug logging

* RAK LIS3DH sensor

* Deconflict temperature sensor and LIS3DH

* Finishing up

* StateON

* Protobufs

* Default of none

* Formatting
2023-03-23 11:32:04 -05:00
Thomas Göttgens
91be22b341
Merge branch 'master' into ESP32C3-RISC 2023-03-21 09:31:30 +01:00
Ben Meadors
3bb8cd7613
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-03-18 07:26:44 -05:00
GUVWAF
8c68d888c8
SX126x: Try next Interface when chip not found (#2363)
* If chip was not found, return false for init()

* SX1268: Only overwrite frequency when out of bounds
Happens when region is still UNSET
2023-03-18 07:23:37 -05:00
Manuel
1f99d4756a
Fix: Sporadig crashes and reboot (#2366)
* Fix: Sporadig crashes with reboot

* Revert "Fix: Sporadig crashes with reboot"

This reverts commit 59b65749f5.

* Fix: Sporadig crashes and reboot
2023-03-17 19:53:29 -05:00
Andre K
7bbfa48b5d
fix channel_num log (#2361)
* fix channel_num variable

* fix channel_num log instead
2023-03-17 13:36:10 -05:00
Manuel
b398f31b64
Fix heap leak mentioned in #2358 (#2359)
* Fix heap leak mentioned in #2358

* Additional fix for #2359
2023-03-14 16:50:32 -05:00
Thomas Göttgens
4573db4665
Merge branch 'master' into ESP32C3-RISC 2023-03-12 20:19:43 +01:00
Thomas Göttgens
d2c72fae00
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-03-12 19:29:42 +01:00
GUVWAF
6d443d2c67
SX126x/8x: Also use PREAMBLE_DETECTED IRQ flag for actively receiving check (#2349)
* Use startReceive() instead of startReceiveDutyCycleAuto()

* Add preamble detected IRQ

* Escape from 'freeze' state when packet should have been received

* Use RADIOLIB_GODMODE for access to clearIrqStatus

* SX126x: Better handling of false preamble detections

* SX128x: Add preamble IRQ and false detection handling to active receiving check

* Remove unnecessary function declaration

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-03-11 12:59:29 -06:00
Ben Meadors
2e3b86608a
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-03-10 19:50:41 -06:00
Ben Meadors
dc2ca9c32b
Report special battery_level of > 100 instead of zero to indicate USB (#2341)
* Report special battery_level of > 100 instead of zero to indicate USB

* Protos

* Helps if you click save

* Wrong method

* Fmt
2023-03-10 19:50:08 -06:00
Thomas Göttgens
033e988e6f
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-03-10 19:38:14 +01:00
A. Rager
e6d69e2b67
Refactor i2cScan.h To Handle 2 Bus (#2337)
* Break i2cScan out into a set of classes for scanning i2c

* refactor i2cscan addresses to be structs that allow addressing by port + address

* build whoopsies

* trunk fmt

* trunk fmt

* lost some build fixes from the merge

* more cleaning for build safety, RTC behavior
2023-03-08 21:13:46 -06:00
Ben Meadors
321e41a3aa Update protos 2023-03-06 16:17:09 -06:00
GUVWAF
3ca1e62b1f
SX126x/8x: Add HEADER_VALID IRQ flag for actively receiving check (#2333)
* Add HEADER_VALID IRQ flag for SX126x/8x to detect actively receiving
Needs new RadioLib commit

* Update comments

* Use latest RadioLib release

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-03-06 15:53:59 -06:00
Thomas Göttgens
8e197fc35b fixes #2327 2023-03-06 12:50:05 +01:00
Thomas Göttgens
0940c6462b Leaving this here in case someone ever needs int :-) 2023-03-04 17:25:55 +01:00
Thomas Göttgens
a47364f07b
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-03-04 17:24:16 +01:00
GUVWAF
eb4ab26e1f
Check if packet is decrypted before searching node in DB (#2320)
* Check whether TraceRouteModule exists
In case in the future we don't enable it

* Check whether packet is decrypted before searching node in DB
2023-03-02 13:22:14 -06:00
GUVWAF
408c555f0f
Add airtime of current received/transmitted packet to nextTx time of all pending retransmissions (#2309)
To avoid unnecessary retransmissions when sending them too early

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-02-25 19:51:38 -06:00
Ben Meadors
fbfd0f12b5
Change to 5 minutes for Garth's sanity 2023-02-24 12:49:10 -06:00
Ben Meadors
9650adb616
Set reasonable defaults for sensor role and adjust packet priority (#2305) 2023-02-24 11:25:50 -06:00
Ben Meadors
46fa08dc33
Air quality specific prefs (#2303) 2023-02-23 13:05:24 -06:00
Ben Meadors
48a407bf5c
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-02-23 07:10:41 -06:00
github-actions[bot]
05b1fc83bd
[create-pull-request] automated change (#2300)
Co-authored-by: thebentern <thebentern@users.noreply.github.com>
2023-02-22 16:16:38 -06:00
Thomas Göttgens
568899031d Check if there's something there before we free it 2023-02-22 10:07:03 +01:00
Thomas Göttgens
f1c457f0c3 tryfix #2228 as suggested by @mverch67 2023-02-22 10:07:03 +01:00