Commit 5ae70d8f authored by schneider's avatar schneider
Browse files

feat(ecg): support for alternate scroll mode

parent f604c357
......@@ -230,8 +230,17 @@ uint8_t sample_count = 0;
void add_sample(int16_t sample)
{
#if 1
memmove(samples, samples + 1, sizeof(*samples) * (SIZE_X*2-1));
samples[SIZE_X*2-1] = sample;
#else
static index = 0;
samples[index] = sample;
index++;
if(index == SIZE_X*2) {
index = 0;
}
#endif
sample_count++;
if(sample_count == 5) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment