mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-16 04:09:10 +08:00
print errors only if dbg level allows errors
This commit is contained in:
parent
650dd5855f
commit
9f8e63a7c8
2 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ void SpinDelayUs(int us) {
|
||||||
// WARNING: timer can't measure more than 1.39s (21.3us * 0xffff)
|
// WARNING: timer can't measure more than 1.39s (21.3us * 0xffff)
|
||||||
void SpinDelay(int ms) {
|
void SpinDelay(int ms) {
|
||||||
if (ms > 1390) {
|
if (ms > 1390) {
|
||||||
Dbprintf(_RED_("Error, SpinDelay called with %i > 1390"), ms);
|
if (DBGLEVEL >= DBG_ERROR) Dbprintf(_RED_("Error, SpinDelay called with %i > 1390"), ms);
|
||||||
ms = 1390;
|
ms = 1390;
|
||||||
}
|
}
|
||||||
// convert to us and call microsecond delay function
|
// convert to us and call microsecond delay function
|
||||||
|
|
|
@ -179,7 +179,7 @@ int BUTTON_CLICKED(int ms) {
|
||||||
// timer counts in 21.3us increments (1024/48MHz)
|
// timer counts in 21.3us increments (1024/48MHz)
|
||||||
// WARNING: timer can't measure more than 1.39s (21.3us * 0xffff)
|
// WARNING: timer can't measure more than 1.39s (21.3us * 0xffff)
|
||||||
if (ms > 1390) {
|
if (ms > 1390) {
|
||||||
Dbprintf(_RED_("Error, BUTTON_CLICKED called with %i > 1390"), ms);
|
if (DBGLEVEL >= DBG_ERROR) Dbprintf(_RED_("Error, BUTTON_CLICKED called with %i > 1390"), ms);
|
||||||
ms = 1390;
|
ms = 1390;
|
||||||
}
|
}
|
||||||
int ticks = ((MCK / 1000) * (ms ? ms : 1000)) >> 10;
|
int ticks = ((MCK / 1000) * (ms ? ms : 1000)) >> 10;
|
||||||
|
@ -243,7 +243,7 @@ int BUTTON_HELD(int ms) {
|
||||||
// timer counts in 21.3us increments (1024/48MHz)
|
// timer counts in 21.3us increments (1024/48MHz)
|
||||||
// WARNING: timer can't measure more than 1.39s (21.3us * 0xffff)
|
// WARNING: timer can't measure more than 1.39s (21.3us * 0xffff)
|
||||||
if (ms > 1390) {
|
if (ms > 1390) {
|
||||||
Dbprintf(_RED_("Error, BUTTON_HELD called with %i > 1390"), ms);
|
if (DBGLEVEL >= DBG_ERROR) Dbprintf(_RED_("Error, BUTTON_HELD called with %i > 1390"), ms);
|
||||||
ms = 1390;
|
ms = 1390;
|
||||||
}
|
}
|
||||||
// If button is held for one second
|
// If button is held for one second
|
||||||
|
|
Loading…
Reference in a new issue