NFC: format source.

This commit is contained in:
Aleksandr Kutuzov 2020-10-20 15:31:21 +03:00
parent 4c60218997
commit e2157b2403

View File

@ -145,12 +145,18 @@ void nfc_draw_callback(CanvasApi* canvas, void* context) {
canvas->set_font(canvas, FontPrimary);
char status[128 / 8];
if (nfc->ret == ERR_WRONG_STATE) canvas->draw_str(canvas, 2, 16, "NFC Wrong State");
else if(nfc->ret == ERR_PARAM) canvas->draw_str(canvas, 2, 16, "NFC Wrong Param");
else if(nfc->ret == ERR_IO) canvas->draw_str(canvas, 2, 16, "NFC IO Error");
else if(nfc->ret == ERR_NONE) canvas->draw_str(canvas, 2, 16, "NFC Device Found");
else if(nfc->ret == ERR_TIMEOUT) canvas->draw_str(canvas, 2, 16, "NFC Timeout");
else canvas->draw_str(canvas, 2, 16, "NFC error");
if(nfc->ret == ERR_WRONG_STATE)
canvas->draw_str(canvas, 2, 16, "NFC Wrong State");
else if(nfc->ret == ERR_PARAM)
canvas->draw_str(canvas, 2, 16, "NFC Wrong Param");
else if(nfc->ret == ERR_IO)
canvas->draw_str(canvas, 2, 16, "NFC IO Error");
else if(nfc->ret == ERR_NONE)
canvas->draw_str(canvas, 2, 16, "NFC Device Found");
else if(nfc->ret == ERR_TIMEOUT)
canvas->draw_str(canvas, 2, 16, "NFC Timeout");
else
canvas->draw_str(canvas, 2, 16, "NFC error");
snprintf(status, sizeof(status), "Tck:%d Cnt:%d", nfc->ticker, nfc->devCnt);