-
Notifications
You must be signed in to change notification settings - Fork 0
MiP_Clap
Manages MiP's clap detection system, from enabling/disabling to delay configuration and event reading.
Signature: void enableEvents()
Summary: Enables MiP's clap event reporting.
Details:
Verified method: sends the enable command and reads back settings to confirm success. Retries automatically on failure.
Signature: void disableEvents()
Summary: Disables clap event reporting from MiP.
Details:
Verified method: sends the disable command and reads back settings to confirm success. Retries automatically on failure.
Signature: bool areEventsEnabled()
Summary: Checks if clap event reporting is currently enabled.
Returns: true if enabled, false otherwise.
Signature: uint8_t availableEvents()
Summary: Returns the number of unread clap events in the queue.
Details:
Processes any pending serial data first to update the queue.
Returns: uint8_t Number of available clap events.
Signature: uint8_t readEvent()
Summary: Reads the next available clap event from the queue.
Details:
Processes pending serial data first. If no event is available, sets last error to MIP_ERROR_NO_EVENT.
Returns: uint8_t The clap event code, or 0 if none available.
Signature: uint16_t readDelay()
Summary: Reads the current clap delay setting.
Returns: uint16_t The delay in milliseconds between clap events, or 0 on error.
Signature: void writeDelay(uint16_t delay)
Summary: Sets the minimum delay between clap events.
Details:
Verified method: sends the new delay and confirms by reading back settings. Retries automatically on mismatch or error.
Parameters:
| Parameter | Description |
|---|---|
delay |
Delay in milliseconds between allowed clap reports. |
- MiP
- MiPChestLED
- MiPClapSettings
- MiPDebug
- MiPHardwareInfo
- MiPHeadLEDs
- MiPIRDongleCode
- MiPSoftwareVersion
- MiPStatus
- MiP_Battery
- MiP_ChestLED
- MiP_Clap
- MiP_EEPROM
- MiP_Gesture
- MiP_HeadLEDs
- MiP_Infrared
- MiP_Mode
- MiP_Motion
- MiP_Odometer
- MiP_Position
- MiP_Radar
- MiP_Serial
- MiP_Shake
- MiP_Sound
- MiP_Version
- MiP_Weight
- MiP_WiFi