X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/42f57e0294c13f14f8ebcdcc529b5872c2884786..c936a22f1921f5dd8ebf49a8d1a0fab60337dd31:/armsrc/lfops.c diff --git a/armsrc/lfops.c b/armsrc/lfops.c index 6b131c26..9b9caaf0 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -927,98 +927,24 @@ void CmdIOdemodFSK(int findone, int *high, int *low, int ledcontrol) } else { n=(n+1)/6; // fc/10 in sets of 6 } - switch (n) { // stuff appropriate bits in buffer - case 0: - case 1: // one bit - dest[i++]=dest[idx-1]^1; - //Dbprintf("%d",dest[idx-1]); - break; - case 2: // two bits - dest[i++]=dest[idx-1]^1; - dest[i++]=dest[idx-1]^1; - //Dbprintf("%d",dest[idx-1]); - //Dbprintf("%d",dest[idx-1]); - break; - case 3: // 3 bit start of frame markers - for(int j=0; j<3; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - case 4: - for(int j=0; j<4; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - case 5: - for(int j=0; j<5; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - case 6: - for(int j=0; j<6; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - case 7: - for(int j=0; j<7; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - case 8: - for(int j=0; j<8; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - case 9: - for(int j=0; j<9; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - case 10: - for(int j=0; j<10; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - case 11: - for(int j=0; j<11; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - case 12: - for(int j=0; j<12; j++){ - dest[i++]=dest[idx-1]^1; - // Dbprintf("%d",dest[idx-1]); - } - break; - default: // this shouldn't happen, don't stuff any bits - //Dbprintf("%d",dest[idx-1]); - break; - } + if (n < 13){ + for(int j=0; j