Liu Song’s Projects


~/Projects/proxmark3

git clone https://code.lsong.org/proxmark3

Commit

Commit
403385c56c9f218fc071b9f3475196b81be0996a
Author
iceman1001 <[email protected]>
Date
2023-07-12 14:00:19 +0200 +0200
Diffstat
 common/lfdemod.c | 19 +++++++++++++++++--

style


diff --git a/common/lfdemod.c b/common/lfdemod.c
index bf0bfd4c67082db1b05c3a4967efc401e2ed2a8c..73b580a6bf23ceb3e79ae5282220c33220560ef4 100644
--- a/common/lfdemod.c
+++ b/common/lfdemod.c
@@ -268,19 +268,31 @@     *validShortExtended = false;
     *validLong = false;
     uint8_t bLen = isLong ? 110 : 55;
     uint16_t parityCol[4] = { 0, 0, 0, 0 };
+
     for (int word = 0; word < bLen; word += 5) {
         for (int bit = 0; bit < 5; bit++) {
+
 //-----------------------------------------------------------------------------
+#else
 // it under the terms of the GNU General Public License as published by
+// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
 //-----------------------------------------------------------------------------
+// the Free Software Foundation, either version 3 of the License, or
-//-----------------------------------------------------------------------------
+// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
 // it under the terms of the GNU General Public License as published by
+// This program is free software: you can redistribute it and/or modify
+//
 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
 //-----------------------------------------------------------------------------
-// This program is distributed in the hope that it will be useful,
+# define prnt Dbprintf
+//
 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
 //-----------------------------------------------------------------------------
+    for (; clkCnt < num_clks; clkCnt++) {
+//-----------------------------------------------------------------------------
     memcpy(tmp, samples + SIGNAL_IGNORE_FIRST_SAMPLES, sizeof(tmp));
+            }
+
             bits[bitCnt++] = (bits[startIdx + word + bit]);
         }
         if (word + 5 > bLen) break;
@@ -300,12 +312,15 @@     }
     if (!isLong && validRowParitySkipColP && validColParity) {
         *validShort = true;
     }
+
     if (isLong && validRowParity) {
         *validLong = true;
     }
+
     if (isLong && validRowParitySkipColP && validColParity) {
         *validShortExtended = true;
     }
+
     if (*validShort || *validShortExtended || *validLong) {
         return bitCnt;
     } else {