Commit Graph
42 Commits
Author SHA1 Message Date
22d63fa69c Lora settings expansion and validation logic improvement (#9878)
* Enhance LoRa configuration with modem presets and validation logic

* Rename bootstrapLoRaConfigFromPreset tests to validateModemConfig for clarity and consistency

* additional tidy-ups to the validateModemConfig - still fundamentally broken at this point

* Enhance region validation by adding numPresets to RegionInfo and implementing validateRegionConfig in RadioInterface

* Add validation for modem configuration in applyModemConfig

* Fix region unset handling and improve modem config validation in handleSetConfig

* Refactor LoRa configuration validation methods and introduce clamping method for invalid settings

* Update handleSetConfig to use fromOthers parameter to either correct or reject invalid settings

* Fix some of the copilot review comments for LoRa configuration validation and clamping methods; add tests for region and preset handling

* Redid the slot default checking and calculation. Should resolve the outstanding comments.

* Add bandwidth calculation for LoRa modem preset fallback in clampConfigLora

* Remove unused preset name variable in validateConfigLora and fix default frequency slot check in applyModemConfig

* update tests for region handling

* Got the synthetic colleague to add mock service for testing

* Flash savings... hopefully

* Refactor modem preset handling to use sentinel values and improve default preset retrieval

* Refactor region handling to use profile structures for modem presets and channel calculations

* added comments for clarity on parameters

* Add shadow table tests and validateConfigLora enhancements for region presets

* Add isFromUs tests for preset validation in AdminModule

* Respond to copilot github review

* address copilot comments

* address null poointers

* fix build errors

* Fix the fix, undo the silly suggestions from synthetic reviewer.

* we all float here

* Fix include path for AdminModule in test_main.cpp

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* More suggestion fixes

* admin module merge conflicts

* admin module fixes from merge hell

* fix: initialize default frequency slot and custom channel name; update LNA mode handling

* save some bytes...

* fix: simplify error logging for bandwidth checks in LoRa configuration

* Update src/mesh/MeshRadio.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-20 07:43:47 -05:00
JorropoandGitHub beb268ff25 Revert "add a .clang-format file (#9154)" (#9172)
I thought git would be smart enough to understand all the whitespace changes but even with all the flags I know to make it ignore theses it still blows up if there are identical changes on both sides.

I have a solution but it require creating a new commit at the merge base for each conflicting PR and merging it into develop.

I don't think blowing up all PRs is worth for now, maybe if we can coordinate this for V3 let's say.

This reverts commit 0d11331d18.
2026-01-04 05:15:53 -06:00
JorropoandGitHub 0d11331d18 add a .clang-format file (#9154) 2026-01-03 14:19:24 -06:00
Ben MeadorsandGitHub 50dac38a1b Pass#2: Lots more savings in logs and string reduction surgery (#5251)
* Pass#2: Lots more savings in logs and string reduction surgery

* Don't need Thread suffix either

* Warn
2024-11-04 12:16:25 -06:00
05e4a639a1 remove newline from logging statements. (#5022)
remove newline from logging statements in code. The LOG_* functions will now magically add it at the end.

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-10-14 15:11:43 +11:00
GUVWAFandGitHub 673fe294f3 Add rxDupe, txRelay and txRelayCanceled to LocalStats (#4936)
* Introduce `isFromUs()` and `isToUs()`

* Add rxDupe, txRelay and txRelayCanceled to LocalStats
2024-10-04 06:28:51 -05:00
Jonathan BennettandGitHub d2ea430a3e Make SPI frequency and TOPHONE queue size configurable on Native (#4369)
* Make SPI frequency configurable on Native

* Make the tophone queue size configurable for Portduino

* The modified SPISettings must be configured in setup(), after config.yaml is processed

* make MeshService a pointer, so we can configure MAX_RX_TOPHONE at run time

* Got a little over excited with refactoring

* Silence a warning
2024-08-01 19:29:49 -05:00
eabec5ae34 Show specific frame when updating screen (#4264)
* Updated setFrames in Screen.cpp

Added code to attempt to revert back to the same frame that user was on prior to setFrame reload.

* Space added Screen.cpp

* Update Screen.cpp

Make screen to revert to Frame 0 if the originally displayed frame is no longer there.

* Update Screen.cpp

Inserted boolean holdPosition into setFrames to indicate the requirement to stay on the same frame ( if =true) or else it will switch to new frame .
Only Screen::handleStatusUpdate calls with setFrame(true). ( For Node Updates)
All other types of updates call as before setFrame(), so it will change focus as needed.

* Hold position, even if number of frames increases

* Hold position, if handling an outgoing text message

* Update Screen.cpp

* Reverted chnages related to devicestate.has_rx_text_message

* Reset to master

* CannedMessages only handles routing packets when waiting for ACK
Previously, this was calling Screen::setFrames at unexpected times

* Gather position info about screen frames while regenerating

* Make admin module observable
Notify only when relevant. Currently: only to handle remove_nodenum.

* Optionally specify which frame to focus when setFrames runs

* UIFrameEvent uses enum instead of multiple booleans

* Allow modules to request their own frame to be focussed
This is done internally by calling MeshModule::requestFocus()
Easier this way, insteady of passing the info in the UIFrameEvent:
* Modules don't always know whether they should be focussed until after the UIFrameEvent has been raised, in dramFrame
* Don't have to pass reference to module instance as parameter though several methods

* E-Ink screensaver uses FOCUS_PRESERVE
Previously, it had its own basic implementation of this.

* Spelling: regional variant

* trunk

* Fix HAS_SCREEN guarding

* More HAS_SCREEN guarding

---------

Co-authored-by: BIST <77391720+slash-bit@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: slash-bit <v-b2@live.com>
2024-07-11 18:51:26 -05:00
dfcd0d14f6 Add MaxNodes to Native config (#3427)
* Add MaxNodes to Native

* It compiles...

* Convert nodedb to use new

* Closer but still broken.

* Finally working

* Remove unintended lines

* Don't include a pointer

* Capitalization matters.

* avoid rename in protocol regen

* When trimming the nodeDB, start with a cleanup

* Remove extra cleanupMeshDB() call for now

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-21 09:06:37 -05:00
Thomas HerrmannandGitHub 4ffb906fe8 move duplicate #define for screen to unified header file (#3302) 2024-02-27 12:49:46 -06:00
Thomas Göttgens add78a459b Include Libpax - WIP 2023-12-17 18:30:38 +01:00
Thomas GöttgensandGitHub 4e54bec525 Force small fonts on Low DPI screens, no matter what the driver default uses. Up till now we assumed large fonts on E-Paper and TFT Screens. (#2677) 2023-08-03 06:58:19 -05:00
IhorNehrutsaandGitHub 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
GUVWAFandThomas Göttgens 8f736c8ecc Remove sending network ping to displayed node on interval 2023-03-26 16:16:01 +02:00
Thomas Göttgens 9150c2e568 fix stuff i somehow inadvertently broke. 2023-03-08 17:12:25 +01:00
Thomas Göttgens 267db05d69 - G1 Explorer use correct display controller
- adhere UA font in modules
2023-03-08 17:12:25 +01:00
Thomas Göttgens cdf379616c whatever makes trunk happy. 2023-01-21 21:23:24 +01:00
Thomas Göttgens 6fdb93cd16 re-add namespacing in protobufs. Let's see what i missed. Portduino likely ...
Checking in generated on purpose.
2023-01-21 21:23:24 +01:00
Thomas Göttgens 51b2c431d9 trunk roundhouse kick 2023-01-21 21:23:24 +01:00
Thomas Göttgens 03c5dfc7a8 initial cleanup work 2023-01-07 13:16:58 +01:00
Thomas GöttgensandGitHub 8a9af37d82 Merge branch 'develop' into nice-threads 2022-12-30 20:18:19 +01:00
Ben Meadors f1cdfd163d Replaced all of the logging with proper log levels 2022-12-30 10:27:07 -06:00
Thomas Göttgens 115cb05d3b less verbose logging and heap free printing 2022-12-30 14:22:08 +01:00
Ben Meadors 0b5cae5393 Log levels refactoring 2022-12-29 20:41:37 -06:00
Ben Meadors 110c80d045 Make disable return an int32_t for runOnce usage 2022-12-29 16:54:39 -06:00
Ben Meadors 38a1315599 Refactor OSThread consumers to use disable() 2022-12-29 16:26:25 -06:00
Thomas Göttgens 41a1dfec79 a lot of thread housekeeping. Switch them off when not needed / disabled. 2022-12-29 15:45:49 +01:00
Thomas Göttgens 3cde75f97b Audio Module: format messages better 2022-12-16 20:30:54 +01:00
Thomas Göttgens eae7f8a786 fix building DIY-1 target 2022-12-14 14:33:59 +01:00
Thomas Göttgens 627b21f3f2 made a nice PTT/RECV screen for audio module. And cleaned up screen graphics a bit. 2022-12-13 17:31:01 +01:00
Thomas Göttgens 24cc479f95 if we get different frames than our own transmission setup, decode and play them anyway 2022-12-11 23:12:00 +01:00
Thomas Göttgens bb1a9192eb send a 4 byte magic header including the codec version 2022-12-02 13:44:36 +01:00
Thomas Göttgens 470e711383 Audio Module is finished for regression tests. 2022-12-02 12:58:26 +01:00
Thomas Göttgens 4b63730efb Still WIP, but first working version of audio. I2S works good, analogue not so much. 2022-12-02 00:30:31 +01:00
Thomas Göttgens fb89828990 Definition cleanup and AudioModule WIP 2022-12-01 17:47:04 +01:00
Thomas Göttgens 628028475c fix compile 2022-11-29 17:45:57 +01:00
Thomas Göttgens 05e992ad67 WIP: add digital audio. Needs a proto change, so checking in generated files for now. 2022-11-29 17:19:10 +01:00
Thomas Göttgens bba6bf387e hopefully fix compilation errors 2022-11-29 14:35:46 +01:00
Thomas Göttgens 4d32f7c5ad WIP: audio module still does not work, but enabled for all regions where audio is permitted. 2022-11-29 11:22:18 +01:00
Thomas Göttgens 803858ab0a change default pins for codec2 to work on TLORA 2.1-1.8 2022-11-09 11:50:13 +01:00
Thomas Göttgens 631db56a44 Next try, plus change cppcheck defines back. 2022-11-06 14:32:02 +01:00
Thomas Göttgens 09ddde177c codec2 Audio Support for SX1280 (untested) 2022-11-02 18:23:41 +01:00