| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| en:dev:tailcontrol-command-protocol [2026/08/03 19:18] – darkgrue | en:dev:tailcontrol-command-protocol [2026/09/25 20:24] (current) – darkgrue |
|---|
| ===== Listen Mode ===== | ===== Listen Mode ===== |
| |
| Listen Mode is only available on the EarGear 2. When Listen Mode is active, a detected sound above ambient will trigger a random move and a ''LISTEN BANG'' message will be sent back to the client. If ''listenModeMovEn'' is set (default), then the firmware move will be triggered, otherwise the controlling app will be expected to send a move (if desired). | Listen Mode is only available on the EarGear 2. When Listen Mode is active, a detected sound above ambient will send a ''LISTEN BANG CENTER'', ''LISTEN BANG LEFT'', or ''LISTEN BANG RIGHT'' message (depending on the detected sound direction) will be sent back to the client. If ''listenModeMovEn'' is set (default), then the firmware move will be triggered, otherwise the controlling app will be expected to send a move (if desired). |
| | |
| Development support for basic sound localization for future hardware is supported, replacing the ''LISTEN BANG'' response with | |
| ''LISTEN BANG CENTER'', ''LISTEN BANG LEFT'', and ''LISTEN BANG RIGHT'', respectively. | |
| |
| ''LISTEN ARMED'' is sent to the debug console (but not currently to the BLE terminal) after all conditions to re-trigger have been met. | ''LISTEN ARMED'' is sent to the debug console (but not currently to the BLE terminal) after all conditions to re-trigger have been met. |
| ===== Tilt Mode ===== | ===== Tilt Mode ===== |
| |
| Tilt Mode is only available on the ClawGear and EarGear 2. When Listen Mode is active, a detected sound above ambient will trigger a random move and a ''TILT FORWARD'', ''TILT BACKWARD'', ''TILT LEFT'', or ''TILT RIGHT'' message (depending on the tilt direction) will be sent back to the client. If tiltModeMovesEnabled is set (default), then the firmware move will be triggered, otherwise the controlling app will be expected to send a move (if desired). | Tilt Mode is only available on the ClawGear and EarGear 2. When Listen Mode is active, a detected tilt will send a ''TILT FORWARD'', ''TILT BACKWARD'', ''TILT LEFT'', or ''TILT RIGHT'' message (depending on the tilt direction) will be sent back to the client. If ''tiltModeMovesEnabled'' is set (default), then the firmware move will be triggered, otherwise the controlling app will be expected to send a move (if desired). |
| |
| Triggering by Tilt Mode is inhibited when the ears are in motion, as well as a 3-second counter that runs once a sound trigger has finished executing a move AND the ClawGear/EarGear 2 has returned to the neutral tilt position during that time. This prevents tilt re-triggering if the user stays in the tilt position for an extended time. | Triggering by Tilt Mode is inhibited when the ears are in motion, as well as a 3-second counter that runs once a sound trigger has finished executing a move AND the ClawGear/EarGear 2 has returned to the neutral tilt position during that time. This prevents tilt re-triggering if the user stays in the tilt position for an extended time. |
| | |
| | |
| | ==== Notes about ClawGear Tilt Mode ==== |
| | |
| | The minimum tilt is 75° of pitch for up, and −75° for down. Pitch is ''atan2(ay, az)'' from the low-pass-filtered accelerometer data, where 0° means flat, a state triggers when that distance is 15° or less. The 5° gap between entering and exiting is hysteresis, which stops the state from flickering near the edge. Once UP or DOWN triggers, the pitch has to come back past ±70° before the state returns to NEUTRAL. |
| | |
| | Invalid readings: if ''sqrt(ay² + az²) < 0.10 g'' (the device is lying on its side), the classifier keeps the last state and doesn't reclassify. |
| | |
| | ClawGear does not have a cooldown timer enabled on it's Tilt Mode. |
| | |
| | |
| | ==== Notes about EarGear 2 Tilt Mode ==== |
| | |
| | |
| | In order to prevent erratic and constant movement of the ears while Tilt Mode is enabled, there is a reset and cooldown timer. The way it works is once the ears move out of the "dead zone," which is 14° off of center, the associated move is played. While the ears are moving, the tilt classifier is suspended (because the ear movement itself is tilting the ears). Once the ears have stopped moving, a 3000 ms (3 sec) cooldown is started. Once that timer has expired, the tilt triggers are re-enabled if the ears have EITHER returned to the center at any time during the cooldown timer OR have tilted to another trigger position other than the one that last triggered. |
| | |
| | <code> |
| | [xx:xx:03]INFO recvWithEndMarker(): COM value: 'TILTMODE'. |
| | [xx:xx:03]OK |
| | [xx:xx:03]TILT BACKWARD |
| | [xx:xx:03]INFO setMove(): new command 'TAILHA'. |
| | [xx:xx:03]TAILHA BEGIN |
| | [xx:xx:07]INFO updateMove(): Cycle 0 move patterns complete. |
| | [xx:xx:07]All pattern cycles complete. |
| | [xx:xx:07]INFO updateMove(): Move sequence complete (3419 ms). |
| | [xx:xx:07]Move sequence complete (3419 ms). |
| | [xx:xx:08]Tilt cooldown countdown: 3000 ms. |
| | [xx:xx:09]Tilt cooldown countdown: 2500 ms. |
| | [xx:xx:09]Tilt cooldown countdown: 2000 ms. |
| | [xx:xx:10]Tilt cooldown countdown: 1500 ms. |
| | [xx:xx:10]Tilt cooldown countdown: 1000 ms. |
| | [xx:xx:11]Tilt cooldown countdown: 500 ms. |
| | [xx:xx:11]Tilt cooldown ended. |
| | [xx:xx:11]Returned to center, tilt holdoff released. |
| | </code> |
| |
| |
| == Copyright 2024-2026 © The Mechanical Tail Company Limited contact@thetailcompany.com. All Rights Reserved. The Mechanical Tail Company Limited also claims trademark rights in the following: TailControl, MiTail, MiTail Mini, FlutterWings, and EarGear. Any unauthorized use is expressly prohibited. == | == Copyright 2024-2026 © The Mechanical Tail Company Limited contact@thetailcompany.com. All Rights Reserved. The Mechanical Tail Company Limited also claims trademark rights in the following: TailControl, MiTail, MiTail Mini, FlutterWings, and EarGear. Any unauthorized use is expressly prohibited. == |
| |