From 6bf8a217cdada05ff280c91a2559cdca06e1014c Mon Sep 17 00:00:00 2001 From: medentem Date: Fri, 3 Jan 2025 15:17:49 -0600 Subject: [PATCH] build fix --- .vscode/settings.json | 55 ++++++++++++++++++++++++++++++++++++- src/mesh/FloodingRouter.cpp | 6 ++-- userPrefs.jsonc | 2 +- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index bf9b82111..e3b11a454 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "editor.formatOnSave": true, + "editor.formatOnSave": false, "editor.defaultFormatter": "trunk.io", "trunk.enableWindows": true, "files.insertFinalNewline": false, @@ -7,5 +7,58 @@ "cmake.configureOnOpen": false, "[cpp]": { "editor.defaultFormatter": "trunk.io" + }, + "files.associations": { + "array": "cpp", + "atomic": "cpp", + "*.tcc": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "csignal": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "list": "cpp", + "unordered_map": "cpp", + "unordered_set": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "map": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "new": "cpp", + "ostream": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "cinttypes": "cpp", + "typeinfo": "cpp" } } diff --git a/src/mesh/FloodingRouter.cpp b/src/mesh/FloodingRouter.cpp index 3f729a4aa..d1cc9e75c 100644 --- a/src/mesh/FloodingRouter.cpp +++ b/src/mesh/FloodingRouter.cpp @@ -219,10 +219,10 @@ float FloodingRouter::calculateForwardProbability(const CoverageFilter &incoming * forwardProb = 1.0f; * } */ - /* END OPTION 2 */∏ + /* END OPTION 2 */ - // Clamp probability between 0 and 1 - forwardProb = std::min(std::max(forwardProb, 0.0f), 1.0f); + // Clamp probability between 0 and 1 + forwardProb = std::min(std::max(forwardProb, 0.0f), 1.0f); LOG_DEBUG("CoverageRatio=%.2f, ForwardProb=%.2f (Uncovered=%d, Total=%zu)", coverageRatio, forwardProb, uncovered, neighbors); diff --git a/userPrefs.jsonc b/userPrefs.jsonc index 9c224f145..f43f9508c 100644 --- a/userPrefs.jsonc +++ b/userPrefs.jsonc @@ -34,6 +34,6 @@ // "USERPREFS_USE_ADMIN_KEY_0": "{ 0xcd, 0xc0, 0xb4, 0x3c, 0x53, 0x24, 0xdf, 0x13, 0xca, 0x5a, 0xa6, 0x0c, 0x0d, 0xec, 0x85, 0x5a, 0x4c, 0xf6, 0x1a, 0x96, 0x04, 0x1a, 0x3e, 0xfc, 0xbb, 0x8e, 0x33, 0x71, 0xe5, 0xfc, 0xff, 0x3c }", // "USERPREFS_USE_ADMIN_KEY_1": "{}", // "USERPREFS_USE_ADMIN_KEY_2": "{}", - // "USERPREFS_NODEINFO_BROADCAST_CHANNEL_HASH": "8" + // "USERPREFS_NODEINFO_BROADCAST_CHANNEL_HASH": "8", "USERPREFS_USE_COVERAGE_FILTER": "true", }