+int CmdAutoCorr(const char *Cmd)
+{
+ char cmdp = param_getchar(Cmd, 0);
+ if (cmdp == 'h' || cmdp == 'H')
+ return usage_data_autocorr();
+ int window = 4000; //set default
+ char grph=0;
+ bool updateGrph = FALSE;
+ sscanf(Cmd, "%i %c", &window, &grph);
+
+ if (window >= GraphTraceLen) {
+ PrintAndLog("window must be smaller than trace (%d samples)",
+ GraphTraceLen);
+ return 0;
+ }
+ if (grph == 'g') updateGrph=TRUE;
+ return AutoCorrelate(window, updateGrph, TRUE);
+}
+