Skip to content

Commit

Permalink
Merge branch 'dev' into CN
Browse files Browse the repository at this point in the history
  • Loading branch information
kalicyh committed Oct 12, 2024
2 parents 94a437d + 2f22fad commit acf4494
Show file tree
Hide file tree
Showing 159 changed files with 11,523 additions and 4,426 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ jobs:
fi
- name: "Check API version for consistency with OFW release-candidate"
env:
INDEXER_URL: ${{ secrets.INDEXER_URL }}
if: ${{ env.INDEXER_URL != '' && github.event_name == 'push' && ((github.ref_name == 'dev' && !contains(github.event.head_commit.message, '--nobuild')) || startsWith(github.ref, 'refs/tags/')) }}
run: |
set -e
symbols="targets/$TARGET/api_symbols.csv"
Expand Down Expand Up @@ -125,18 +122,18 @@ jobs:
${FILES[@]} \
"${{ secrets.INDEXER_URL }}"/firmware/uploadfiles
- name: 'Find previous comment'
- name: "Find previous comment"
env:
INDEXER_URL: ${{ secrets.INDEXER_URL }}
if: ${{ env.INDEXER_URL != '' && github.event.pull_request && matrix.target == env.DEFAULT_TARGET }}
uses: peter-evans/find-comment@v3
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Compiled ${{ matrix.target }} firmware for commit'
comment-author: "github-actions[bot]"
body-includes: "Compiled ${{ matrix.target }} firmware for commit"

- name: 'Create or update comment'
- name: "Create or update comment"
env:
INDEXER_URL: ${{ secrets.INDEXER_URL }}
if: ${{ env.INDEXER_URL != '' && github.event.pull_request && matrix.target == env.DEFAULT_TARGET }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}

- name: "Check code formatting"
- name: "Check formatting"
run: ./fbt lint_all
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}

- name: "Update release notes"
env:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}

