Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dev:tailcontrol-command-protocol [2024/06/13 00:22] – darkgrue | en:dev:tailcontrol-command-protocol [2024/06/28 15:43] (current) – darkgrue | ||
---|---|---|---|
Line 10: | Line 10: | ||
===== Bluetooth Low Energy (BLE) ===== | ===== Bluetooth Low Energy (BLE) ===== | ||
- | The hardware platform uses the "Just Works" Bluetooth Low Energy (BLE) pairing method to connect. | + | The hardware platform uses the "Just Works" Bluetooth Low Energy (BLE) pairing method to connect. If Conference Mode ([[# |
Line 152: | Line 152: | ||
| **HWVER** | Returns **H**ard**W**are **VER**sion; | | **HWVER** | Returns **H**ard**W**are **VER**sion; | ||
| **PING** | Keepalive heartbeat (from application), | | **PING** | Keepalive heartbeat (from application), | ||
- | | **SETPUSSKEY** | **SET** **P**a**SSKEY**, | + | | **SETPUSSKEY** | **SET** **P**a**SSKEY**, |
| **SHUTDOWN** | **SHUT DOWN** the unit (will lose the BLE connection), | | **SHUTDOWN** | **SHUT DOWN** the unit (will lose the BLE connection), | ||
| **STOPAUTO** | **STOP AUTO**nomous Mode, returns '' | | **STOPAUTO** | **STOP AUTO**nomous Mode, returns '' | ||
Line 167: | Line 167: | ||
| **FORMATNVS** | **FORMAT** **NVS** (erase all contents of the default NVS partition, including BLE bonds) and reboot | | | **FORMATNVS** | **FORMAT** **NVS** (erase all contents of the default NVS partition, including BLE bonds) and reboot | | ||
| **OTA** | Starts firmware **O**ver **T**he **A**ir update process (e.g., '' | | **OTA** | Starts firmware **O**ver **T**he **A**ir update process (e.g., '' | ||
- | | **READCONF** | **READ** running **CONF**iguration; | + | | **READCONF** | **READ** running **CONF**iguration; |
- | | **READNVS** | **READ** **CONF**iguration from NVS; returns space-delimited configuration parameters (e.g., '' | + | | **READNVS** | **READ** **CONF**iguration from NVS; returns space-delimited configuration parameters |
| **REBOOT** | **REBOOT** after 3 seconds, returns '' | | **REBOOT** | **REBOOT** after 3 seconds, returns '' | ||
| **SETHOME** | **SET** **HOME** position (0 through 8) for each servo (e.g., '' | | **SETHOME** | **SET** **HOME** position (0 through 8) for each servo (e.g., '' | ||
| **TASKU** | Prints to the hardware serial console the minimum amount in words of remaining stack space that was available to the task since the task started executing, returns '' | | **TASKU** | Prints to the hardware serial console the minimum amount in words of remaining stack space that was available to the task since the task started executing, returns '' | ||
- | | **WRITECONF** | **WRITE** **CONF**iguration to NVS and set running configuration to match (e.g., '' | + | | **WRITECONF** | **WRITE** **CONF**iguration to NVS and set running configuration to match (e.g., '' |
===== Directly Set Servo Position ===== | ===== Directly Set Servo Position ===== | ||
Line 194: | Line 194: | ||
* Parameters of type **A**, **B**, **E**, **F**, **H**, **L**, and **M** can appear in any order (e.g., '' | * Parameters of type **A**, **B**, **E**, **F**, **H**, **L**, and **M** can appear in any order (e.g., '' | ||
* Parameters can be separated by any character that is not a number or a letter (e.g., space, comma, semicolon). However, the letters themselves act as separators, and it is recommended that no additional characters are used, as the serial buffer has a limited capacity and may not be able to store the whole instruction. | * Parameters can be separated by any character that is not a number or a letter (e.g., space, comma, semicolon). However, the letters themselves act as separators, and it is recommended that no additional characters are used, as the serial buffer has a limited capacity and may not be able to store the whole instruction. | ||
- | * Depending on the tail and position, it can sag out of the commanded position when servo power is released at the end of the DSSP move. This may cause a visual defect jerking back into position when the next move starts. | + | * Depending on the tail and position, it can sag out of the commanded position when servo power is released at the end of the DSSP move. This may cause a visual defect |
==== DSSP Example ==== | ==== DSSP Example ==== | ||
Line 223: | Line 223: | ||
| **H** | Move to home position at end of move | 0 = false (default), 1 = true | | | **H** | Move to home position at end of move | 0 = false (default), 1 = true | | ||
- | ===== USERMOVE Examples | + | **USERLEDS U< |
+ | |||
+ | ^ Prefix | ||
+ | | **U** | User preset number | <1 ... 4> | | ||
+ | | **P** | Number of points in the Glow Tip pattern | <1 ... 32> | | ||
+ | | **N** | Number of cycles (times the pattern will be repeated) | <0 ... 255> | | ||
+ | | **A** | Brightness point for Glow Tip | <0 ... 8>\\ 0 -> LEDs off\\ ...\\ 4 -> 50% intensity\\ ...\\ 8-> LEDs max intensity | | ||
+ | | **S/L** | Time between the current point and the next (in 20 ms increments)\\ **S** will wait in the current position, then move to the next when the time has elapsed\\ **L** will gradually move from the current position to the next, over the time specified | 0 ... 127 (time * 20 ms) | | ||
+ | |||
+ | **Notes: | ||
+ | * Parameters of type **A**, **B**, **E**, **F**, **H**, **L**, **M**, and **S** can appear in any order (e.g., `EEAABBSS`, `ABAEBESS`, etc.). | ||
+ | * Parameters can be separated by any character that is not a number or a letter (e.g., space, comma, semicolon). However, the letters themselves act as separators, and it is recommended that no additional characters are used, as the serial buffer has a limited capacity and may not be able to store the whole instruction. | ||
+ | * Note the upper limit on the **P** parameter (and the consequential limit of moves in a move or LED pattern). | ||
+ | * There is a **128-character limit** on the serial input buffer. | ||
+ | |||
+ | ==== USERMOVE Examples ==== | ||
- | ==== Example 1 – Slow Wag 1 (same as the '' | + | === Example 1 – Slow Wag 1 (same as the '' |
Both servos move from 143° to 41° (position 7 to 1) and back, for 3 times; each cycle is (75 + 75) * 20 ms = 3 s long. | Both servos move from 143° to 41° (position 7 to 1) and back, for 3 times; each cycle is (75 + 75) * 20 ms = 3 s long. | ||
Line 242: | Line 257: | ||
* **H1** Home at end of move | * **H1** Home at end of move | ||
- | ==== Example 2 – Test Servos | + | === Example 2 – Test Servos === |
Moves servos in steps of 90° every 2 seconds; Servo 2 is delayed by 90°. | Moves servos in steps of 90° every 2 seconds; Servo 2 is delayed by 90°. | ||
Line 258: | Line 273: | ||
* **H1** Home at end of move | * **H1** Home at end of move | ||
- | **USERLEDS | + | ==== USERLEDS |
- | ^ Prefix | + | === Example 1 – Beacon (same as the '' |
- | | **U** | User preset number | <1 ... 4> | | + | |
- | | **P** | Number of points in the Glow Tip pattern | <1 ... 32> | | + | |
- | | **N** | Number of cycles (times the pattern will be repeated) | <0 ... 255> | | + | |
- | | **A** | Brightness point for Glow Tip | <0 ... 8>\\ 0 -> LEDs off\\ ...\\ 4 -> 50% intensity\\ ...\\ 8-> LEDs max intensity | | + | |
- | | **S/L** | Time between the current point and the next (in 20 ms increments)\\ **S** will wait in the current position, then move to the next when the time has elapsed\\ **L** will gradually move from the current position to the next, over the time specified | 0 ... 127 (time * 20 ms) | | + | |
- | + | ||
- | **Notes: | + | |
- | * Parameters of type **A**, **B**, **E**, **F**, **H**, **L**, **M**, and **S** can appear in any order (e.g., `EEAABBSS`, `ABAEBESS`, etc.). | + | |
- | * Parameters can be separated by any character that is not a number or a letter (e.g., space, comma, semicolon). However, the letters themselves act as separators, and it is recommended that no additional characters are used, as the serial buffer has a limited capacity and may not be able to store the whole instruction. | + | |
- | * Note the upper limit on the **P** parameter (and the consequential limit of moves in a move or LED pattern). | + | |
- | * There is a **128-character limit** on the serial input buffer. | + | |
- | + | ||
- | ===== USERLEDS Examples ===== | + | |
- | + | ||
- | ==== Example 1 – Beacon (same as the '' | + | |
The Glow Tip LEDs light up for 100 ms every 1 s (Airbus A320 tail strobe). | The Glow Tip LEDs light up for 100 ms every 1 s (Airbus A320 tail strobe). | ||
Line 288: | Line 288: | ||
* **S5S95** On for 5 * 20 ms = 100 ms; off for 50 * 20ms = 1 s | * **S5S95** On for 5 * 20 ms = 100 ms; off for 50 * 20ms = 1 s | ||
- | ==== Example 2 – Fade in/out (similar to '' | + | === Example 2 – Fade in/out (similar to '' |
The Glow Tip LEDs light up slowly, then dim until completely off; this is repeated 3 times. | The Glow Tip LEDs light up slowly, then dim until completely off; this is repeated 3 times. | ||
Line 353: | Line 353: | ||
The device will then reboot in 3 seconds. If the bond needs to be removed or reset, see [[en: | The device will then reboot in 3 seconds. If the bond needs to be removed or reset, see [[en: | ||
+ | |||
==== Unbinding ==== | ==== Unbinding ==== | ||
Line 371: | Line 372: | ||
- | ==== iOS Casual Mode ==== | + | ===== iOS Casual Mode ===== |
[This feature is pending removal in a future release.] | [This feature is pending removal in a future release.] | ||
Line 382: | Line 383: | ||
Important! The minimum random pause cannot be less that 15 seconds. | Important! The minimum random pause cannot be less that 15 seconds. | ||
- | |||
==== iOS Casual Mode Example ==== | ==== iOS Casual Mode Example ==== |