SubGhz: refactoring add descriptions (#1012)

* SubGhz: add descriptions
* SubGhz: fix syntax

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Skorpionm
2022-03-16 13:18:48 +04:00
committed by GitHub
parent 28888b0a22
commit 94ba7d104c
54 changed files with 1732 additions and 185 deletions

View File

@@ -99,6 +99,11 @@ void subghz_protocol_decoder_somfy_keytis_reset(void* context) {
NULL);
}
/**
* Сhecksum calculation.
* @param data Вata for checksum calculation
* @return CRC
*/
static uint8_t subghz_protocol_somfy_keytis_crc(uint64_t data) {
uint8_t crc = 0;
data &= 0xFFF0FFFFFFFFFF;
@@ -231,9 +236,9 @@ void subghz_protocol_decoder_somfy_keytis_feed(void* context, bool level, uint32
}
}
/** Analysis of received data
*
* @param instance SubGhzProtocolSomfyKeytis instance
/**
* Analysis of received data
* @param instance Pointer to a SubGhzBlockGeneric* instance
*/
static void subghz_protocol_somfy_keytis_check_remote_controller(SubGhzBlockGeneric* instance) {
//https://pushstack.wordpress.com/somfy-rts-protocol/
@@ -341,6 +346,10 @@ static void subghz_protocol_somfy_keytis_check_remote_controller(SubGhzBlockGene
instance->serial = data & 0xFFFFFF;
}
/**
* Get button name.
* @param btn Button number, 4 bit
*/
static const char* subghz_protocol_somfy_keytis_get_name_button(uint8_t btn) {
const char* name_btn[0x10] = {
"Unknown",