- name: Send webhook
env:
Expand Down
45 changes: 40 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
### Breaking Changes:
- OFW: Battery: Rework gauge driver initialization routine (by @skotopes)
- Reworks how communication with battery guage is done, improves reliability and fixes issues with battery percentage not showing
- After installing firmware with this change, downgrading to old firmware will cause battery percentage to be blank
- If you must downgrade firmware, use the [Guage Tool app](https://github.com/skotopes/flipperzero_gauge_tool) to unseal the guage

### Added:
- Apps:
- NFC: Cyborg Detector (by @RocketGod-git)
- Sub-GHz: Radio Scanner (by @RocketGod-git)
- Games: Umpire Indicator (by @RocketGod-git)
- Sub-GHz:
- Show satellites count with an icon (#215 by @m7i-org)
- Add Bresser 3CH weather station protocol (#217 by @m7i-org)
- Add Bresser 3CH weather station protocol (#217 #245 by @m7i-org)
- UL: Add Marantec24 protocol (static 24 bit) with add manually (by @xMasterX)
- UL: Add GangQi protocol (static 34 bit) with button parsing and add manually (by @xMasterX & @Skorpionm)
- UL: Add Hollarm protocol (static 42 bit) with button parsing and add manually (by @xMasterX & @Skorpionm)
Expand All @@ -18,11 +24,18 @@
- Static encrypted backdoor support: collects static encrypted nonces to be cracked by MFKey using NXP/Fudan backdoor, allowing key recovery of all non-hardened MIFARE Classic tags on-device
- Add SmartRider Parser (#203 by @jaylikesbunda)
- Add API to enforce ISO15693 mode (#225 by @aaronjamt)
- Infrared:
- Bluray/DVD Universal Remote (#250 by @jaylikesbunda)
- Option to "Load from Library File" for Universal Remotes (#255 by @zxkmm)
- Updater: New Yappy themed icon while updating (#253 by @the1anonlypr3 & @Kuronons & @nescap)
- BadKB:
- OFW: Add linux/gnome badusb demo files (by @thomasnemer)
- Add older qFlipper install demos for windows and macos (by @DXVVAY & @grugnoymeme)
- OFW: New layout for es-LA (by @IRecabarren)
- OFW: Dolphin: Happy mode in Desktop settings (by @portasynthinca3)
- OFW: GUI: Add up and down button drawing functions to GUI elements (by @DerSkythe)
- GUI:
- OFW: Add up and down button drawing functions to GUI elements (by @DerSkythe)
- OFW: Added one new function for drawing mirrored xbm bitmaps (by @RebornedBrain)
- OFW: RPC: Support 5V on GPIO control for ext. modules (by @gsurkov)
- OFW: Toolbox: Proper integer parsing library `strint` (by @portasynthinca3)
- OFW: Furi: Put errno into TCB (by @portasynthinca3)
Expand All @@ -36,27 +49,39 @@
- Picopass: File loading improvements and fixes (by @bettse), force ISO15693 1OutOf4 mode (by @aaronjamt)
- Quac!: External IR board support (by @daniilty), import all IR from file, iButton support, code improvements (by @rdefeo)
- DTMF Dolphin: Add EAS tone support (by @JendrBendr)
- NFC Playlist: Error screens for playlist already exists and item already in playlist, general improvements (by @acegoal07)
- NFC Playlist: Error screens for playlist already exists and item already in playlist, general improvements (by @acegoal07), refactor rename/new scene without thread (by @Willy-JL)
- CLI-GUI Bridge: Fixes and improvements (by @ranchordo)
- Seader: Enable T=1 (by @bettse)
- BLE Spam: Fix menu index callback (by @Willy-JL)
- Solitaire: App rewrite, Added quick solve, New effects and sounds, Removed hacky canvas manipulation (by @doofy-dev)
- CLI-GUI Bridge: Add more symbols to keyboard (#222 by @Willy-JL)
- UL: Sub-GHz Bruteforcer: Add new protocols for existing dump option (by @xMasterX), use FW functions for top buttons (by @DerSkythe)
- UL: NRF24 Apps: Use string library compatible with OFW SDK (by @xMasterX)
- OFW: SPI Mem Manager: Fixed UI rendering bug related to line breaks (by @portasynthinca3)
- CLI: Print plugin name on load fail (by @Willy-JL)
- NFC:
- Added 6 new Mifare Classic keys from Bulgaria Hotel (#216 by @z3r0l1nk)
- NDEF parser supports NTAG I2C Plus 1k and 2k chips too (by @RocketGod-git)
- OFW: Rename 'Detect Reader' to 'Extract MF Keys' (by @bettse)
- OFW/UL: Rename 'Detect Reader' to 'Extract MFC Keys' (by @bettse & @xMasterX)
- OFW: Plantain parser improvements (by @assasinfil)
- OFW: Moscow social card parser (by @assasinfil)
- OFW: Fixes and improvements to iso14443_4a listener and poller (by @RebornedBrain)
- OFW: Update BART station codes in Clipper plugin (by @ted-logan)
- Sub-GHz:
- UL: Frequency analyzer fixes and improvements (by @xMasterX):
- Enforce int module (like in OFW) usage due to lack of required hardware on external boards (PathIsolate (+rf switch for multiple paths)) and incorrect usage and/or understanding the purpose of frequency analyzer app by users, it should be used only to get frequency of the remote placed around 1-10cm around flipper's left corner
- Fix possible GSM mobile towers signal interference by limiting upper frequency to 920mhz max
- Fix duplicated frequency lists and use user config for nearest frequency selector too
- Nexus-TH weather station protocol improvements on detection (#256 by @m7i-org)
- Infrared:
- Additions to MNTM specific LED, Digital Sign, Monitor universal remotes from IRDB (#240 by @jaylikesbunda)
- UL: Replace LEDs universal remote with new one by Unleashed team, includes color options (by @amec0e & @xMasterX)
- UL: Update universal remote assets (by @amec0e)
- OFW: IR button operation fails now shows more informative messages (by @RebornedBrain)
- OFW: Add Airwell AW-HKD012-N91 to univeral AC remote (by @valeraOlexienko)
- OFW: Add TCL 75S451 to TV universal remote (by @christhetech131)
- OFW: Universal remote additions (by @jaylikesbunda)
- OFW: Heavily Expand Universal Remotes (by @jaylikesbunda)
- OFW: GUI: Change dialog_ex text ownership model (by @skotopes)
- OFW: CCID: App changes and improvements (by @kidbomb)
- OFW: API: Exposed `view_dispatcher_get_event_loop` (by @CookiePLMonster)
Expand All @@ -65,6 +90,10 @@
- OFW: Replace all calls to strncpy with strlcpy, use strdup more, expose strlcat (by @CookiePLMonster)
- OFW: Threading, Timers improvements (by @CookiePLMonster)
- OFW: FuriTimer uses an event instead of a volatile bool to wait for deletion (by @CookiePLMonster)
- OFW: Improve FuriThread state callbacks (by @CookiePLMonster)
- Documentation:
- OFW: Update and cleanup (by @rnadyrshin)
- OFW: Improve bit_buffer.h docs (by @Astrrra)

### Fixed:
- RFID:
Expand All @@ -73,6 +102,8 @@
- OFW: GProxII Fix Writing and Rendering Conflict (by @zinongli)
- Desktop:
- Fallback Poweroff prompt when power settings is unavailable (by @Willy-JL)
- Sub-GHz: Fix GPS "Latitute" typo, switch to "Lat" and "Lon" in .sub files (#246 by @m7i-org)
- Power: Suppress Shutdown on Idle While Charging / Plugged In (#244 by @luu176)
- Storage:
- Fallback SD format prompt when storage settings is unavailable (by @Willy-JL)
- OFW: Fix folder rename fails (by @portasynthinca3)
Expand All @@ -81,10 +112,14 @@
- NFC:
- OFW: Fix crash on Ultralight unlock (by @Astrrra)
- OFW: FeliCa anti-collision fix (by @RebornedBrain)
- OFW: Emulation freeze fixed when pressing OK repeatedly (by @RebornedBrain)
- OFW: RPC: Broken file interaction fixes (by @RebornedBrain)
- OFW: GPIO: Fix USB-UART bridge exit screen stopping the bridge prematurely (by @portasynthinca3)
- OFW: GUI: Fix dialog_ex NULL ptr crash (by @Willy-JL)
- OFW: Furi: Clean up of LFS traces (by @hedger)
- Furi:
- OFW: Clean up of LFS traces (by @hedger)
- OFW: Prevent idle priority threads from potentially starving the FreeRTOS idle task (by @CookiePLMonster)
- OFW: Wait for RNG ready state and no errors before sampling (by @n1kolasM)
- OFW: Debug: Use proper hook for handle_exit in flipperapps (by @skotopes)
- OFW: API: Fix kerel typo in documentation (by @EntranceJew)

Expand Down
4 changes: 2 additions & 2 deletions applications/debug/direct_draw/direct_draw.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <furi.h>
#include <gui/gui.h>
#include <gui/canvas_i.h>
#include <input/input.h>

#define BUFFER_SIZE (32U)
Expand Down Expand Up @@ -42,10 +41,11 @@ static DirectDraw* direct_draw_alloc(void) {
static void direct_draw_free(DirectDraw* instance) {
furi_pubsub_unsubscribe(instance->input, instance->input_subscription);

instance->canvas = NULL;
gui_direct_draw_release(instance->gui);
furi_record_close(RECORD_GUI);
furi_record_close(RECORD_INPUT_EVENTS);

free(instance);
}

static void direct_draw_block(Canvas* canvas, uint32_t size, uint32_t counter) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Filetype: Flipper SubGhz Key File
Version: 1
Frequency: 433920000
Preset: FuriHalSubGhzPresetOok270Async
Latitute: nan
Longitude: nan
Protocol: Bresser-3CH
Id: 117
Bit: 36
Data: 00 00 00 07 58 05 9F 46
Batt: 0
Hum: 70
Ts: 1728202096
Ch: 1
Btn: 0
Temp: 8.900000
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Filetype: Flipper SubGhz RAW File
Version: 1
Frequency: 433920000
Preset: FuriHalSubGhzPresetOok270Async
Protocol: RAW
RAW_Data: 520 -1000 470 -998 502 -1020 516 -992 482 -2002 482 -992 514 -1962 482 -1990 504 -984 488 -1020 478 -1988 536 -1982 478 -1968 488 -1982 500 -1976 478 -1014 488 -2010 448 -1018 484 -1022 512 -1004 476 -2002 482 -1980 488 -1014 530 -1008 480 -1014 464 -1000 512 -1012 476 -998 502 -1000 502 -986 504 -1012 512 -1002 470 -1030 472 -1020 478 -1014 478 -1000 504 -1016 482 -988 480 -1042 480 -4016 476 -1010 488 -1984 478 -1976 512 -1976 472 -1010 496 -1994 470 -1008 508 -1968 534 -1952 510 -1012 474 -1000 506 -984 518 -992 480 -1010 488 -1020 480 -1016 514 -1006 482 -1982 472 -1012 512 -1970 482 -1978 488 -1018 490 -1010 478 -1980 544 -1950 500 -1974 512 -1970 482 -1978 524 -982 490 -1966 516 -1004 490 -1008 510 -1012 490 -1968 480 -1998 482 -1030 486 -1012 480 -1016 472 -1030 482 -996 484 -1008 484 -1022 482 -1020 482 -1006 506 -984 480 -1016 474 -1004 504 -986 518 -986 476 -1000 480 -1026 480 -1026 482 -3986 530 -1018 476 -1994 480 -1982 456 -2008 478 -1002 500 -1988 476 -1010 476 -1998 514 -1964 484 -1002 482 -1014 474 -998 502 -996 500 -986 510 -982 510 -1006 504 -1016 468 -1972 510 -1010 458 -2006 476 -1966 484 -1020 476 -1006 482 -1990 502 -1976 494 -1996 476 -1964 518 -1948 520 -984 488 -1996 476 -1006 488 -1002 502 -1002 480 -1986 494 -1998 488 -1010 486 -1010 478 -1012 500 -1008 462 -1010 476 -1010 500 -1002 478 -1014 476 -1030 506 -1008 458 -1006 508 -976 508 -1002 468 -1014 482 -1020 478 -1004 500 -1028 470 -3998 554 -984 496 -1966 470 -2002 480 -1982 472 -1006 506 -1958 518 -986 476 -2000 514 -1970 484 -994 502 -1008 470 -1004 508 -1006 468 -996 502 -1014 470 -1002 478 -1012 502 -1974 476 -1004 504 -1976 486 -1964 486 -1002 514 -974 482 -2008 522 -1964 502 -1954 528 -2002 460 -1978 508 -1010 458 -2010 476 -1008 456 -1048 510 -984 476 -1990 482 -1984 468 -1028 500 -1026 468 -1018 466 -1008 504 -998 468 -1020 482 -1018 476 -1010 488 -1020 510 -986 476 -1002 480 -1026 468 -1014 502 -1006 472 -998 504 -982 484 -1016 512 -3980 492 -1008 474 -1994 482 -1982 502 -1970 478 -1016 488 -1966 480 -1028 482 -1986 486 -1988 490 -1004 474 -1012 520 -986 488 -1000 472 -1014 502 -982 508 -1012 506 -1006 480 -1980 504 -978 508 -1966 484 -1972 500 -994 512 -970 512 -1962 508 -2002 480 -1972 508 -1966 500 -1976 470 -998 502 -1960 508 -1010 472 -996 504 -1010 502 -1982 500 -1964 470 -1040 498 -984 510 -1010 486 -984 492 -1004 478 -1014 498 -984 504 -976 506 -998 512 -996 496 -1006 502 -974 506 -996 470 -1028 472 -1008 490 -1006 478 -2372 752 -720 734 -710 742 -752 710 -742 236 -470
13 changes: 11 additions & 2 deletions applications/debug/unit_tests/tests/subghz/subghz_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,11 +677,18 @@ MU_TEST(subghz_decoder_solight_te44_test) {
"Test decoder " WS_PROTOCOL_SOLIGHT_TE44_NAME " error\r\n");
}

MU_TEST(subghz_decoder_bresser_3ch_test) {
MU_TEST(subghz_decoder_bresser_3ch_v1_test) {
mu_assert(
subghz_decoder_test(
EXT_PATH("unit_tests/subghz/bresser_3ch_raw.sub"), WS_PROTOCOL_BRESSER_3CH_NAME),
"Test decoder " WS_PROTOCOL_BRESSER_3CH_NAME " error\r\n");
"Test decoder " WS_PROTOCOL_BRESSER_3CH_NAME " v1 error\r\n");
}

MU_TEST(subghz_decoder_bresser_3ch_v0_test) {
mu_assert(
subghz_decoder_test(
EXT_PATH("unit_tests/subghz/bresser_3ch_v0_raw.sub"), WS_PROTOCOL_BRESSER_3CH_NAME),
"Test decoder " WS_PROTOCOL_BRESSER_3CH_NAME " v0 error\r\n");
}

//test encoders
Expand Down Expand Up @@ -907,6 +914,8 @@ MU_TEST_SUITE(subghz) {
MU_RUN_TEST(subghz_decoder_mastercode_test);
MU_RUN_TEST(subghz_decoder_dickert_test);
MU_RUN_TEST(subghz_decoder_solight_te44_test);
MU_RUN_TEST(subghz_decoder_bresser_3ch_v1_test);
MU_RUN_TEST(subghz_decoder_bresser_3ch_v0_test);

MU_RUN_TEST(subghz_encoder_princeton_test);
MU_RUN_TEST(subghz_encoder_came_test);
Expand Down
36 changes: 18 additions & 18 deletions applications/drivers/subghz/cc1101_ext/cc1101_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <furi_hal_interrupt.h>
#include <furi_hal_resources.h>
#include <furi_hal_bus.h>
#include <furi_hal_subghz.h>

#include <stm32wbxx_ll_dma.h>
#include <furi_hal_cortex.h>
Expand All @@ -16,12 +15,12 @@
#include <cc1101.h>
#include <stdio.h>

#include <momentum/momentum.h>
#include <momentum/settings.h>

#define TAG "SubGhzDeviceCc1101Ext"

#define SUBGHZ_DEVICE_CC1101_EXT_TX_GPIO (&gpio_ext_pb2)
#define SUBGHZ_DEVICE_CC1101_EXT_E07M20S_AMP_GPIO &gpio_ext_pc3
#define SUBGHZ_DEVICE_CC1101_EXT_TX_GPIO (&gpio_ext_pb2)
#define SUBGHZ_DEVICE_CC1101_EXT_E07_AMP_GPIO &gpio_ext_pc3

#define SUBGHZ_DEVICE_CC1101_CONFIG_VER 1

Expand Down Expand Up @@ -94,9 +93,9 @@ typedef struct {
const GpioPin* g0_pin;
SubGhzDeviceCC1101ExtAsyncTx async_tx;
SubGhzDeviceCC1101ExtAsyncRx async_rx;
bool amp_and_leds;
bool extended_range;
bool bypass_region;
bool power_amp;
} SubGhzDeviceCC1101Ext;

static SubGhzDeviceCC1101Ext* subghz_device_cc1101_ext = NULL;
Expand Down Expand Up @@ -221,14 +220,14 @@ bool subghz_device_cc1101_ext_alloc(SubGhzDeviceConf* conf) {
subghz_device_cc1101_ext->regulation = SubGhzDeviceCC1101ExtRegulationTxRx;
subghz_device_cc1101_ext->async_mirror_pin = NULL;
subghz_device_cc1101_ext->g0_pin = SUBGHZ_DEVICE_CC1101_EXT_TX_GPIO;
subghz_device_cc1101_ext->amp_and_leds = false;
subghz_device_cc1101_ext->extended_range = false;
subghz_device_cc1101_ext->bypass_region = false;
subghz_device_cc1101_ext->power_amp = false;
if(conf) {
if(conf->ver == SUBGHZ_DEVICE_CC1101_CONFIG_VER) {
subghz_device_cc1101_ext->amp_and_leds = conf->amp_and_leds;
subghz_device_cc1101_ext->extended_range = conf->extended_range;
subghz_device_cc1101_ext->bypass_region = conf->bypass_region;
subghz_device_cc1101_ext->power_amp = conf->power_amp;
} else {
FURI_LOG_E(TAG, "Config version mismatch");
}
Expand All @@ -248,10 +247,9 @@ bool subghz_device_cc1101_ext_alloc(SubGhzDeviceConf* conf) {
}

furi_hal_spi_bus_handle_init(subghz_device_cc1101_ext->spi_bus_handle);
if(subghz_device_cc1101_ext->power_amp) {
furi_hal_gpio_init_simple(
SUBGHZ_DEVICE_CC1101_EXT_E07M20S_AMP_GPIO, GpioModeOutputPushPull);
furi_hal_gpio_write(SUBGHZ_DEVICE_CC1101_EXT_E07M20S_AMP_GPIO, 0);
if(subghz_device_cc1101_ext->amp_and_leds) {
furi_hal_gpio_init_simple(SUBGHZ_DEVICE_CC1101_EXT_E07_AMP_GPIO, GpioModeOutputPushPull);
furi_hal_gpio_write(SUBGHZ_DEVICE_CC1101_EXT_E07_AMP_GPIO, 0);
}

return subghz_device_cc1101_ext_check_init();
Expand All @@ -263,7 +261,8 @@ void subghz_device_cc1101_ext_free(void) {
furi_hal_spi_bus_handle_deinit(subghz_device_cc1101_ext->spi_bus_handle);

// resetting the CS pins to floating
if(momentum_settings.spi_nrf24_handle == SpiDefault || subghz_device_cc1101_ext->power_amp) {
if(momentum_settings.spi_nrf24_handle == SpiDefault ||
subghz_device_cc1101_ext->amp_and_leds) {
furi_hal_gpio_init_simple(&gpio_ext_pc3, GpioModeAnalog);
} else if(momentum_settings.spi_nrf24_handle == SpiExtra) {
furi_hal_gpio_init_simple(&gpio_ext_pa4, GpioModeAnalog);
Expand Down Expand Up @@ -442,6 +441,7 @@ void subghz_device_cc1101_ext_reset(void) {
// Reset GDO2 (!TX/RX) to floating state
cc1101_write_reg(
subghz_device_cc1101_ext->spi_bus_handle, CC1101_IOCFG2, CC1101IocfgHighImpedance);

furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
}

Expand All @@ -455,8 +455,8 @@ void subghz_device_cc1101_ext_idle(void) {
cc1101_write_reg(
subghz_device_cc1101_ext->spi_bus_handle, CC1101_IOCFG2, CC1101IocfgHighImpedance);
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
if(subghz_device_cc1101_ext->power_amp) {
furi_hal_gpio_write(SUBGHZ_DEVICE_CC1101_EXT_E07M20S_AMP_GPIO, 0);
if(subghz_device_cc1101_ext->amp_and_leds) {
furi_hal_gpio_write(SUBGHZ_DEVICE_CC1101_EXT_E07_AMP_GPIO, 0);
}
}

Expand All @@ -471,8 +471,8 @@ void subghz_device_cc1101_ext_rx(void) {
subghz_device_cc1101_ext->spi_bus_handle, CC1101_IOCFG2, CC1101IocfgHW | CC1101_IOCFG_INV);

furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
if(subghz_device_cc1101_ext->power_amp) {
furi_hal_gpio_write(SUBGHZ_DEVICE_CC1101_EXT_E07M20S_AMP_GPIO, 0);
if(subghz_device_cc1101_ext->amp_and_leds) {
furi_hal_gpio_write(SUBGHZ_DEVICE_CC1101_EXT_E07_AMP_GPIO, 0);
}
}

Expand All @@ -486,8 +486,8 @@ bool subghz_device_cc1101_ext_tx(void) {
// Go GDO2 (!TX/RX) to low (TX state)
cc1101_write_reg(subghz_device_cc1101_ext->spi_bus_handle, CC1101_IOCFG2, CC1101IocfgHW);
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
if(subghz_device_cc1101_ext->power_amp) {
furi_hal_gpio_write(SUBGHZ_DEVICE_CC1101_EXT_E07M20S_AMP_GPIO, 1);
if(subghz_device_cc1101_ext->amp_and_leds) {
furi_hal_gpio_write(SUBGHZ_DEVICE_CC1101_EXT_E07_AMP_GPIO, 1);
}
return true;
}
Expand Down
Loading

0 comments on commit acf4494

Please sign in to comment.