mirror of
https://github.com/UberGuidoZ/Flipper.git
synced 2024-12-23 06:50:12 +00:00
48 lines
2.3 KiB
Markdown
48 lines
2.3 KiB
Markdown
https://github.com/flipperdevices/flipperzero-firmware/tree/dev/firmware/targets/f7/furi_hal/furi_hal_subghz.c
|
|
|
|
Change `furi_hal_subghz_is_frequency_valid` and `furi_hal_subghz_set_frequency_and_path`
|
|
|
|
Reminder, the unofficially supported freq are 281-361 MHz, 378-481 MHz, and 749-962 MHz
|
|
|
|
281000000 - 361000000<br>
|
|
378000000 - 481000000<br>
|
|
749000000 - 962000000
|
|
|
|
```
|
|
bool furi_hal_subghz_is_frequency_valid(uint32_t value) {
|
|
if(!(value >= 281000000 && value <= 361000000) &&
|
|
!(value >= 378000000 && value <= 481000000) &&
|
|
!(value >= 749000000 && value <= 962000000)) {
|
|
return false;
|
|
|
|
uint32_t furi_hal_subghz_set_frequency_and_path(uint32_t value) {
|
|
value = furi_hal_subghz_set_frequency(value);
|
|
if(value >= 281000000 && value <= 361000000) {
|
|
furi_hal_subghz_set_path(FuriHalSubGhzPath315);
|
|
} else if(value >= 378000000 && value <= 481000000) {
|
|
furi_hal_subghz_set_path(FuriHalSubGhzPath433);
|
|
} else if(value >= 749000000 && value <= 962000000) {
|
|
furi_hal_subghz_set_path(FuriHalSubGhzPath868);
|
|
} else {
|
|
furi_crash("SubGhz: Incorrect frequency during set.");
|
|
}
|
|
return value;
|
|
```
|
|
|
|
Don't forget to add your new freq to the [user settings](https://github.com/UberGuidoZ/Flipper/tree/main/Sub-GHz/Settings) file.
|
|
|
|
-----
|
|
|
|
I've had so many asking for me to add this.<br>
|
|
![Flipper_Blush](https://user-images.githubusercontent.com/57457139/183561666-4424a3cc-679b-4016-a368-24f7e7ad0a88.jpg) ![Flipper_Love](https://user-images.githubusercontent.com/57457139/183561692-381d37bd-264f-4c88-8877-e58d60d9be6e.jpg)
|
|
|
|
**BTC**: `3AWgaL3FxquakP15ZVDxr8q8xVTc5Q75dS`<br>
|
|
**BCH**: `17nWCvf2YPMZ3F3H1seX8T149Z9E3BMKXk`<br>
|
|
**ETH**: `0x0f0003fCB0bD9355Ad7B124c30b9F3D860D5E191`<br>
|
|
**LTC**: `M8Ujk52U27bkm1ksiWUyteL8b3rRQVMke2`
|
|
|
|
So, here it is. All donations of *any* size are humbly appreciated.<br>
|
|
![Flipper_Clap](https://user-images.githubusercontent.com/57457139/183561789-2e853ede-8ef7-41e8-a67c-716225177e5d.jpg) ![Flipper_OMG](https://user-images.githubusercontent.com/57457139/183561787-e21bdc1e-b316-4e67-b327-5129503d0313.jpg)
|
|
|
|
Donations will be used for hardware (and maybe caffeine) to further testing!<br>
|
|
![UberGuidoZ](https://cdn.discordapp.com/emojis/1000632669622767686.gif) |