Skip to content

Commit d4e8f41

Browse files
committed
Clean up: Remove redundant comments
- Simplify normalizeTargetName() comment to "Allow hyphens due to 9.0.0 patch" - Remove "Normalized: ..." comments since function name is self-explanatory - Keep "Display: ..." comments for clarity on user-facing strings
1 parent 10407d6 commit d4e8f41

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tabs/firmware_flasher.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import dialog from '../js/dialog.js';
2323

2424
TABS.firmware_flasher = {};
2525

26-
// Normalize target names by converting hyphens to underscores for consistent matching
27-
// This allows both TBS_LUCID_H7_WING and TBS-LUCID-H7-WING to match
26+
// Allow hyphens due to 9.0.0 patch
2827
function normalizeTargetName(name) {
2928
return name.replace(/-/g, '_');
3029
}
@@ -89,7 +88,7 @@ TABS.firmware_flasher.initialize = function (callback) {
8988

9089
var rawMatch = match[3]; // e.g., "TBS-LUCID-H7-WING" or "TBS_LUCID_H7_WING"
9190
return {
92-
target_id: normalizeTargetName(rawMatch), // Normalized: "TBS_LUCID_H7_WING"
91+
target_id: normalizeTargetName(rawMatch),
9392
target: rawMatch.replace(/_/g, " ").replace(/-/g, " "), // Display: "TBS LUCID H7 WING"
9493
format: match[9],
9594
version: match[1]+match[2],
@@ -110,7 +109,7 @@ TABS.firmware_flasher.initialize = function (callback) {
110109

111110
var rawMatch = match[2]; // e.g., "MATEKF405" or "MATEK-F405"
112111
return {
113-
target_id: normalizeTargetName(rawMatch), // Normalized: "MATEKF405"
112+
target_id: normalizeTargetName(rawMatch),
114113
target: rawMatch.replace(/_/g, " ").replace(/-/g, " "), // Display: "MATEKF405"
115114
format: match[3],
116115
};

0 commit comments

Comments
 (0)