Skip to content

Commit

Permalink
Oregon2: remove debugging messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Jan 4, 2023
1 parent 24071c1 commit 0da1b7a
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions protocols/oregon2.c
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
#include "../app.h"

#if 0
/* Invert byte ordering. */
static void invert_nibbles(uint8_t *p, uint32_t len) {
len *= 8;
for (uint32_t j = 0; j < len; j += 4) {
bool b0 = bitmap_get(p,len,j);
bool b1 = bitmap_get(p,len,j+1);
bool b2 = bitmap_get(p,len,j+2);
bool b3 = bitmap_get(p,len,j+3);
bitmap_set(p,len,j,b3);
bitmap_set(p,len,j+1,b2);
bitmap_set(p,len,j+2,b1);
bitmap_set(p,len,j+3,b0);
}
}
#endif

static bool decode(uint8_t *bits, uint32_t numbytes, uint32_t numbits, ProtoViewMsgInfo *info) {
if (numbits < 32) return false;
const char *sync_pattern = "01100110" "01100110" "10010110" "10010110";
Expand All @@ -26,30 +9,6 @@ static bool decode(uint8_t *bits, uint32_t numbytes, uint32_t numbits, ProtoView

off += 32; /* Skip preamble. */

FURI_LOG_E(TAG, "Bits: %d%d%d%d",
bitmap_get(bits,numbytes,off),
bitmap_get(bits,numbytes,off+1),
bitmap_get(bits,numbytes,off+2),
bitmap_get(bits,numbytes,off+3));

FURI_LOG_E(TAG, "Bits: %d%d%d%d",
bitmap_get(bits,numbytes,off+4),
bitmap_get(bits,numbytes,off+5),
bitmap_get(bits,numbytes,off+6),
bitmap_get(bits,numbytes,off+7));

FURI_LOG_E(TAG, "Bits: %d%d%d%d",
bitmap_get(bits,numbytes,off+8),
bitmap_get(bits,numbytes,off+9),
bitmap_get(bits,numbytes,off+10),
bitmap_get(bits,numbytes,off+11));

FURI_LOG_E(TAG, "Bits: %d%d%d%d",
bitmap_get(bits,numbytes,off+12),
bitmap_get(bits,numbytes,off+13),
bitmap_get(bits,numbytes,off+14),
bitmap_get(bits,numbytes,off+15));

uint8_t buffer[8];
uint32_t decoded =
convert_from_line_code(buffer,sizeof(buffer),bits,numbytes,off,"1001","0110");
Expand Down

0 comments on commit 0da1b7a

Please sign in to comment.