oregon2.c 490 B

123456789101112131415
  1. #include "../app.h"
  2. static bool decode(uint8_t *bits, uint64_t numbits, ProtoViewMsgInfo *info) {
  3. const char *sync_pattern = "01100110" "01100110" "10010110" "10010110";
  4. uint64_t off = bitmap_seek_bits(bits,numbits,0,sync_pattern);
  5. if (off == BITMAP_SEEK_NOT_FOUND) return false;
  6. FURI_LOG_E(TAG, "Oregon2 prelude+sync found");
  7. snprintf(info->name,sizeof(info->name),"%s","Oregon v2.1");
  8. return true;
  9. }
  10. ProtoViewDecoder Oregon2Decoder = {
  11. "Oregon2", decode
  12. };