Skip to content
Snippets Groups Projects
Commit 5ae70d8f authored by schneider's avatar schneider
Browse files

feat(ecg): support for alternate scroll mode

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