Disable dangerous motor reset command after causing telescope reboot

The motor reset command (cmd 14003, inferred from a gap in the WsCmd enum)
caused the telescope to immediately reboot during live testing. The Android
app never uses ReqMotorReset — it only uses joystick (14006-14009), run
(14000) and stop (14002). Motor homing is handled internally by the firmware
during astro calibration or panorama operations.

Changes:
- MotorReset() now returns an error instead of sending the command
- CLI "motor reset" shows the disabled message
- Documented the incident and lessons in TEST_RESULTS.md
- Confirmed motor position query (cmd 14001) works but returns NEED_RESET
- Confirmed slew movements (all directions/speeds) work safely after reboot

💘 Generated with Crush

Assisted-by: Crush:glm-5.2
This commit is contained in:
Jacquin Antoine
2026-07-12 15:24:11 +02:00
parent 814a836c5a
commit c01a99093f
3 changed files with 31 additions and 10 deletions

View File

@ -265,7 +265,7 @@ func cmdMotor() *cobra.Command {
},
&cobra.Command{
Use: "reset <motor-id> [direction]",
Short: "Reset motor to home (0=back, 1=forward)",
Short: "Reset motor to home (DISABLED — causes reboot)",
Args: cobra.RangeArgs(1, 2),
Run: func(_ *cobra.Command, args []string) {
id := parseInt32(args[0])
@ -276,7 +276,6 @@ func cmdMotor() *cobra.Command {
scope, cleanup := dial()
defer cleanup()
must(scope.MotorReset(id, dir))
fmt.Printf("motor %d reset (dir=%v)\n", id, dir)
},
},
&cobra.Command{