mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Subghz V2 Phoenix fully supported now
With big thanks to all contributors 2022.08 - @Skorpionm 2025.07 - @xMasterX & @RocketGod-git
This commit is contained in:
@@ -74,6 +74,7 @@ typedef enum {
|
||||
SetTypeSomfyTelis,
|
||||
SetTypeANMotorsAT4,
|
||||
SetTypeAlutechAT4N,
|
||||
SetTypePhoenix_V2_433,
|
||||
SetTypeHCS101_433_92,
|
||||
SetTypeDoorHan_315_00,
|
||||
SetTypeDoorHan_433_92,
|
||||
|
||||
@@ -384,6 +384,34 @@ bool subghz_txrx_gen_secplus_v1_protocol(
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool subghz_txrx_gen_phoenix_v2_protocol(
|
||||
void* context,
|
||||
const char* preset_name,
|
||||
uint32_t frequency,
|
||||
uint32_t serial,
|
||||
uint16_t cnt) {
|
||||
SubGhzTxRx* txrx = context;
|
||||
|
||||
bool res = false;
|
||||
|
||||
txrx->transmitter =
|
||||
subghz_transmitter_alloc_init(txrx->environment, SUBGHZ_PROTOCOL_PHOENIX_V2_NAME);
|
||||
subghz_txrx_set_preset(txrx, preset_name, frequency, NULL, 0);
|
||||
|
||||
if(txrx->transmitter && subghz_protocol_phoenix_v2_create_data(
|
||||
subghz_transmitter_get_protocol_instance(txrx->transmitter),
|
||||
txrx->fff_data,
|
||||
serial,
|
||||
cnt,
|
||||
txrx->preset)) {
|
||||
res = true;
|
||||
}
|
||||
|
||||
subghz_transmitter_free(txrx->transmitter);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void subghz_txrx_gen_serial_gangqi(uint64_t* result_key) {
|
||||
uint64_t randkey = (uint64_t)rand();
|
||||
uint16_t serial = (uint16_t)((randkey) & 0xFFFF);
|
||||
|
||||
@@ -115,6 +115,13 @@ bool subghz_txrx_gen_came_atomo_protocol(
|
||||
uint32_t serial,
|
||||
uint16_t cnt);
|
||||
|
||||
bool subghz_txrx_gen_phoenix_v2_protocol(
|
||||
void* context,
|
||||
const char* preset_name,
|
||||
uint32_t frequency,
|
||||
uint32_t serial,
|
||||
uint16_t cnt);
|
||||
|
||||
/**
|
||||
* Generate data SecPlus v2 protocol
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user