Simulated accelerometer, replaying the samples and events it is fed.
More...
Simulated accelerometer, replaying the samples and events it is fed.
Fed samples are replayed one per sampling interval, the last one being latched once the queue runs out: a watch lying still, face up, until the first one. The simulated part has no FIFO.
◆ pbl_accel_sim_sample
| struct pbl_accel_sim_sample |
Simulated accelerometer sample.
| Data Fields |
|
int16_t |
x |
Acceleration along the x axis, in milli-g. |
|
int16_t |
y |
Acceleration along the y axis, in milli-g. |
|
int16_t |
z |
Acceleration along the z axis, in milli-g. |
◆ PBL_ACCEL_SIM_QUEUE_SIZE
| #define PBL_ACCEL_SIM_QUEUE_SIZE 256U |
Number of samples the replay queue holds.
◆ SIM_ACCEL
| #define SIM_ACCEL (&pbl_accel_sim) |
The simulated accelerometer.
◆ pbl_accel_sim_feed()
Queue samples for replay.
Samples that do not fit in the queue are dropped.
- Parameters
-
| accel | Device. |
| samples | Samples. |
| count | Number of samples. |
- Returns
- Number of samples queued.
◆ pbl_accel_sim_flush()
| void pbl_accel_sim_flush |
( |
const struct pbl_accel * |
accel | ) |
|
Drop the queued samples, keeping the last one replayed latched.
- Parameters
-
◆ pbl_accel_sim_report_event()
Report an event, as if the part detected it.
Dropped while detection of that event type is disabled, as on real hardware.
- Parameters
-