mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
SubGHz: Fix incorrect frequency set
CC1101 applies slightly different frequency than requested, so these checks fail These new values are what I get when applying, not sure if it can differ
This commit is contained in:
@@ -378,11 +378,11 @@ bool furi_hal_subghz_is_frequency_valid(uint32_t value) {
|
|||||||
uint32_t furi_hal_subghz_set_frequency_and_path(uint32_t value) {
|
uint32_t furi_hal_subghz_set_frequency_and_path(uint32_t value) {
|
||||||
// Set these values to the extended frequency range only. They dont define if you can transmit but do select the correct RF path
|
// Set these values to the extended frequency range only. They dont define if you can transmit but do select the correct RF path
|
||||||
value = furi_hal_subghz_set_frequency(value);
|
value = furi_hal_subghz_set_frequency(value);
|
||||||
if(value >= 281000000 && value <= 361000000) {
|
if(value >= 280999633 && value <= 360999938) {
|
||||||
furi_hal_subghz_set_path(FuriHalSubGhzPath315);
|
furi_hal_subghz_set_path(FuriHalSubGhzPath315);
|
||||||
} else if(value >= 378000000 && value <= 481000000) {
|
} else if(value >= 377999755 && value <= 481000000) {
|
||||||
furi_hal_subghz_set_path(FuriHalSubGhzPath433);
|
furi_hal_subghz_set_path(FuriHalSubGhzPath433);
|
||||||
} else if(value >= 749000000 && value <= 962000000) {
|
} else if(value >= 748999633 && value <= 962000000) {
|
||||||
furi_hal_subghz_set_path(FuriHalSubGhzPath868);
|
furi_hal_subghz_set_path(FuriHalSubGhzPath868);
|
||||||
} else {
|
} else {
|
||||||
furi_crash("SubGhz: Incorrect frequency during set.");
|
furi_crash("SubGhz: Incorrect frequency during set.");
|
||||||
|
|||||||
Reference in New Issue
Block a user