From 659ffcf927d3e47e904bbe07a5e20ea4dc4c9fa5 Mon Sep 17 00:00:00 2001 From: Eden Gilbert Date: Sat, 21 Feb 2026 22:59:20 +0300 Subject: [PATCH 1/2] Param save: use natural sort Use localeCompare with numeric option to sort parameters naturally, matching the ordering used by MAVProxy and Mission Planner (e.g. RC2 before RC10). Closes #244 --- Libraries/Param_Helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Param_Helpers.js b/Libraries/Param_Helpers.js index 6d058931..d43bdde9 100644 --- a/Libraries/Param_Helpers.js +++ b/Libraries/Param_Helpers.js @@ -92,9 +92,9 @@ function param_to_string(value) // Return formatted text for param download function get_param_download_text(params) { - // Sort alphabetically, localeCompare does underscores differently to built in sort + // Natural sort to match MAVProxy and Mission Planner param file ordering const keys = Object.keys(params).sort((a, b) => - a.localeCompare(b) + a.localeCompare(b, undefined, {numeric: true}) ) let text = "" From b4ed77a7b328b4c5d70d816081fdc6ee18f34886 Mon Sep 17 00:00:00 2001 From: Eden Gilbert Date: Sun, 22 Feb 2026 12:47:05 +0300 Subject: [PATCH 2/2] LogFinder: use natural sort for params Use localeCompare with numeric option to sort parameters naturally, matching the ordering used by MAVProxy and Mission Planner. --- LogFinder/LogFinder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LogFinder/LogFinder.js b/LogFinder/LogFinder.js index 5e5b0eda..b1587848 100644 --- a/LogFinder/LogFinder.js +++ b/LogFinder/LogFinder.js @@ -386,7 +386,7 @@ function setup_table(logs) { // Sort alphabetically, localeCompare does underscores differently to built in sort function param_sort(a, b) { - return a.localeCompare(b) + return a.localeCompare(b, undefined, {numeric: true}) } if (Object.keys(diff.added).length > 0) {