From e6881fc9061bee67dfae1dc1b4744632b0848ae7 Mon Sep 17 00:00:00 2001 From: Christian Colglazier Date: Mon, 17 Jan 2022 10:13:05 -0500 Subject: [PATCH] Graph animation renders left to right --- src/droplets/ad_droplet.cpp | 4 +--- src/graphics/graph.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/droplets/ad_droplet.cpp b/src/droplets/ad_droplet.cpp index 45588a8..54802f9 100644 --- a/src/droplets/ad_droplet.cpp +++ b/src/droplets/ad_droplet.cpp @@ -105,7 +105,7 @@ ADDroplet::ADDroplet(DaisyPatch* m_patch, Droplet(m_patch, m_state) { sample_rate = m_sample_rate; - SetAnimationRate(20); + SetAnimationRate(10); ad[0].Init(Patch(), sample_rate, &m_state); @@ -194,8 +194,6 @@ void ADDroplet::Draw() { title_graph->Update(); } title_graph->SetPixelPercentage(ad[0].GetSignal()); - - //title_graph->SetPixelPercentage(0.99f); title_graph->Draw(Patch(), 0, 0); DrawName("AD"); diff --git a/src/graphics/graph.cpp b/src/graphics/graph.cpp index 187f247..3242f5b 100644 --- a/src/graphics/graph.cpp +++ b/src/graphics/graph.cpp @@ -59,7 +59,7 @@ void Graph::Draw(DaisyPatch* patch, int x, int y) { for (int w = 0; w < width; w++) { for (int h = 0; h < height; h++) { patch->display.DrawPixel(x+w, y+h, - graph[GetShiftArray(w, active, width)] + graph[GetShiftArray(width-w, active, width)] [GetShiftArray(height-h, height-1, height)]); } }