put ask demod and mandemod

put ask demod and mandemod back until i have time to test it
This commit is contained in:
marshmellow42 2014-12-19 12:39:41 -05:00
parent b3b706693b
commit ae2f73c12d

View file

@ -100,9 +100,9 @@ int Cmdaskdemod(const char *Cmd)
} else { } else {
GraphBuffer[0] = c; GraphBuffer[0] = c;
} }
//20% fuzz [marshmellow] ////13% fuzz [marshmellow]
high=(int)(.8*high); //high=(int)(0.87*high);
low=(int)(.8*low); //low=(int)(0.87*low);
for (i = 1; i < GraphTraceLen; ++i) { for (i = 1; i < GraphTraceLen; ++i) {
/* Transitions are detected at each peak /* Transitions are detected at each peak
* Transitions are either: * Transitions are either:
@ -112,10 +112,10 @@ int Cmdaskdemod(const char *Cmd)
* low for long periods, others just reach the peak and go * low for long periods, others just reach the peak and go
* down) * down)
*/ */
//[marhsmellow] changed == to >= for high and <= for low //[marhsmellow] change == to >= for high and <= for low for fuzz
if ((GraphBuffer[i] >= high) && (GraphBuffer[i - 1] == c)) { if ((GraphBuffer[i] == high) && (GraphBuffer[i - 1] == c)) {
GraphBuffer[i] = 1 - c; GraphBuffer[i] = 1 - c;
} else if ((GraphBuffer[i] <= low) && (GraphBuffer[i - 1] == (1 - c))){ } else if ((GraphBuffer[i] == low) && (GraphBuffer[i - 1] == (1 - c))){
GraphBuffer[i] = c; GraphBuffer[i] = c;
} else { } else {
/* No transition */ /* No transition */