* Improve NRF52 bluetooth power efficiency
* test T114 bad LFXO
* T1000 test
* force BLE param negotiation
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Matched the resonant frequency of the hardware buzzer to maximize volume for the turn on beep.
Further distinguished ON beep from OFF beep, making it easier for users to understand the state change.
* Add mesh/Default.h include.
* Reflacter OnScreenKeyBoard Module, do not interrupt keyboard when new message comes.
* feat: Add long press scrolling for Joystick and upDown Encoder on baseUI frames and menus.
* refactor: Clean up code formatting and improve readability in Screen and OnScreenKeyboardModule
* Fix navigation on UpDownEncoder, default was RotaryEncoder while bringing the T_LORA_PAGER
* Update src/graphics/draw/MenuHandler.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/OnScreenKeyboardModule.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/graphics/draw/NotificationRenderer.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Optimize the detection logic for repeated events of the arrow keys.
* Fixed parameter names in the OnScreenKeyboardModule::start
* Trunk fix
* Reflator OnScreenKeyboard Input checking, make it simple
* Simplify long press logic in OnScreenKeyboardModule.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* changes of variants/nrf52840/nrf52.ini and variants/nrf52840/rak4631/platformio.ini
* try for nrf52 size reduction, faketec exclude unused radios and meshlink refactor
* can't exclude LR11X0 as in schematic there's option for LR1121
* remove -Map flag and -Wl
* removed spaces causing error
---------
Co-authored-by: macvenez <macvenez@gmail.com>
* Delete variants/nrf52840/diy/nrf52_promicro_diy_tcxo/Schematic_Pro-Micro_Pinouts.pdf
remove old file
* Add updated schematic
* Update GPS TX and RX pin definitions after swap
* Update GPS pin definitions and schematic link
Updated the schematic link to reflect GPS pin definition changes.
* Plain RAK4631 should not compile EInk and TFT display code
* Add USE_TFTDISPLAY to variant files.
* Derp
* Undo the platformio.ini changes to heltec_v4
* Drop unneeded src_filter lines
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Jason P <applewiz@mac.com>
* Flags and scripts for size reduction on NRF52 -> Currently targeting rak4631
* Changes from the other branch poluted it
* Remove the stripper
* No strip
* Add initial support for Hackaday Communicator
* Fork it!
* Trunk
* Remove unused elements from the HackadayCommunicatorKeyboard
* Don't divide by zero.
* remove duplicate HAS_LP5562 introduced by #6422
* add ST7796
* changes to get display centered+lib update
* seperated from tbeam
* forgot the simple scan case
* lowered speeds to 1/4
* added SPI Speed to constructor+ cleaned up variant.h
* even slower speeds....
* add ST7796
* changes to get display centered+lib update
* seperated from tbeam
* forgot the simple scan case
* lowered speeds to 1/4
* added SPI Speed to constructor+ cleaned up variant.h
* even slower speeds....
* changed variant name to tbeam-displayshield
* modified variant.h and merged ini file+testing on lower spi frequency for the lora module, display shield pumps out EMI?
* try higher speeds + HSPI
* cleanup of redundant code
* refelct changes?
* trunk fmt
* testing touchscreen code
* further testing
* changed to sensorlib 0.3.1
* i broke it , dont know how to fix at the moment will investigate
* add -1 functionality for touch IRQ
* revert to working example?
* it works.... is pressed was not working properly
* working touchscreen but gestures not moving display
* swap XY+ mirror X
* cleanup + addition of defines for on screen keyboard and canned message module
* removed debug lines, disabled bluetooth for now because of stack smashing protect failure
* reverted the revert #6640 + increased speed, bleutooth is stable now on reconnection cold booth etc , GPS is still not working though
* remove debug + add fixed baudrate for gps
* fmt
* revert NIMble
* changed display library to meshtastic org
* removed baudrate of 115200 and some commented out code
* Correct spelling
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Typo
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* display speed x10
* resolve conflicts
* undo
* revert speed increase CPU
* add SCREEN_TRANSITION_FRAMERATE 5
* spi speed increase of the display
* using the original touchscreen implementation
* removal of H file line
* add USE_ST7796 to missing places
* removed is pressed + interrupt
* revert changes of settings.json
* update to screen.cpp
* test identification of CST226 and CST328
* Update src/configuration.h
typo
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* made changes to detection because it was completely wrong, CST226SE has 2 posible adresses
* add merge queue
* try vars
* kerning in yaml.
* update comment
* lint etc
* touching to check grandfathering
* explicit ignores
* add WIP for Unit C6L (#7433)
* add WIP for Unit C6L
* adapt to new config structure
* Add c6l BLE and screen support (#7991)
* Minor c6l fix
* Move out of PRIVATE_HW
---------
Co-authored-by: Austin <vidplace7@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Jason P <Xaositek@users.noreply.github.com>
Co-authored-by: Markus <Links2004@users.noreply.github.com>
* Update Adafruit BusIO to v1.17.3 (#8018)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update actions/checkout action to v5 (#8020)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update actions/setup-python action to v6 (#8023)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Upgrade trunk (#8025)
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
* Update actions/download-artifact action to v5 (#8021)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Fix init for InputEvent (#8015)
* Automated version bumps (#8028)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Allow Left / Right Events for selection and improve encoder responsives (#8016)
* Allow Left / Right Events for selection and improve encoder responsives
* add define for ROTARY_DELAY
* T-Lora Pager: Support LR1121 and SX1280 models (#7956)
* T-Lora Pager: Support LR1121 and SX1280 models
* Remove ifdefs
* (resubmission) Manual GitHub actions to allow building one target or arch (#7997)
* Reset the modified files
* Fix some changes
* Fix some changes
* Trunk. That is all.
---------
Co-authored-by: Tom <116762865+Nestpebble@users.noreply.github.com>
* BaseUI Show/Hide Frame Functionality (#7382)
* Rename System Frame (from Memory) in code base
* Create menu options to Show/Hide frames: Node Lists, Bearings, Position, LoRa, Clock and Favorites frames
* Move Region Picker into submenu
* Tweak wording for Send Position vs Node Info if the device has GPS
* Update actions/checkout action to v5 (#8031)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update actions/download-artifact action to v5 (#8032)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update actions/setup-python action to v6 (#8033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Phone GPS display on Position Screen for BaseUI (#7875)
* Phone GPS display on Position Screen
This is a PR to show when a phone shares GPS location with the node so you can reliably know what coordinate is being shared with the Mesh.
* Merge pull request #8004 from compumike/compumike/debug-heap-add-free-heap-debugging-to-all-log-lines
When `DEBUG_HEAP` is defined, add free heap bytes to every log line in `RedirectablePrint::log_to_serial`
* Feature: Seamless Cross-Preset Communication via UDP Multicast Bridging (#7753)
* Added compatibility between nodes on different Presets through `Mesh via UDP`
* Optimize multicast handling and channel mapping
- FloodingRouter: remove redundant UDP-encrypted rebroadcast suppression.
- Router: guard multicast fallback with HAS_UDP_MULTICAST and map fallback-decoded packets
to the local default channel via isDefaultChannel()
- UdpMulticastHandler: set transport_mechanism only after successful decode
* trunk fmt
* Move setting transport mechanism.
---------
Co-authored-by: GUVWAF <thijs@havinga.eu>
* Auto-favorite remote admin node
* Merge pull request #7873 from compumike/compumike/client-base-role
Add `CLIENT_BASE` role: `ROUTER` for favorites, `CLIENT` otherwise (for attic/roof nodes!)
* Fixes
* BaseUI Updates (#7787)
* Account for low resolution wide screen OLEDs
* Allow picking of Device Role and new Display Formatter for Device Role
* Add remainder of client roles to display formatter
* Don't update the role unless you pick a value
* Mascots are fun
* Fix warnings during compile time
* Improve some menus
* Mascots need to work everywhere
* Update Chirpy image
* Fix Trunk
* Update protobufs
* Add date to Clock screen
* Analog clocks love dates too
* Finalize date moves for analog clock
* Added Last Coordinate counter to Position screen (#7865)
Adding a counter to show the last time a GPS coordinate was detected to ensure the user is aware how long since the coordinate updated or to identify any errors.
* Fix
* Portduino config refactor (#7796)
* Start portduino_config refactor
* refactor GPIOs to new portduino_config
* More portduino_config work
* More conversion to portduino_config
* Finish portduino_config transition
* trunk
* yaml output work
* Simplify the GPIO config
* Trunk
* updated shebang to use a more standard path for bash (#7922)
Signed-off-by: Trenton VanderWert <trenton.vanderwert@gmail.com>
* Show GPS Date properly in drawCommonHeader (#7887)
* Commit good code that is sustainable
* Fix new build errors
* BaseUI Updates (#7787)
* Account for low resolution wide screen OLEDs
* Allow picking of Device Role and new Display Formatter for Device Role
* Add remainder of client roles to display formatter
* Don't update the role unless you pick a value
* Mascots are fun
* Fix warnings during compile time
* Improve some menus
* Mascots need to work everywhere
* Update Chirpy image
* Fix Trunk
* Update protobufs
* Add date to Clock screen
* Analog clocks love dates too
* Finalize date moves for analog clock
* Add formatting and menu picking for other GPS format options (#7974)
* Add back options for other GPS format options
* Rename variables and don't overlap elements
* Fix default value
* Should probably add a menu while I'm here!
* Shorten names just a bit to fit on screens
* Fix off by one
* Labels try to make things better
* Missed a label
* Update protobufs (#8038)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Add formatting and menu picking for other GPS format options (#7974)
* Add back options for other GPS format options
* Rename variables and don't overlap elements
* Fix default value
* Should probably add a menu while I'm here!
* Shorten names just a bit to fit on screens
* Fix off by one
* Labels try to make things better
* Missed a label
* Add a new GPS model CM121. (#7852)
* Add a new GPS model CM121.
* Add CM121 to Unicore.
* Trunk fixes, remove unneded NMEA lines
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* (resubmission) Manual GitHub actions to allow building one target or arch (#7997)
* Reset the modified files
* Fix some changes
* Fix some changes
* Trunk. That is all.
---------
Co-authored-by: Tom <116762865+Nestpebble@users.noreply.github.com>
* PPA: Enable Ubuntu 25.10 (questing) (#7940)
* Update Protobuf usage, add MLS, fix clock (#8041)
* Update protobufs (#8045)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Fix icon
* C6l fixes (#8047)
* fix build with HAS_TELEMETRY 0 (#8051)
* Make sure to ACK ACKs/replies if next-hop routing is used (#8052)
* Make sure to ACK ACKs/replies if next-hop routing is used
To stop their retransmissions; hop limit of 0 is enough
* Update src/mesh/ReliableRouter.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* move HTTP contentTypes to Flash - saves 768 Bytes of RAM (#8055)
* Use `lora.use_preset` config to get name (#8057)
* Update RadioLib to v7.3.0 (#8065)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Fix Rotary Encoder Button (#8001)
this fixes the Rotary Encoder Button, currenlty its not working at all.
Currently the action `ROTARY_ACTION_PRESSED` is only triggerd with a IRQ on RISING, which results in nothing since the function detects the "not longer" pressed button --> no action.
the `ROTARY_ACTION_PRESSED` implementation needs to be called on both edges (on press and release of the button)
changing the interupt setting to `CHANGE` fixes the problem.
* Add another seeed_xiao_nrf52840_kit build environment for I2C pinout (#8036)
* Update platformio.ini
* Remove some more extraneous lines
* Add heltec_v4 board. (#7845)
* add heltec_v4 board.
* Update variants/esp32s3/heltec_v4/platformio.ini
Co-authored-by: Austin <vidplace7@gmail.com>
* Limit the maximum output power.
* Trunk fixes
Fixes formatting to match meshtastic trunk linter.
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Austin <vidplace7@gmail.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Upgrade trunk (#8078)
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
* portduino bump to fix gpiod bug (#8083)
An earlier portduino causes problems with initializing gpiod lines. This pulls in the fix.
* Handle ext. notification module things even if not enabled (#8089)
* tlora-pager wake on button, and kb backlight toggling (#8090)
* Try-fix: Unstick that PhoneAPI state (#8091)
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Also pull a deviceID from esp32c6 devices (#8092)
* Remove line from BLE pin screen, to make pin readible on tiny screens
* Fix build errors (#8067)
* Heltec V4 is 16mb
* Clear lasttoradio on BLE disconnect (#8095)
* On disconnect, clear the lastToRadio buffer
* Move it, bucko!
* Revert "Fix build errors (#8067)"
This reverts commit d998f70b56.
* Automated version bumps (#8100)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* Upgrade trunk (#8094)
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
* Update Adafruit BusIO to v1.17.4 (#8098)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Add three expansion screens for heltec mesh solar. (#7995)
* Add three expansion screens for heltec mesh solar.
* delete whitespace
Update variants/nrf52840/heltec_mesh_solar/variant.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* delete whitespace
Update variants/nrf52840/heltec_mesh_solar/platformio.ini
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Trunk
---------
Signed-off-by: Trenton VanderWert <trenton.vanderwert@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Dane Evans <dane@goneepic.com>
Co-authored-by: Austin <vidplace7@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Jason P <Xaositek@users.noreply.github.com>
Co-authored-by: Markus <Links2004@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
Co-authored-by: Markus <974709+Links2004@users.noreply.github.com>
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Co-authored-by: WillyJL <me@willyjl.dev>
Co-authored-by: Tom <116762865+NomDeTom@users.noreply.github.com>
Co-authored-by: Tom <116762865+Nestpebble@users.noreply.github.com>
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
Co-authored-by: Michael <michael.overhorst@gmail.com>
Co-authored-by: GUVWAF <thijs@havinga.eu>
Co-authored-by: Trent V. <trenton.vanderwert@gmail.com>
Co-authored-by: Quency-D <55523105+Quency-D@users.noreply.github.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
* Swap the GPS serial port pins.
* Trunk fixes
---------
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Remove native from the build, and remove the required permissions
* Delete .github/workflows/build_one_arch.yml
Its borken and not really needed. one_target is the goal.
* Update calibration logic for ICM20948 sensor
Initialize highest and lowest magnetic values based on sensor data readiness during calibration.
* Refactor BMX160 calibration to use magnetometer data
Update calibration logic to initialize highest and lowest values using magnetometer data.
* Add missed viable defines in ::calibrate()
* Added OCV_ARRAY from measured discharge curve testing and update ADC multiplier
The ADC resistor divider ratio is 0.6 -> multiplier should be 1/0.6 ~=1.667
We data logged a full discharge curve at constant 100mA draw over 15hours to get a realistic voltage curve for battery SoC measurements.
* Remove power.h in favor of variant.h
---------
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Unify uptime formatting
* Fix small label alignment item
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
* nrf52: add watchdog
Main thread only for now.
* bump framework-arduinoadafruitnrf52 to pick up new wdt support
* clang-format the new parts of main-nrf52.cpp
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
(cherry picked from commit 83954293d8)
* Make RAK4631 nodes power back on deep sleep
The devices will hang if the VBAT goes under 1.7V (Brown-out reset) and
they will never come back unless power supply goes completely off.
This kills unattended nodes.
Using the SystemOff the LPCOMP we can get the nodes back again when
power comes back, even if VBAT goes under 1.7V, which moreover is more
unlikely because the device is off.
* Adding support for heltec t114
And moved particularities to variant.h
* Remove old cpp comment that belongs to variant.h
It was a leftover.
* Trunk fix
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Update to Pro-micro variants
Schematic updated
Xtal variant removed
Extra module added to list
Extra explanation added to readme.
* Fix markdown formatting in readme.md
* Fix formatting in readme.md for RF switch section
---------
Co-authored-by: Tom <116762865+Nestpebble@users.noreply.github.com>
* Add the Heltec v4 expansion box.
* Change heltec-v4-oled to heltec-v4.
* Add touchscreen to I2C scanning.
* Add reset and busy pins to the ST7789.
* Ignore the touch interrupt pin and extend the sleep time to 1 hour.
* Remove the default sleep function.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add API types, state, and log message in Debug screen
* un-goober the API state tracking
* Set the SerialConsole api_type
* Add api_type for Ethernet
* Remove API state debugging code
* Update wording for client connection states
* Improve string width for smaller screen devices
* Reserve space on navigation bar to fit link indicator
* Add persistent Connected icon to screen
* Connect System frame to ensure text doesn't overflow
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
* Properly format timestamp in log message
* Better formatting of GPS_DEBUG logging in gps probe
* Reset GPS after serial speed change, and look for magic string to identify chip
* Add UC6580 to boot message detection, for Heltec Tracker
* Add L76K detect from boot string, for Heltec-v4
* Slightly more useful GPS debugging
* Back out detection of L76K via startup messages.
* Ignore PIN_GPS_RESET = -1 and rename passive_detect array.
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Update digital clock draw to auto scale to correct size; no more fixed scaling
* Static scale calcuation to improve performance
* Update src/graphics/draw/ClockRenderer.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Back off for width or height exceeds
* Fixes for some calcuations
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* full thing. works
* works
* minimal changes
* roll back previous changes, move to using the alloc() overrride
* clean up comments
* format
* run clang-format manually.
Trunk may be the absolute worst formatter in existance
* format on WSL to fix trunks awfulness
* add a 3 minute cooldown to prevent messages going back and forth
* add ignoring the dummy neighbor.
* fix or.
* fix spelling, increase logging
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Update to Pro-micro variants
Schematic updated
Xtal variant removed
Extra module added to list
Extra explanation added to readme.
* Fix markdown formatting in readme.md
* Fix formatting in readme.md for RF switch section
---------
Co-authored-by: Tom <116762865+Nestpebble@users.noreply.github.com>
* Add the Heltec v4 expansion box.
* Change heltec-v4-oled to heltec-v4.
* Add touchscreen to I2C scanning.
* Add reset and busy pins to the ST7789.
* Ignore the touch interrupt pin and extend the sleep time to 1 hour.
* Remove the default sleep function.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add the Heltec v4 expansion box.
* Change heltec-v4-oled to heltec-v4.
* Add touchscreen to I2C scanning.
* Add reset and busy pins to the ST7789.
* Ignore the touch interrupt pin and extend the sleep time to 1 hour.
* Remove the default sleep function.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add API types, state, and log message in Debug screen
* un-goober the API state tracking
* Set the SerialConsole api_type
* Add api_type for Ethernet
* Remove API state debugging code
* Update wording for client connection states
* Improve string width for smaller screen devices
* Reserve space on navigation bar to fit link indicator
* Add persistent Connected icon to screen
* Connect System frame to ensure text doesn't overflow
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
* Conditionally delete favourited nodes on reset
* trunk fmt
* Fix equality check, use existing macro for role validation
* Extend favourite persistence setting to devices of all roles
* Refactor: Decoupled role/config check and set role defaults appropriately
* Use American-English spelling
* Use existing reference
* Convert reset to bool, regen protos
* Add optional arg to nodedb_reset in favor of additional device setting
* Use correct proto commit ID
* Regen protos
* Log preservation status
* Pull latest from master
* Conditionally delete favourited nodes on reset
* trunk fmt
* Fix equality check, use existing macro for role validation
* Extend favourite persistence setting to devices of all roles
* Refactor: Decoupled role/config check and set role defaults appropriately
* Use American-English spelling
* Use existing reference
* Convert reset to bool, regen protos
* Add optional arg to nodedb_reset in favor of additional device setting
* Use correct proto commit ID
* Regen protos
* Log preservation status
* Pull latest from master
* nrf52: add watchdog
Main thread only for now.
* bump framework-arduinoadafruitnrf52 to pick up new wdt support
* clang-format the new parts of main-nrf52.cpp
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* regenerate protobuf with bh1750 TelemetrySensorType
* Added wollewald/BH1750_WE@^1.1.10 dependecy
* Added support for BH1750 during i2C detection
* Create new BH1750Sensor and added in EnvironmentTelemetry
* clean code
* Attempt to fix protobuf include
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Updated the dimensions of various emotes in emotes.h from 30x30 or 25x25 to 16x16 pixels for consistency and optimization. Added new emotes including heart_smile, Heart_eyes, and others, all with the same 16x16 size. This change improves memory usage and aligns with the design specifications for smaller emotes.
This is a non-breaking change that increases the internal representation
of node counts from uint8_t (max 255) to uint16_t (max 65535) to support
larger mesh networks, particularly on ESP32-S3 devices with PSRAM.
Changes:
- NodeStatus: numOnline, numTotal, lastNumTotal (uint8_t -> uint16_t)
- ProtobufModule: numOnlineNodes (uint8_t -> uint16_t)
- MapApplet: loop counters changed to size_t for consistency with getNumMeshNodes()
- NodeStatus: Fixed log format to use %u for unsigned integers
Note: Default class methods keep uint32_t for numOnlineNodes parameter
to match the public API and allow flexibility, even though internal node
counts use uint16_t (max 65535 nodes).
This change does NOT affect protobuf definitions, maintaining wire
compatibility with existing clients and devices.
* External notification module: Adjusted default nag timeout to 5s (from 60s)
* Change nag to 15s
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Initial work to get NimbleBluetooth working reliably, and cross-task mutexes cleaned up
* Pre-fill toPhoneQueue when safe (during config/nodeinfo): runOnceToPhoneCanPreloadNextPacket
* Handle 0-byte responses breaking clients during initial config phases
* requestLowerPowerConnection
* PhoneAPI: onConfigStart and onConfigComplete callbacks for subclasses
* NimbleBluetooth: switch to high-throughput BLE mode during config, then lower-power BLE mode for steady-state
* Add some documentation to NimbleBluetooth.cpp
* make cppcheck happier
* Allow runOnceHandleToPhoneQueue to tell runOnce to shouldBreakAndRetryLater, so we don't busy-loop forever in runOnce
* Gating some logging behind DEBUG_NIMBLE_ON_READ_TIMING ifdef again; bump retry count
* Add check for connected state in NimBLE onRead()
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Add RAK3401 variant files
* Add SPI configuration for RAK3401 and RAK13302 variants
* Refactor SPI pin configuration and clean up variant definitions for RAK3401
* Add TX_GAIN_LORA for RAK13302 Power Amp
* Fix merge
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
* Update exempt labels for stale bot workflow
Adds triaged and backlog to the list of exempt labels.
* Update meshtastic/web to v2.6.7 (#8381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update DFRobot_RTU to v1.0.6 (#8387)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update mcr.microsoft.com/devcontainers/cpp Docker tag to v2 (#8375)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* manual merge stale bot config (#8392)
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Add general-purpose packet cache
This commit adds a caching system that will save packet data in a much
more compact form than the regular MeshPacket protobuf. It cannot be
worked with directly to the same degree (although the packet header is
available), but consumes *much* less memory, and as a result can be used
to temporarily store large numbers of packets.
Cached packets can be retrieved either by their (from, id) tuple, or by
their hash.
This cache is a pre-requisite for the upcoming packet replay feature.
* Remove debug initialiser
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix ordering
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add missing size assignment
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add comments for hash & bucket macros
* Make it clear that this field stores a map of the original data
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* rework I2C sensor init
the goal is to only instantiate sensors that are pressend to save memory.
side effacts:
- easyer sensor integration (less C&P code)
- nodeTelemetrySensorsMap can be removed when all devices are migrated
* add missing ifdef
* refactor a bunch of more sensors
RAM -816
Flash -916
* fix build for t1000
* refactor more sensors
RAM -192
Flash -60
* improve error handling
Flash -112
* fix build
* fix build
* fix IndicatorSensor
* fix tracker-t1000-e build
not sure what magic is used but it works
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/Telemetry/Sensor/DFRobotGravitySensor.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Ham Mode ignores region regulatory limits, so regardless of whether
we set a single TX_GAIN_LORA or an array with a non-linear PA,
we shouldn't limit the power.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* update to use long names for pager
* remove duplicate
* add menu item
* fix after conflict
* menu name change. use sanitizeString
* fix formatting issue. should pass trunk now.
* remove auto-generated protobufs
* remove log, add tdeck, improvements.
---------
Co-authored-by: l0g-lab <l0g-lab@users.noreply.github.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add Power and Environmental Telemetry Hide/Show
* Allow Power and Telemetry Frames even if module disabled
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
8 months ago, when this was added to the code, the GPS probe code
was still a little flaky.
Particularly after #6114 and #6116 were added, reliability improved
for all devices as we were sending fewer calls on the bus.
Today, the T1000E is the only Meshtastic device that regularly takes
2, 3, or 4 attempts to be detected via the probe code.
Removing these lines, on my T1000E, results in the AG3335 being
detected immediately.
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Force coverage tests to run in simulation mode
* Revert "Force coverage tests to run in simulation mode"
This reverts commit e4ec719e6f.
* fix: Move `#include "variant.h"` to top of file (fixes#8276)
The original line being further down the file causes any #ifdef/defined() checks for definitions in variant.h to silently skip.
This was noticed when `USE_GC1109_PA` in Heltec v4 and Heltec Wireless Tracker failed to correct program TX_GAIN_LORA, but will also affect any variant.h-dependent configurations in this file, if they would have been defined above where the `#include` previously was.
---------
Co-authored-by: Austin Lane <vidplace7@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Force coverage tests to run in simulation mode
* Revert "Force coverage tests to run in simulation mode"
This reverts commit e4ec719e6f.
* fix: Move `#include "variant.h"` to top of file (fixes#8276)
The original line being further down the file causes any #ifdef/defined() checks for definitions in variant.h to silently skip.
This was noticed when `USE_GC1109_PA` in Heltec v4 and Heltec Wireless Tracker failed to correct program TX_GAIN_LORA, but will also affect any variant.h-dependent configurations in this file, if they would have been defined above where the `#include` previously was.
---------
Co-authored-by: Austin Lane <vidplace7@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Force coverage tests to run in simulation mode
* Revert "Force coverage tests to run in simulation mode"
This reverts commit e4ec719e6f.
* Force coverage tests to run in simulation mode
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
SHT4X chip recognized as SHT31, registerValue that stores first bytes of chip's serial number did not mach the chip.
Added a serial number match for SHT40 found in a SONOFF SNZB-02P.
* Wait until after GPS lock hold before updating position, if we can.
After the recent patch, we hold lock for a bit before updating the position.
The positions that come in after the hold are genuinely better positions
than what we've been doing before. However, they only come 20 seconds
after we've got lock.
Previously, we would update the local position as soon as we got a lock as well
as at the end of the hold, since a hold was not always possible.
With this patch, if the settings allow, we should skip that first local position update.
Fixes https://github.com/meshtastic/firmware/issues/8029
* Fix falling edge handling.
* spelling
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Congeal lock handling
* Add named constants
* define unit to avoid confusion
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* ifdef, not if.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add handling for when we first turn on.
* Don't run if not active
* Reset fixhold
* Logic fixes
* Add path for ACTIVE--> IDLE --> ACTIVE
Previously we only covered HARDSLEEP --> ACTIVE.
* Change hold time to gps_update_interval - 10s
* Update comment
* Add extra buffer to avoid re-starting hold
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Also move RAK3172 and new EBYTE_E77_MBL define to variant.h, as this makes VSCode know about the defines properly...
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Do slightly better at threading the search for GPS hardware
* Formatting and minor logic fix
* Remove now-spam GPS Log messages
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* feat: add adaptive polling intervals to WebServer
Replace fixed 5ms polling with adaptive intervals based on HTTP activity:
- 50ms during active periods (first 5 seconds after request)
- 200ms during medium activity (5-30 seconds)
- 1000ms during idle periods (30+ seconds)
Reduces CPU usage significantly during idle periods while maintaining
responsiveness when handling HTTP requests.
* Fix integer overflow and magic numbers in WebServer
- Handle millis() overflow in getAdaptiveInterval()
- Replace magic numbers with named constants
- Improve code readability and maintainability
* Create channel-mute toggle function
* Added mute state to channel settings
* Create node-mute toggle functions
* Added mute state to nodedb entries
* Rebase protos
* Decouple protobuf changes
* Disable bell-invoked ext notifs for muted nodes
* Clearly dilineate module mute from sender or channel mute
* Disable bell-invoked ext notifs for muted channels
* Trunk fmt
* Disable message-invoked ext notifs for muted channels and nodes
* Disable on-screen 'new message' popup for muted nodes and channels
* Don't mute alerts
* Make use of pre-existing channel_settings.module_settings.is_client_muted setting
* Revert previous commit - this needs it's own proto
* Regen protos
* T-Lora Pager: Interrupt based rotary encoder
* T-Lora Pager: Fix amplifier fuzzing/popping
* Fix build for other variants
* Fix - reference actual channel when changing settings
* Update protos
* Refactor ref syntax
* Fix defines
* Update comments and remove unused function
* Regen protos
* Regen protobuffs again
* Fix build failure in ci, add missing argument
* Format
* InputPollable: System for polling after interrupts
* T-Lora Pager: Use InputPollable for RotaryEncoderImpl
* Rename RotaryEncoderImpl to TLoraPagerRotaryEncoder
* Revert "Rename RotaryEncoderImpl to TLoraPagerRotaryEncoder"
This reverts commit a76cc88dc2.
* Revert unnecessary ifdefs
* Regen protos
* Use latest protos
* Regen protos for latest changes
* Decouple node-mute from channel-mute
* Regen protos
* Fix desktop build
* More flexible InputPollable paradigm
* Custom xPortInIsrContext() for nRF52/RP2xx0
* Use channel as specified in the received packet
* Use channel as specified in the received packet for OLED screen notifications
* add heltec tracker v2 board.
* Use common power amp definition for Heltec v4 and Heltec Tracker v2
* Set appropriate mqtt root upon lora region change
* Use user preferences root topic if present
* delete SX126X_MAX_POWER=11
* Assume previous root on topic change
* update mqtt root when region is changed via OLED menu handler
* Regen protos
* Removed magic numbers
* Add DIRECT_MSG_ONLY buzzer mode (#8158)
* Handle existing special case for M5STACK_UNITC6L for DIRECT_MSG_ONLY buzz mode
There already exists a special case for M5STACK_UNITC6L.
Modified it to adhere to new DIRECT_MSG_ONLY buzzer mode
* Add new buzzer mode DIRECT_MSG_ONLY to BuzzerModeMenu
* Disable notifications when buzzer mode is DIRECT_MSG_ONLY
* Change alert_message_buzzer in notification module in DIRECT_MSG_ONLY buzz mode
Better comments
* Fixed spelling in debug log
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: nexpspace <4kosjdicx@mozmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* run trunk fmt
* Update variants/esp32s3/heltec_wireless_tracker_v2/variant.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Regen protos
* Pull latest protobufs
* Don't use IS_ONE_OF when loading Modules
* GAT562: Use PRIVATE_HW (fix build) (#8198)
* ESP32s2 doesn't implement HWCDC (#8199)
* Fix build script failure under certain conditions for devices that use UF2 binaries (#8150)
* Validate CR and SF lora config (#8146)
* Validate CR and SF lora config
* No zero-bw
* Update src/modules/AdminModule.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix braces
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Quote firmware paths given to uf2conv
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Calculate airtime of transmitted and received packets separately (#8205)
* Correcting GPS PINs (#8087)
https://github.com/meshtastic/firmware/issues/8084
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Clear out user.id except for sending to phone (#8202)
* Null out user.id except for sending to phone
* Fix
* Update src/modules/NodeInfoModule.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Copilot garbage
* This is unnecessary, because we don't stored user.id on userlite
* Don't need this
* Fix warning
* Just alter the protobuf
* Alter protobuf doesn't do anything with the altered data, so let's re-encode it
* Check inputbroker before access
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add dropped packet count to LocalStats (#8207)
* Add dropped packet count to LocalStats
In case the transmit queue was full
* Trunked
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
---------
Co-authored-by: ford-jones <fordnicholasjones@gmail.com>
Co-authored-by: WillyJL <me@willyjl.dev>
Co-authored-by: Ford Jones <107664313+ford-jones@users.noreply.github.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: Quency-D <hj_zzns@163.com>
Co-authored-by: Quency-D <55523105+Quency-D@users.noreply.github.com>
Co-authored-by: nexpspace <380097+nexpspace@users.noreply.github.com>
Co-authored-by: nexpspace <4kosjdicx@mozmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Austin Lane <vidplace7@gmail.com>
Co-authored-by: Ken Piper <kealper@ivystone.net>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
Co-authored-by: Szetya <szetya@gmail.com>
* Null out user.id except for sending to phone
* Fix
* Update src/modules/NodeInfoModule.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Copilot garbage
* This is unnecessary, because we don't stored user.id on userlite
* Don't need this
* Fix warning
* Just alter the protobuf
* Alter protobuf doesn't do anything with the altered data, so let's re-encode it
* Check inputbroker before access
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Handle existing special case for M5STACK_UNITC6L for DIRECT_MSG_ONLY buzz mode
There already exists a special case for M5STACK_UNITC6L.
Modified it to adhere to new DIRECT_MSG_ONLY buzzer mode
* Add new buzzer mode DIRECT_MSG_ONLY to BuzzerModeMenu
* Disable notifications when buzzer mode is DIRECT_MSG_ONLY
* Change alert_message_buzzer in notification module in DIRECT_MSG_ONLY buzz mode
Better comments
* Fixed spelling in debug log
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: nexpspace <4kosjdicx@mozmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* RoutingModule::sendAckNak takes ackWantsAck arg to set want_ack on the ACK itself
* Use reliable delivery for traceroute requests (which will be copied to traceroute responses by setReplyTo)
* Update ReliableRouter::sniffReceived to use ReliableRouter::shouldSuccessAckWithWantAck
* Use isFromUs
* Update MockRoutingModule::sendAckNak to include ackWantsAck argument (currently ignored)
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Introduce non-linear TX_GAIN_LORA
Previously, our TX_GAIN_LORA setting was a single number, intended
to represent the signal gain going through a power amp (plus or minus
antenna, attenuator, and other parts of the RF chain).
It turns out the relationship between the input power (i.e. from an SX1262)
and total output power is often non-linear. While we fudged a 1dBm difference
here and there with existing chips, the Heltec v4 has a 5dBm difference in gain
depending on which end of the input power (and frequency) you are at.
To allow people to run their Heltec v4 at max power when legal, and future
proof our code, this patch introduced an optional array-based TX_GAIN_LORA.
Define NUM_PA_POINTS and set TX_GAIN_LORA to gain values for a given input
power in 1dBm increments, and all will work.
For linear systems, just continue to define TX_GAIN_LORA as a number.
Fixes https://github.com/meshtastic/firmware/issues/8070
* Remove temporary power limit on heltec v4
* Add function RadioLibInterface::checkOutputPower
* Ensure SX126x reaches minimum supported power.
* Keep it simple, instead.
* Add seenRecently = true if wasUpgraded is true but unable to remove from queue (i.e. already sent/processed).
* Consistent comment between FloodingRouter and HopRouter
* Add seenRecently = true if wasUpgraded is true but unable to remove from queue (i.e. already sent/processed).
* Consistent comment between FloodingRouter and HopRouter
* If a packet is heard multiple times, rebroadcast using the highest hop limit
Sometimes a packet will be in the TX queue waiting to be transmitted,
when it is overheard being rebroadcast by another node, with a higher
hop limit remaining. When this occurs, modify the pending packet in
the TX queue to avoid unnecessarily wasting hops.
* Reprocess instead of modifying queued packet
In order to ensure that the traceroute module works correctly, rather
than modifying the hop limnit of the existing queued version of the
packet, simply drop it ifrom the queue and reprocess the version of the
packet with the superior hop limit.
* Update protobufs submodule
* Merge upstream/develop into overheard-hoptimisation branch
Resolved conflicts in:
- src/mesh/FloodingRouter.cpp: Integrated hop limit optimization with refactored duplicate handling
- src/mesh/MeshPacketQueue.h: Kept both hop_limit_lt parameter and new find() method
* Improve method naming and code clarity
- Rename findPacket() to getPacketFromQueue() for better clarity
- Make code DRY by having find() use getPacketFromQueue() internally
- Resolves method overloading conflict with clearer naming
* If a packet is heard multiple times, rebroadcast using the highest hop limit
Sometimes a packet will be in the TX queue waiting to be transmitted,
when it is overheard being rebroadcast by another node, with a higher
hop limit remaining. When this occurs, modify the pending packet in
the TX queue to avoid unnecessarily wasting hops.
* Improve router role checking using IS_ONE_OF macro
- Replace multiple individual role checks with cleaner IS_ONE_OF macro
- Add CLIENT_BASE support as suggested in PR #7992
- Include MeshTypes.h for IS_ONE_OF macro
- Makes code more maintainable and consistent with other parts of codebase
* Apply IS_ONE_OF improvement to NextHopRouter.cpp
- Replace multiple individual role checks with cleaner IS_ONE_OF macro
- Add CLIENT_BASE support for consistency
- Include MeshTypes.h for IS_ONE_OF macro
- Matches the pattern used in FloodingRouter.cpp
* Create and apply IS_ROUTER_ROLE() macro across codebase
- Add IS_ROUTER_ROLE() macro to meshUtils.h for consistent router role checking
- Update FloodingRouter.cpp to use macro in multiple locations
- Update NextHopRouter.cpp to use macro
- Include CLIENT_BASE role support
* Core Changes:
- Add hop_limit field to PacketRecord (17B→20B due to alignment)
- Extend wasSeenRecently() with wasUpgraded parameter
- Enable router optimization without duplicate app delivery
- Handle ROUTER_LATE delayed transmission properly
Technical Details:
- Memory overhead: ~4000 bytes for 1000 records
- Prevents duplicate message delivery while enabling routing optimization
- Maintains protocol integrity for ACK/NAK handling
- Supports upgrade from hop_limit=0 to hop_limit>0 scenarios
* Delete files accdentally added for merge
* Trunk formatting
* Packets are supposed to be unsigned. Thankfully, it's only a log message.
* Upgrade all packets, not just 0 hop packets.
* Not just unsigned, but hex. Updating packet log IDs.
* Fixed order of operations issue that prevented packetrs from being removed from the queue
* Fixing some bugs after testing. Only storing the maximum hop value in PacketRecord which makes sense. Also, updating messaging to make more sense in the logs.
* Fixed flow logic about how to handle re-inserting duplicate packets. Removed IS_ROUTER_ROLE macro and replaced it with better isRebroadcaster().
* Add logic to re-run modules, but avoid re-sending to phone.
* Refactor how to process the new packet with hops. Only update nodeDB and traceRouteModule.
* - Apply changes to both FloodingRouter and NextHopRouter classes to make packets mutable for traceroute
- MESHTASTIC_EXCLUDE_TRACEROUTE guard for when we don't want traceroute
* Allow MeshPacket to be modified in-place in processUpgradePacket
* let's not make a copy where a copy is unncessary.
---------
Co-authored-by: Clive Blackledge <clive@ansible.org>
Co-authored-by: Clive Blackledge <git@ansible.org>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* feat: implement router hop preservation for router-to-router communication
- Preserve hop_limit when both local device and previous relay are routers/CLIENT_BASE
- Only preserve hops for favorite routers to prevent abuse
- Apply to both FloodingRouter and NextHopRouter
- Update hop counting logic in MeshService for router-to-router communication
This allows routers to communicate over longer distances without
consuming hop limits, improving mesh network efficiency for
infrastructure nodes.
* chore: update protobufs submodule to latest
* Optimized to check friend list first before nodedb.
* Reverting unintended changes
* revert: remove protobufs submodule update
This reverts the protobufs submodule back to a84657c22 to remove
unintended changes from this branch.
* Slight rewrite to remove flawed NO_RELAY_NODE logic and added logic to add isFirstHop. If isFirstHop, always decrease hop_limit to avoid retry logic.
* DRY code. Remove NodeInfo logic that was left over.
* Trunk formatting
this fixes the Rotary Encoder Button, currenlty its not working at all.
Currently the action `ROTARY_ACTION_PRESSED` is only triggerd with a IRQ on RISING, which results in nothing since the function detects the "not longer" pressed button --> no action.
the `ROTARY_ACTION_PRESSED` implementation needs to be called on both edges (on press and release of the button)
changing the interupt setting to `CHANGE` fixes the problem.
this fixes the Rotary Encoder Button, currenlty its not working at all.
Currently the action `ROTARY_ACTION_PRESSED` is only triggerd with a IRQ on RISING, which results in nothing since the function detects the "not longer" pressed button --> no action.
the `ROTARY_ACTION_PRESSED` implementation needs to be called on both edges (on press and release of the button)
changing the interupt setting to `CHANGE` fixes the problem.
* Add a new GPS model CM121.
* Add CM121 to Unicore.
* Trunk fixes, remove unneded NMEA lines
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Add back options for other GPS format options
* Rename variables and don't overlap elements
* Fix default value
* Should probably add a menu while I'm here!
* Shorten names just a bit to fit on screens
* Fix off by one
* Labels try to make things better
* Missed a label
* Add back options for other GPS format options
* Rename variables and don't overlap elements
* Fix default value
* Should probably add a menu while I'm here!
* Shorten names just a bit to fit on screens
* Fix off by one
* Labels try to make things better
* Missed a label
* Account for low resolution wide screen OLEDs
* Allow picking of Device Role and new Display Formatter for Device Role
* Add remainder of client roles to display formatter
* Don't update the role unless you pick a value
* Mascots are fun
* Fix warnings during compile time
* Improve some menus
* Mascots need to work everywhere
* Update Chirpy image
* Fix Trunk
* Update protobufs
* Add date to Clock screen
* Analog clocks love dates too
* Finalize date moves for analog clock
* Start portduino_config refactor
* refactor GPIOs to new portduino_config
* More portduino_config work
* More conversion to portduino_config
* Finish portduino_config transition
* trunk
* yaml output work
* Simplify the GPIO config
* Trunk
Adding a counter to show the last time a GPS coordinate was detected to ensure the user is aware how long since the coordinate updated or to identify any errors.
* Account for low resolution wide screen OLEDs
* Allow picking of Device Role and new Display Formatter for Device Role
* Add remainder of client roles to display formatter
* Don't update the role unless you pick a value
* Mascots are fun
* Fix warnings during compile time
* Improve some menus
* Mascots need to work everywhere
* Update Chirpy image
* Fix Trunk
* Update protobufs
* Add date to Clock screen
* Analog clocks love dates too
* Finalize date moves for analog clock
* Added compatibility between nodes on different Presets through `Mesh via UDP`
* Optimize multicast handling and channel mapping
- FloodingRouter: remove redundant UDP-encrypted rebroadcast suppression.
- Router: guard multicast fallback with HAS_UDP_MULTICAST and map fallback-decoded packets
to the local default channel via isDefaultChannel()
- UdpMulticastHandler: set transport_mechanism only after successful decode
* trunk fmt
* Move setting transport mechanism.
---------
Co-authored-by: GUVWAF <thijs@havinga.eu>
* Phone GPS display on Position Screen
This is a PR to show when a phone shares GPS location with the node so you can reliably know what coordinate is being shared with the Mesh.
* Rename System Frame (from Memory) in code base
* Create menu options to Show/Hide frames: Node Lists, Bearings, Position, LoRa, Clock and Favorites frames
* Move Region Picker into submenu
* Tweak wording for Send Position vs Node Info if the device has GPS
* Added compatibility between nodes on different Presets through `Mesh via UDP`
* Optimize multicast handling and channel mapping
- FloodingRouter: remove redundant UDP-encrypted rebroadcast suppression.
- Router: guard multicast fallback with HAS_UDP_MULTICAST and map fallback-decoded packets
to the local default channel via isDefaultChannel()
- UdpMulticastHandler: set transport_mechanism only after successful decode
* trunk fmt
* Move setting transport mechanism.
---------
Co-authored-by: GUVWAF <thijs@havinga.eu>
* Scale probe buffer size based on current baud rate
* Throttle bad time validation logging and fix time comparison logic
* Remove comment
* Missed the other instances
* Copy pasta
In 2.7.7 / 2.7.8 we introduced some new checks for time accuracy.
In combination, these result in a spamming of the logs when a bad time is found
When the GPS is active, we're calling the GPS thread every 0.2secs.
So this log could be printed 4,500 times in a no-lock scenario :)
Reserve this experience for developers using GPS_DEBUG.
Fixes https://github.com/meshtastic/firmware/issues/7896
* Add back options for other GPS format options
* Rename variables and don't overlap elements
* Fix default value
* Should probably add a menu while I'm here!
* Shorten names just a bit to fit on screens
* Fix off by one
* Labels try to make things better
* Missed a label
* Make phone queues use a static pointer queue
* Static init
* Compile time constants now
* Instead, lets just use the normal pointerqueue for linux native builds and static for IoT platforms
* Add missing method
* Missing methods
* Update variant.h
Further to https://github.com/meshtastic/firmware/pull/7897 ,
there was another log line that was triggering indiscriminantly on
GPS_INTERVAL_THRESHOLD .
Rather than logging a bad time 4000 times, let's just log one good time
when it is set.
Meshtastic no longer fits on the flash of the Picomputer.
Since this is a handheld, portable device, it's unlikely that people are
connecting to it via the webserver. So, disable the webserver and it fits
again:
```
Checking size .pio/build/picomputer-s3-tft/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [=== ] 32.4% (used 106056 bytes from 327680 bytes)
Flash: [==========] 99.1% (used 3313913 bytes from 3342336 bytes)
```
Fixes: https://github.com/meshtastic/firmware/issues/7906
Further to https://github.com/meshtastic/firmware/pull/7897 ,
there was another log line that was triggering indiscriminantly on
GPS_INTERVAL_THRESHOLD .
Rather than logging a bad time 4000 times, let's just log one good time
when it is set.
289f90bdbe
merged a commit that relied on
5b9db81819
but the latter commit was not merged.
This does manual wrangling to make sure the same file that exists on develop
right now ends up on master.
In 2.7.7 / 2.7.8 we introduced some new checks for time accuracy.
In combination, these result in a spamming of the logs when a bad time is found
When the GPS is active, we're calling the GPS thread every 0.2secs.
So this log could be printed 4,500 times in a no-lock scenario :)
Reserve this experience for developers using GPS_DEBUG.
Fixes https://github.com/meshtastic/firmware/issues/7896
* Fix excluded modules configuration handling
- Add excluded_modules flags in getDeviceMetadata() for MQTT, PAXCOUNTER, STOREFORWARD, RANGETEST, NEIGHBORINFO
- Add conditional compilation guards in AdminModule for RANGETEST, AUDIO, PAXCOUNTER, STOREFORWARD, EXTNOTIF, DETECTIONSENSOR, AMBIENTLIGHTING
- Add skip logic in PhoneAPI for excluded modules during config enumeration
- Add conditional has_* flags in NodeDB only for included modules
Fixes issue where excluded modules still appeared in client applications and sometimes caused PAYLOADVARIANT_NOT_SET errors.
* Fix excluded modules issues and refactor code
- Restore original PAXCOUNTER logic: only exclude on non-ESP32 platforms due to memory constraints
- Fix has_store_forward flag to be conditionally compiled based on MESHTASTIC_EXCLUDE_STOREFORWARD
- Refactor PhoneAPI module config skipping logic to use helper function skipExcludedModuleConfig()
- Reduce code duplication in PhoneAPI by extracting common skip logic
This addresses the three issues identified in the code review:
1. PAXCOUNTER memory impact on non-ESP32 devices
2. Unconditional has_store_forward flag setting
3. Duplicated state management logic across multiple #else blocks
* Fix ambient lighting module exclusion in PhoneAPI and AdminModule
- Add conditional compilation guards for ambient lighting in PhoneAPI.cpp
- Replace old HAS_RGB_LED logic with MESHTASTIC_EXCLUDE_AMBIENTLIGHTING check in AdminModule.cpp
- Ensure ambient lighting module is properly excluded when MESHTASTIC_EXCLUDE_AMBIENTLIGHTING=1
- Fix esptool detection to use 'version' subcommand instead of no arguments
- Fix device-update.bat to use 115200 bps for flashing, 1200 bps only for reset
- Add missing closing quotes in debug messages
Replace magic numbers with named constants for better maintainability
- Add RESET_BAUD=1200 constant for reset baud rate
- Add UPDATE_OFFSET=0x10000 constant for update flash offset
- Use constants instead of hardcoded values throughout script
Extract magic numbers to constants in shell scripts for consistency
- Add FLASH_BAUD, RESET_BAUD, UPDATE_OFFSET constants to device-update.sh
- Add RESET_BAUD, FIRMWARE_OFFSET constants to device-install.sh
- Replace hardcoded values with named constants throughout
- Maintain consistency with batch script improvements
Fix Python path quoting and remove unreachable code
- Quote Python interpreter paths to handle spaces in paths like 'C:\Program Files\Python\python.exe'
- Remove unreachable GOTO statements after EXIT /B commands
- Improve robustness when custom Python interpreters are specified
Fix esptool detection for pipx installations
- Change from checking ERRORLEVEL GEQ 2 to EQU 9009
- Pipx-installed esptool returns exit code 2 when showing help (normal)
- Only treat Windows 'command not found' error (9009) as truly not found
- Add debug output to show actual exit codes for troubleshooting
* Phone GPS display on Position Screen
This is a PR to show when a phone shares GPS location with the node so you can reliably know what coordinate is being shared with the Mesh.
* Account for low resolution wide screen OLEDs
* Allow picking of Device Role and new Display Formatter for Device Role
* Add remainder of client roles to display formatter
* Don't update the role unless you pick a value
* Mascots are fun
* Fix warnings during compile time
* Improve some menus
* Mascots need to work everywhere
* Update Chirpy image
* Fix Trunk
* Update protobufs
* Add date to Clock screen
* Analog clocks love dates too
* Finalize date moves for analog clock
* Add a new GPS model CM121.
* Add CM121 to Unicore.
* Trunk fixes, remove unneded NMEA lines
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Adding a counter to show the last time a GPS coordinate was detected to ensure the user is aware how long since the coordinate updated or to identify any errors.
* chore(deps): update meshtastic/device-ui digest to 10f0244 (#7840)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* use branch of ina3221 library with fixes
* using commit hash instead of branch name
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Add initial variant and platformio configuration for RAK WISMESHTAP V2
* Add initial variant and platformio configuration for rak wismesh tap v2
* Remove unnecessary Meshtastic build flags from rak_wismesh_tap_v2 configuration
* Enable LGFX button support in rak_wismesh_tap_v2 configuration
* Revert "Enable LGFX button support in rak_wismesh_tap_v2 configuration"
This reverts commit 2bd2c1a03b.
---------
Co-authored-by: Daniel.Cao <daniel.cao@rakwireless.com>
* chore(deps): update meshtastic/device-ui digest to 10f0244 (#7840)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* use branch of ina3221 library with fixes
* using commit hash instead of branch name
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Start portduino_config refactor
* refactor GPIOs to new portduino_config
* More portduino_config work
* More conversion to portduino_config
* Finish portduino_config transition
* trunk
* yaml output work
* Simplify the GPIO config
* Trunk
* Add initial variant and platformio configuration for RAK WISMESHTAP V2
* Add initial variant and platformio configuration for rak wismesh tap v2
* Remove unnecessary Meshtastic build flags from rak_wismesh_tap_v2 configuration
* Enable LGFX button support in rak_wismesh_tap_v2 configuration
* Revert "Enable LGFX button support in rak_wismesh_tap_v2 configuration"
This reverts commit 2bd2c1a03b.
---------
Co-authored-by: Daniel.Cao <daniel.cao@rakwireless.com>
* Show ExternalNotification as excluded if it is
* Enable ExternalNotification, SerialModule and RangeTest on STM32WL
* Misc fixes for #7797 - ARCH_STM32 -> ARCH_STM32WL, use less flash by dropping weather station support for serialmodule, set tx/rx pins before begin
* Enable Serial1 on RAK3172, make SerialModule use it (console is on LPUART1)
* Fix SerialModule on RAK3172, fix board definition of RAK3172 to include the right pin mapping.
* Show ExternalNotification as excluded if it is
* Enable ExternalNotification, SerialModule and RangeTest on STM32WL
* Misc fixes for #7797 - ARCH_STM32 -> ARCH_STM32WL, use less flash by dropping weather station support for serialmodule, set tx/rx pins before begin
* Enable Serial1 on RAK3172, make SerialModule use it (console is on LPUART1)
* Fix SerialModule on RAK3172, fix board definition of RAK3172 to include the right pin mapping.
* Fix GPS that hard code 2080 as the start time.
Some GPS chips, such as the AG3335 in T1000e and L96 have a hardcoded
time of 2080-01-05 when they start up.
To fix that in a way that seems permanent, let's ignore times that
are more than 40 years since the firmware was built. We should followup
in late 2039 to see if any changes are needed.
Reported-By: @b8b8
* Update src/gps/RTC.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Put FORTY_YEARS in header and use in both places.
* Restore Ben's nicer log lines.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix GPS that hard code 2080 as the start time.
Some GPS chips, such as the AG3335 in T1000e and L96 have a hardcoded
time of 2080-01-05 when they start up.
To fix that in a way that seems permanent, let's ignore times that
are more than 40 years since the firmware was built. We should followup
in late 2039 to see if any changes are needed.
Reported-By: @b8b8
* Update src/gps/RTC.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Put FORTY_YEARS in header and use in both places.
* Restore Ben's nicer log lines.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Hold for >20s after GPS lock
GPS chips are designed to stay locked for a while to download some data and save it.
This data is important for speeding up future locks, and making them higher quality.
Our present configuration could make every lock perform similar to first lock.
This patch sets a hold of between 20s and 10% of the lock search time after lock
is acquired. This should allow the GPS to finish its work before we turn it off.
Fixes https://github.com/meshtastic/firmware/issues/7466
* Remove T1000E-specific GPS holds
The new code does the same thing, for all devices.
* Fix publishing settings
* Cleanups, removing unused variables.
* ifdef log line with GPS_DEBUG
* fixQual is not a bool.
* Hold for >20s after GPS lock
GPS chips are designed to stay locked for a while to download some data and save it.
This data is important for speeding up future locks, and making them higher quality.
Our present configuration could make every lock perform similar to first lock.
This patch sets a hold of between 20s and 10% of the lock search time after lock
is acquired. This should allow the GPS to finish its work before we turn it off.
Fixes https://github.com/meshtastic/firmware/issues/7466
* Remove T1000E-specific GPS holds
The new code does the same thing, for all devices.
* Fix publishing settings
* Cleanups, removing unused variables.
* ifdef log line with GPS_DEBUG
* fixQual is not a bool.
* Upgrade trunk (#7763)
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
* Fix device-install.bat baud rate
As reported by @gruberaaron , work to improve the 1200bps reset for
esptool caused all runs of device-install.bat to use 1200bps as
the baud rate.
This change removes the general SET "ESPTOOL_BAUD=1200" that was causing
the issues and places the baud settings for reset mode inside the conditional.
Fixes https://github.com/meshtastic/firmware/issues/7172
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com>
As reported by @gruberaaron , work to improve the 1200bps reset for
esptool caused all runs of device-install.bat to use 1200bps as
the baud rate.
This change removes the general SET "ESPTOOL_BAUD=1200" that was causing
the issues and places the baud settings for reset mode inside the conditional.
Fixes https://github.com/meshtastic/firmware/issues/7172
Further to https://github.com/meshtastic/firmware/pull/7772 ,
we discovered that some RTCs have hard-coded start times well in the
past.
This patch gives RTCs the same treatment as GPS - if the time is
earlier than BUILD_EPOCH, we don't use it.
Fixes#7771Fixes#7750
* Merge pull request #7777 from meshtastic/create-pull-request/bump-version
Bump release version
* Only send Neighbours if we have some to send. (#7493)
* Only send Neighbours if we have some to send.
The original intent of NeighborInfo was that when a NeighbourInfo
was sent all of the nodes that saw it would reply with NeighbourInfo.
So, NeighbourInfo was sent even if there were no hop-zero nodes in
the NodeDB.
Since 2023, when this was implemented, our understanding of running city-wide
meshes has improved substantially. We have taken steps to reduce the impact
of NeighborInfo over LoRa.
This change aligns with those ideas: we will now only send NeighborInfo
if we have some neighbors to contribute.
The impact of this change is that a node must first see another directly
connected node in another packet type before NeighborInfo is sent. This means
that a node with no neighbors is no longer able to trigger other nodes
to broadcast NeighborInfo. It will, however, receive the regular periodic
broadcast of NeighborInfo, and will be able to send NeighborInfo if it
has at least 1 neighbor.
* Include all the things
* AvOid memleak
* We don't gotTime if time is 2019. (#7772)
There are certain GPS chips that have a hard-coded time in firmware
that they will return before lock. We set our own hard-coded time,
BUILD_EPOCH, that should be newer and use the comparison to not set
a bad time.
In https://github.com/meshtastic/firmware/pull/7261 we introduced
the RTCSetResult and improved it in https://github.com/meshtastic/firmware/pull/7375 .
However, the original try-fix left logic in GPS.cpp that could
still result in broadcasting the bad time.
Further, as part of our fix we cleared the GPS buffer if we didn't
get a good time. The mesh was hurting at the time, so this was a reasonable
approach. However, given time tends to come in when we're trying to get
early lock, this had the potential side effect of throwing away valuable
information to get position lock.
This change reverses the clearBuffer and changes the logic so if time
is not set it will not be broadcast.
Fixes https://github.com/meshtastic/firmware/issues/7771
Fixes https://github.com/meshtastic/firmware/issues/7750
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Add On-Screen Keyboard for UpDownInterrupt. Pls notice the new keyboard layout was inspired and adviced by https://github.com/csrutil
* Add longPress event for RotaryEncoder Press.
* Update UpdownInterrupt UP and DOWN on main UI.
* Change the interrupt trigger mode from rising edge to falling edge to improve button response.
There are certain GPS chips that have a hard-coded time in firmware
that they will return before lock. We set our own hard-coded time,
BUILD_EPOCH, that should be newer and use the comparison to not set
a bad time.
In https://github.com/meshtastic/firmware/pull/7261 we introduced
the RTCSetResult and improved it in https://github.com/meshtastic/firmware/pull/7375 .
However, the original try-fix left logic in GPS.cpp that could
still result in broadcasting the bad time.
Further, as part of our fix we cleared the GPS buffer if we didn't
get a good time. The mesh was hurting at the time, so this was a reasonable
approach. However, given time tends to come in when we're trying to get
early lock, this had the potential side effect of throwing away valuable
information to get position lock.
This change reverses the clearBuffer and changes the logic so if time
is not set it will not be broadcast.
Fixes https://github.com/meshtastic/firmware/issues/7771
Fixes https://github.com/meshtastic/firmware/issues/7750
* Rename System Frame (from Memory) in code base
* Create menu options to Show/Hide frames: Node Lists, Bearings, Position, LoRa, Clock and Favorites frames
* Move Region Picker into submenu
* Tweak wording for Send Position vs Node Info if the device has GPS
We are currently blocked from making the breaking change to fix
EU_433 channel centres until 3.0 (https://github.com/meshtastic/firmware/issues/3371 )
However, as already updated in https://github.com/meshtastic/meshtastic/pull/919
the documentation, the power limit for EU_433 is 10dBm. We can change
the power limit without breaking anything, so this patch sets the
power limit to match the ETSI spec without changing any other settings.
* Add on-screen keyboard implementation on Trackball device.
* Update On-Screen Keyboard to new layout.
* The on-screen keyboard dynamically adjusts the key size based on the screen.
* Improve input box display on small screens.
* Optimize the virtual keyboard layout and cursor movement logic, and adjust the keyboard starting position for small and wide screens.
* Optimize the text alignment of numeric keys on ssd1306.
---------
Co-authored-by: whywilson <m.tools@qq.com>
stale-issue-message:This issue has not had any comment or update in the last month. If it is still relevant, please post update comments. If no comments are made, this issue will be closed automagically in 7 days.
close-issue-message:This issue has not had any comment since the last notice. It has been closed automatically. If this is incorrect, or the issue becomes relevant again, please request that it is reopened.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.