Loading...
Searching...
No Matches
series.h File Reference

Reducing a run of samples to the few numbers a chart draws from, no SDK. More...

#include <stdint.h>

Go to the source code of this file.

Functions

int series_range (const uint8_t *samples, int count, uint8_t no_sample, int *lo, int *hi, int *last)
 Walk a series of samples for its low, high, and most recent reading.
int series_max_u16 (const uint16_t *values, int count)
 The largest value in a series, for scaling a bar strip against its busiest slot.

Detailed Description

Reducing a run of samples to the few numbers a chart draws from, no SDK.

A sparkline or a bar strip keeps its readings in a plain array with a value that stands for "no sample here". Turning that array into a low, a high, and a most-recent, or into the busiest value the bars scale against, is pure work with no watch behind it, so it lives here where it can be tested off the device.