@@ -55,7 +55,7 @@ void setup()
5555 lcd.clear (0 );
5656 lcd.setCursor (8 , 0 );
5757 lcd.printf (" Please put the devices" );
58- M5_LOGI (" Please put the devices" );
58+ M5 . Log . printf (" Please put the devices\n " );
5959}
6060
6161void nfc_read (const UID & uid)
@@ -103,7 +103,7 @@ void nfc_read(const UID& uid)
103103 for (auto && r : msg.records ()) {
104104 if (r.tnf () == TNF ::Wellknown) {
105105 auto s = r.payloadAsString ().c_str ();
106- M5_LOGI (" R:%u TNF:%u T:%s [%s]" , r.required (), r.tnf (), r.type (), s);
106+ M5 . Log . printf (" R:%u TNF:%u T:%s [%s]\n " , r.required (), r.tnf (), r.type (), s);
107107 lcd.printf (" T:%s [%s]\n " , r.type (), s);
108108 }
109109 }
@@ -150,9 +150,9 @@ void nfc_write(const UID& uid)
150150 if (unit.nfcWriteChangeToNTAGFormat (uid)) {
151151 auto result = unit.nfcWriteDevice (uid, buf, encoded);
152152 if (result) {
153- M5_LOGI (" Write OK" );
153+ M5 . Log . printf (" Write OK\n " );
154154 } else {
155- M5_LOGI (" Write NG:%02X" , result.error ());
155+ M5 . Log . printf (" Write NG:%02X\n " , result.error ());
156156 }
157157 } else {
158158 M5_LOGE (" Failed to changeToNTAGFormat" );
@@ -256,7 +256,7 @@ void loop()
256256 UID uid{};
257257 if (unit.activateDevice (uid)) {
258258 M5 .Speaker .tone (1000 , 20 );
259- M5_LOGI (" UID:%s %s" , uid.uidAsString ().c_str (), uid.typeAsString ().c_str ());
259+ M5 . Log . printf (" UID:%s %s\n " , uid.uidAsString ().c_str (), uid.typeAsString ().c_str ());
260260
261261 if (uid.canNFC ()) {
262262 nfc_read (uid);
@@ -276,7 +276,7 @@ void loop()
276276 if (unit.activateDevice (uid)) {
277277 if (uid.canNFC ()) {
278278 M5 .Speaker .tone (2000 , 20 );
279- M5_LOGI (" UID:%s %s" , uid.uidAsString ().c_str (), uid.typeAsString ().c_str ());
279+ M5 . Log . printf (" UID:%s %s\n " , uid.uidAsString ().c_str (), uid.typeAsString ().c_str ());
280280
281281 nfc_write (uid);
282282 // nfc_write_png(uid);
0 commit comments