Skip to content

Commit b16023d

Browse files
fix: Rename Backup to Reticle command family
CommandFamily::Backup should be CommandFamily::Reticle. The 'B' commands control reticle brightness and accessories, not backup operations. Matches LX200CommandSet.md Section B.
1 parent 6db830c commit b16023d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

include/lx200/lx200.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace lx200
4848
*/
4949
enum class CommandFamily : uint8_t {
5050
Alignment = 'A', ///< Telescope alignment commands
51-
Backup = 'B', ///< Backlash and reticle control
51+
Reticle = 'B', ///< Reticle brightness and accessory control
5252
DateTime = 'C', ///< Date/time commands (also some G, S, L)
5353
Distance = 'D', ///< Distance bars
5454
Focus = 'F', ///< Focuser control

lib/lx200/src/lx200.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ CommandFamily ParserState::identify_family(char first_char) const noexcept
125125
// Direct character-to-family mapping
126126
switch (first_char) {
127127
case 'A': return CommandFamily::Alignment;
128-
case 'B': return CommandFamily::Backup;
128+
case 'B': return CommandFamily::Reticle;
129129
case 'C': return CommandFamily::DateTime;
130130
case 'D': return CommandFamily::Distance;
131131
case 'F': return CommandFamily::Focus;

tests/lib/lx200/src/test_commands.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ZTEST(lx200, test_alignment_commands)
3737
}
3838

3939
/**
40-
* @brief Test Backup/Reticule command family (B)
40+
* @brief Test Reticle/Accessory command family (B)
4141
*
4242
* According to LX200CommandSet.md Section B:
4343
* - :B+# - Increase reticle brightness
@@ -47,7 +47,7 @@ ZTEST(lx200, test_alignment_commands)
4747
* - :$BAdd# - Set Altitude/Dec Antibacklash [LX200GPS]
4848
* - :$BZdd# - Set Azimuth/RA Antibacklash [LX200GPS]
4949
*/
50-
ZTEST(lx200, test_backup_commands)
50+
ZTEST(lx200, test_reticle_commands)
5151
{
5252
ParserState parser;
5353

@@ -57,7 +57,7 @@ ZTEST(lx200, test_backup_commands)
5757
}
5858
auto cmd = parser.get_command();
5959
zassert_true(cmd.has_value(), "Should parse B+ command");
60-
zassert_equal(cmd->family, CommandFamily::Backup, "B+ should be Backup family");
60+
zassert_equal(cmd->family, CommandFamily::Reticle, "B+ should be Reticle family");
6161

6262
// :B-# - Decrease reticle brightness
6363
parser.reset();
@@ -66,7 +66,7 @@ ZTEST(lx200, test_backup_commands)
6666
}
6767
cmd = parser.get_command();
6868
zassert_true(cmd.has_value(), "Should parse B- command");
69-
zassert_equal(cmd->family, CommandFamily::Backup, "B- should be Backup family");
69+
zassert_equal(cmd->family, CommandFamily::Reticle, "B- should be Reticle family");
7070

7171
// :B3# - Set reticle flash rate to 3
7272
parser.reset();
@@ -75,7 +75,7 @@ ZTEST(lx200, test_backup_commands)
7575
}
7676
cmd = parser.get_command();
7777
zassert_true(cmd.has_value(), "Should parse B3 command");
78-
zassert_equal(cmd->family, CommandFamily::Backup, "B3 should be Backup family");
78+
zassert_equal(cmd->family, CommandFamily::Reticle, "B3 should be Reticle family");
7979
}
8080

8181
/**

0 commit comments

Comments
 (0)