+// by marshmellow
+// takes same args as cmdpsknrzrawdemod
+int CmdPSK2rawDemod(const char *Cmd)
+{
+ int errCnt=0;
+ errCnt=PSKnrzDemod(Cmd, 1);
+ if (errCnt<0){
+ if (g_debugMode) PrintAndLog("Error demoding: %d",errCnt);
+ return 0;
+ }
+ psk1TOpsk2(DemodBuffer, DemodBufferLen);
+ if (errCnt>0){
+ if (g_debugMode){
+ PrintAndLog("# Errors during Demoding (shown as 77 in bit stream): %d",errCnt);
+ PrintAndLog("PSK2 demoded bitstream:");
+ // Now output the bitstream to the scrollback by line of 16 bits
+ printDemodBuff();
+ }
+ }else{
+ PrintAndLog("PSK2 demoded bitstream:");
+ // Now output the bitstream to the scrollback by line of 16 bits
+ printDemodBuff();
+ }
+ return 1;
+}
+