From de53156e1ea6982f03a6c39adf1ae17a57056132 Mon Sep 17 00:00:00 2001 From: marshmellow42 Date: Sun, 19 Jun 2016 23:44:54 -0400 Subject: [PATCH] Fix the AskEdgeDetect cleaning tool somehow it got broken. (maybe i had an incomplete pull request once upon a time) --- client/cmddata.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/cmddata.c b/client/cmddata.c index 9854ccfa..ba161dd8 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -879,13 +879,15 @@ int CmdGraphShiftZero(const char *Cmd) int CmdAskEdgeDetect(const char *Cmd) { int thresLen = 25; + int Last = 0; sscanf(Cmd, "%i", &thresLen); for(int i = 1; i=thresLen) //large jump up - GraphBuffer[i-1] = 127; + Last = 127; else if(GraphBuffer[i]-GraphBuffer[i-1]<=-1*thresLen) //large jump down - GraphBuffer[i-1] = -127; + Last = -127; + GraphBuffer[i-1] = Last; } RepaintGraphWindow(); return 0; -- 2.39.5