Skip to content

Commit

Permalink
SubGhz: fix RAW file upload error
Browse files Browse the repository at this point in the history
  • Loading branch information
Skorpionm committed Jul 31, 2022
1 parent 446b509 commit 50147c9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/subghz/protocols/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const SubGhzProtocolDecoder subghz_protocol_raw_decoder = {

.get_hash_data = NULL,
.serialize = NULL,
.deserialize = subghz_protocol_decoder_raw_deserialize,
.get_string = subghz_protocol_decoder_raw_get_string,
};

Expand Down Expand Up @@ -246,9 +247,18 @@ void subghz_protocol_decoder_raw_feed(void* context, bool level, uint32_t durati
}
}

bool subghz_protocol_decoder_raw_deserialize(void* context, FlipperFormat* flipper_format) {
furi_assert(context);
UNUSED(context);
UNUSED(flipper_format);
//ToDo stub, for backwards compatibility
return true;
}

void subghz_protocol_decoder_raw_get_string(void* context, string_t output) {
furi_assert(context);
//SubGhzProtocolDecoderRAW* instance = context;
UNUSED(context);
//ToDo no use
string_cat_printf(output, "RAW Date");
}
Expand Down
8 changes: 8 additions & 0 deletions lib/subghz/protocols/raw.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ void subghz_protocol_decoder_raw_reset(void* context);
*/
void subghz_protocol_decoder_raw_feed(void* context, bool level, uint32_t duration);

/**
* Deserialize data SubGhzProtocolDecoderRAW.
* @param context Pointer to a SubGhzProtocolDecoderRAW instance
* @param flipper_format Pointer to a FlipperFormat instance
* @return true On success
*/
bool subghz_protocol_decoder_raw_deserialize(void* context, FlipperFormat* flipper_format);

/**
* Getting a textual representation of the received data.
* @param context Pointer to a SubGhzProtocolDecoderRAW instance
Expand Down

0 comments on commit 50147c9

Please sign in to comment.