CHG: minor LF adjustments.

CHG: `lf visa2000` - removed askedgedetect, it seemed it destroyed more than enhanced.
This commit is contained in:
iceman1001
2017-02-28 16:55:16 +01:00
parent a8fd088d8b
commit 4eabb8ad38
6 changed files with 30 additions and 15 deletions

View File

@@ -834,7 +834,7 @@ int CmdVikingDemod(const char *Cmd)
return 0;
}
size_t size = DemodBufferLen;
//call lfdemod.c demod for Viking
int ans = VikingDemod_AM(DemodBuffer, &size);
if (ans < 0) {
if (g_debugMode) PrintAndLog("DEBUG: Error - Viking Demod %d %s", ans, (ans == -5)?"[chksum error]":"");
@@ -2095,6 +2095,11 @@ int CmdGrid(const char *Cmd)
RepaintGraphWindow();
return 0;
}
void setGrid_Clock(uint8_t clock){
PlotGridXdefault = clock;
RepaintGraphWindow();
}
int CmdHexsamples(const char *Cmd)
{

View File

@@ -80,6 +80,8 @@ int NRZrawDemod(const char *Cmd, bool verbose);
void printEM410x(uint32_t hi, uint64_t id);
int getSamples(const char *Cmd, bool silent);
void setGrid_Clock(uint8_t clock);
int CmdDataIIR(const char *Cmd);
extern uint8_t DemodBuffer[MAX_DEMOD_BUF_LEN];

View File

@@ -443,7 +443,7 @@ int EM4x50Read(const char *Cmd, bool verbose) {
}
}
if (!clk) {
PrintAndLog("ERROR: EM4x50 - didn't find a clock");
if (verbose || g_debugMode) PrintAndLog("ERROR: EM4x50 - didn't find a clock");
return 0;
}
} else tol = clk/8;

View File

@@ -97,6 +97,7 @@ int CmdJablotronDemod(const char *Cmd) {
}
setDemodBuf(DemodBuffer+ans, 64, 0);
setGrid_Clock(64);
//got a good demod
uint32_t raw1 = bytebits_to_byte(DemodBuffer, 32);
@@ -125,7 +126,7 @@ int CmdJablotronDemod(const char *Cmd) {
int CmdJablotronRead(const char *Cmd) {
CmdLFRead("s");
getSamples("12000", TRUE);
getSamples("10000", TRUE);
return CmdJablotronDemod(Cmd);
}

View File

@@ -62,7 +62,7 @@ int CmdVisa2kDemod(const char *Cmd) {
// save GraphBuffer - to restore it later
save_restoreGB(1);
CmdAskEdgeDetect("");
//sCmdAskEdgeDetect("");
//ASK / Manchester
bool st = TRUE;
@@ -88,7 +88,8 @@ int CmdVisa2kDemod(const char *Cmd) {
return 0;
}
setDemodBuf(DemodBuffer, 96, ans);
setGrid_Clock(64);
//got a good demod
uint32_t raw1 = bytebits_to_byte(DemodBuffer, 32);
uint32_t raw2 = bytebits_to_byte(DemodBuffer+32, 32);
@@ -110,7 +111,7 @@ int CmdVisa2kDemod(const char *Cmd) {
int CmdVisa2kRead(const char *Cmd) {
CmdLFRead("s");
getSamples("16000",TRUE);
getSamples("12000",TRUE);
return CmdVisa2kDemod(Cmd);
}