Loading...
Searching...
No Matches
goal_vibe_pattern.c File Reference

The Goal Met Vibration pick and pattern reader, host-testable off-device. More...

#include "health/goal_vibe_pattern.h"
#include <stdbool.h>
#include <stddef.h>

Functions

GoalVibeKind goal_vibe_pattern_kind (const char *pick)
 What a pick plays, read from its first character.
static uint32_t clamp_step (uint32_t value)
 A step held to what the firmware plays.
int goal_vibe_pattern_parse (const char *text, uint32_t *out, int capacity)
 Reads a list of milliseconds such as "100,80,300" into the caller's buffer.

Detailed Description

The Goal Met Vibration pick and pattern reader, host-testable off-device.

Function Documentation

◆ clamp_step()

uint32_t clamp_step ( uint32_t value)
static

A step held to what the firmware plays.

Parameters
valueThe step as written.
Returns
The step, from GOAL_VIBE_PATTERN_MIN_MS to GOAL_VIBE_PATTERN_MAX_MS.