Add complete DWARFLAB protocol documentation
- Architecture overview, BLE and WebSocket protocols - All 19 modules with command IDs validated against smali source - BLE packet format with CRC-16/MODBUS pseudocode - Complete WsCmd index (~300 commands) - Connection flow with pseudocode examples - Methodology section explaining APK decompilation process
This commit is contained in:
237
08_motor_focus_track_commands.md
Normal file
237
08_motor_focus_track_commands.md
Normal file
@ -0,0 +1,237 @@
|
||||
# Motor, Focus & Track Commands
|
||||
|
||||
## MotorControlProto — Module MOTOR (ID=6, base 14000)
|
||||
|
||||
### ReqMotorRun — Run Motor
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `id` | 1 | int32 | Motor ID |
|
||||
| `speed` | 2 | int32 | Speed |
|
||||
| `direction` | 3 | int32 | Direction |
|
||||
| `speedRamping` | 4 | bool | Speed ramping enabled |
|
||||
| `resolutionLevel` | 5 | int32 | Resolution level |
|
||||
|
||||
### ReqMotorStop — Stop Motor
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `id` | 1 | int32 | Motor ID |
|
||||
|
||||
### ReqMotorRunTo — Move to Position
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `id` | 1 | int32 | Motor ID |
|
||||
| `endPosition` | 2 | double | Target position |
|
||||
| `speed` | 3 | int32 | Speed |
|
||||
| `speedRamping` | 4 | bool | Speed ramping |
|
||||
| `resolutionLevel` | 5 | int32 | Resolution level |
|
||||
|
||||
### ReqMotorRunInPulse — Pulse Mode
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `id` | 1 | int32 | Motor ID |
|
||||
| `frequency` | 2 | int32 | Frequency |
|
||||
| `direction` | 3 | int32 | Direction |
|
||||
| `speedRamping` | 4 | bool | Speed ramping |
|
||||
| `resolution` | 5 | int32 | Resolution |
|
||||
| `pulse` | 6 | int32 | Pulse count |
|
||||
| `mode` | 7 | int32 | Mode |
|
||||
|
||||
### ReqMotorChangeSpeed — Change Speed
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `id` | 1 | int32 | Motor ID |
|
||||
| `speed` | 2 | int32 | New speed |
|
||||
|
||||
### ReqMotorChangeDirection — Change Direction
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `id` | 1 | int32 | Motor ID |
|
||||
| `direction` | 2 | int32 | New direction |
|
||||
|
||||
### ReqMotorReset — Reset Motor
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `id` | 1 | int32 | Motor ID |
|
||||
| `direction` | 2 | int32 | Reset direction |
|
||||
|
||||
### ReqMotorGetPosition — Get Position
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `id` | 1 | int32 | Motor ID |
|
||||
|
||||
### ReqMotorServiceJoystick — Joystick Control
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `vectorAngle` | 1 | int32 | Joystick angle |
|
||||
| `vectorLength` | 2 | int32 | Joystick magnitude |
|
||||
|
||||
### ReqMotorServiceJoystickFixedAngle — Fixed-Angle Joystick
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `vectorAngle` | 1 | int32 | Angle |
|
||||
| `vectorLength` | 2 | int32 | Magnitude |
|
||||
|
||||
### ReqMotorServiceJoystickStop — Stop Joystick (no fields)
|
||||
|
||||
### ReqDualCameraLinkage — Dual Camera Linkage
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `x` | 1 | int32 | X position |
|
||||
| `y` | 2 | int32 | Y position |
|
||||
|
||||
### Responses
|
||||
|
||||
- **ResMotor**: `id` (int32, #1) + `code` (int32, #2)
|
||||
- **ResMotorPosition**: `id` (int32, #1) + `code` (int32, #2) + `position` (double, #3)
|
||||
|
||||
### Command IDs
|
||||
|
||||
| ID | Command |
|
||||
|----|---------|
|
||||
| 14000 | STEP_MOTOR_RUN |
|
||||
| 14002 | STEP_MOTOR_STOP |
|
||||
| 14006 | STEP_MOTOR_SERVICE_JOYSTICK |
|
||||
| 14007 | STEP_MOTOR_SERVICE_JOYSTICK_FIXED_ANGLE |
|
||||
| 14008 | STEP_MOTOR_SERVICE_JOYSTICK_STOP |
|
||||
| 14009 | STEP_MOTOR_SERVICE_DUAL_CAMERA_LINKAGE |
|
||||
|
||||
> **Note**: IDs 14001, 14003-14005 are not assigned.
|
||||
|
||||
---
|
||||
|
||||
## FocusProto — Module FOCUS (ID=8, base 15000)
|
||||
|
||||
### ReqAstroAutoFocus — Astro Autofocus
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `mode` | 1 | int32 | Focus mode |
|
||||
|
||||
### ReqStopAstroAutoFocus — No fields
|
||||
|
||||
### ReqNormalAutoFocus — Normal Autofocus
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `mode` | 1 | int32 | Focus mode |
|
||||
| `centerX` | 2 | int32 | Focus center X |
|
||||
| `centerY` | 3 | int32 | Focus center Y |
|
||||
|
||||
### ReqManualSingleStepFocus — Step Focus
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `direction` | 1 | int32 | Direction |
|
||||
|
||||
### ReqManualContinuFocus — Continuous Focus
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `direction` | 1 | int32 | Direction |
|
||||
|
||||
### ReqStopManualContinuFocus — No fields
|
||||
|
||||
### ReqGetUserInfinityPos — No fields
|
||||
|
||||
### ReqSetUserInfinityPos
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `pos` | 1 | int32 | Infinity position |
|
||||
|
||||
### ResUserInfinityPos
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `code` | 1 | int32 | Status code |
|
||||
| `pos` | 2 | int32 | Position |
|
||||
|
||||
### Command IDs
|
||||
|
||||
| ID | Command |
|
||||
|----|---------|
|
||||
| 15000 | FOCUS_AUTO_FOCUS |
|
||||
| 15001 | FOCUS_MANUAL_SINGLE_STEP_FOCUS |
|
||||
| 15002 | FOCUS_START_MANUAL_CONTINU_FOCUS |
|
||||
| 15003 | FOCUS_STOP_MANUAL_CONTINU_FOCUS |
|
||||
| 15004 | FOCUS_START_ASTRO_AUTO_FOCUS |
|
||||
| 15005 | FOCUS_STOP_ASTRO_AUTO_FOCUS |
|
||||
| 15011 | FOCUS_GET_USER_INFINITY_POS |
|
||||
| 15012 | FOCUS_SET_USER_INFINITY_POS |
|
||||
|
||||
> **Note**: IDs 15006-15010 are not assigned.
|
||||
|
||||
---
|
||||
|
||||
## TrackProto — Module TRACK (ID=7, base 14800)
|
||||
|
||||
### ReqStartTrack — Start Tracking
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `x` | 1 | int32 | X position |
|
||||
| `y` | 2 | int32 | Y position |
|
||||
| `w` | 3 | int32 | Width |
|
||||
| `h` | 4 | int32 | Height |
|
||||
| `camId` | 5 | int32 | Camera ID |
|
||||
|
||||
### ReqStartTrackClick — Click Tracking
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `x` | 1 | int32 | X position |
|
||||
| `y` | 2 | int32 | Y position |
|
||||
| `camId` | 3 | int32 | Camera ID |
|
||||
|
||||
### ReqStopTrack, ReqContinueTrack — No fields
|
||||
|
||||
### ReqMOTTrackOne — MOT Track One Target
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `id` | 1 | int32 | Target ID |
|
||||
|
||||
### ReqStartSentryMode — Start Sentry
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `type` | 1 | int32 | Sentry type |
|
||||
|
||||
### ReqStopSentryMode — No fields
|
||||
|
||||
### ReqUFOAutoHandMode — UFO Auto/Manual Mode
|
||||
|
||||
| Field | # | Type | Description |
|
||||
|-------|---|------|-------------|
|
||||
| `mode` | 1 | int32 | Mode (auto/manual) |
|
||||
|
||||
### Command IDs
|
||||
|
||||
| ID | Command |
|
||||
|----|---------|
|
||||
| 14800 | TRACK_START_TRACK |
|
||||
| 14801 | TRACK_STOP_TRACK |
|
||||
| 14802 | SENTRY_MODE_START |
|
||||
| 14803 | SENTRY_MODE_STOP |
|
||||
| 14804 | MOT_START |
|
||||
| 14805 | MOT_TRACK_ONE |
|
||||
| 14806 | UFOTRACK_MODE_START |
|
||||
| 14807 | UFOTRACK_MODE_STOP |
|
||||
| 14808 | MOT_WIDE_TRACK_ONE |
|
||||
| 14809 | SWITCH_MAIN_PREVIEW |
|
||||
| 14810 | UFO_HAND_AOTO_MODE |
|
||||
| 14811 | SENTRY_SCENE_SELECT |
|
||||
| 14812 | TRACK_START_CLICK |
|
||||
|
||||
> **Note**: `CMD_UFO_HAND_AOTO_MODE` — the "AOTO" spelling is as-is in the source code (typo for "AUTO").
|
||||
Reference in New Issue
Block a user