mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 05:13:22 -07:00
cmddata.c changes by others - reapply
i overwrote some changes in cmdsamples. i fixed that i also removed some comments in graph.c
This commit is contained in:
parent
3179383f85
commit
d6d20c5435
2 changed files with 15 additions and 79 deletions
|
@ -166,7 +166,6 @@ size_t getFromGraphBuf(uint8_t *buff)
|
|||
int GetClock(const char *str, int peak, int verbose)
|
||||
{
|
||||
int clock;
|
||||
// int clock2;
|
||||
sscanf(str, "%i", &clock);
|
||||
if (!strcmp(str, ""))
|
||||
clock = 0;
|
||||
|
@ -177,46 +176,18 @@ int GetClock(const char *str, int peak, int verbose)
|
|||
uint8_t grph[MAX_GRAPH_TRACE_LEN]={0};
|
||||
size_t size = getFromGraphBuf(grph);
|
||||
clock = DetectASKClock(grph,size,0);
|
||||
//clock2 = DetectClock2(peak);
|
||||
/* Only print this message if we're not looping something */
|
||||
if (!verbose){
|
||||
PrintAndLog("Auto-detected clock rate: %d", clock);
|
||||
//PrintAndLog("clock2: %d",clock2);
|
||||
}
|
||||
}
|
||||
|
||||
return clock;
|
||||
}
|
||||
int GetNRZpskClock(const char *str, int peak, int verbose)
|
||||
{
|
||||
// return GetClock(str,peak,verbose);
|
||||
int clock;
|
||||
// int clock2;
|
||||
sscanf(str, "%i", &clock);
|
||||
if (!strcmp(str, ""))
|
||||
clock = 0;
|
||||
|
||||
/* Auto-detect clock */
|
||||
if (!clock)
|
||||
{
|
||||
uint8_t grph[MAX_GRAPH_TRACE_LEN]={0};
|
||||
size_t size = getFromGraphBuf(grph);
|
||||
clock = DetectpskNRZClock(grph,size,0);
|
||||
//clock2 = DetectClock2(peak);
|
||||
/* Only print this message if we're not looping something */
|
||||
if (!verbose){
|
||||
PrintAndLog("Auto-detected clock rate: %d", clock);
|
||||
//PrintAndLog("clock2: %d",clock2);
|
||||
}
|
||||
}
|
||||
return clock;
|
||||
}
|
||||
// Get or auto-detect clock rate
|
||||
/*
|
||||
int GetNRZpskClock(const char *str, int peak, int verbose)
|
||||
{
|
||||
int clock;
|
||||
// int clock2;
|
||||
sscanf(str, "%i", &clock);
|
||||
if (!strcmp(str, ""))
|
||||
clock = 0;
|
||||
|
@ -225,15 +196,12 @@ int GetNRZpskClock(const char *str, int peak, int verbose)
|
|||
if (!clock)
|
||||
{
|
||||
uint8_t grph[MAX_GRAPH_TRACE_LEN]={0};
|
||||
int size = getFromGraphBuf(grph);
|
||||
clock = DetectASKClock(grph,size,0);
|
||||
//clock2 = DetectClock2(peak);
|
||||
size_t size = getFromGraphBuf(grph);
|
||||
clock = DetectpskNRZClock(grph,size,0);
|
||||
// Only print this message if we're not looping something
|
||||
if (!verbose){
|
||||
PrintAndLog("Auto-detected clock rate: %d", clock);
|
||||
//PrintAndLog("clock2: %d",clock2);
|
||||
}
|
||||
}
|
||||
return clock;
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue