print errors only if dbg level allows errors

This commit is contained in:
Philippe Teuwen 2019-08-06 23:19:59 +02:00
commit 9f8e63a7c8
2 changed files with 3 additions and 3 deletions

View file

@ -38,7 +38,7 @@ void SpinDelayUs(int us) {
// WARNING: timer can't measure more than 1.39s (21.3us * 0xffff)
void SpinDelay(int ms) {
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;
}
// convert to us and call microsecond delay function