Skip to content

Commit

Permalink
Merge branch 'dev' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Jun 2, 2023
2 parents b0e8e68 + fa997bd commit ac222f1
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 43 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* If you have copied any apps manually into `apps` folder - remove `apps` folder or that specific apps you copied on your microSD before installing this release to avoid issues due to OFW API version update! If you using regular builds or extra pack builds (e) without your manually added apps, all included apps will be installed automatically, no extra actions needed!
-----
* SubGHz Remote: Fixed BinRAW support, + many other fixes (by @gid9798 | PR #492)
* SubGHz: Fix KL: Stilmatic support + add manually support
* SubGHz: Keeloq mfname refactoring (by @gid9798 | PR #479)
* Desktop Clock: Some improvements and fixes (by @gid9798 | PR #490)
* LF RFID: Cleanup duplicated code (by @gid9798 | PR #493)
Expand All @@ -11,11 +12,13 @@
* Infrared: Update universal remote assets (by @amec0e)
* GUI Keyboard: Fix crash when renaming files with long file name (Fixed issue #489)
* Misc: Fix APP_IDs to match new regex (regex check will be added in OFW soon)
* Plugins: Protoview, WAV Player, DTMF Dolphin - fixed all known crashes, ported to latest hal bus system
* Plugins: ESP8266 Deauther - Crash fix (Fixed issue #497)
* Plugins: Update -> Mifare Nested [(by AloneLiberty)](https://github.com/AloneLiberty/FlipperNested)
* Plugins: Update -> TOTP (Authenticator) [(by akopachov)](https://github.com/akopachov/flipper-zero_authenticator)
* Plugins: Update -> ESP32: WiFi Marauder companion plugin [(by 0xchocolate)](https://github.com/0xchocolate/flipperzero-wifi-marauder)
* Plugins: Update -> UART Terminal [(by cool4uma)](https://github.com/cool4uma/UART_Terminal/tree/main)
* OFW: FuriHal: disable bus re-initialization on early init and extra asserts for AHB1,AHB2,AHB3 which must be left intact on entering to FUS -> **Fixes updater error 1-100**
* OFW: NFC: fix MFC timings -> **Fixes issues with Mifare Classic emulation that could happen after unlshd-049 release**
* OFW: Update dolphin.py
* OFW: NFC Magic: Fix gen1 writing with invalid BCC (lost fix from PR 2511)
Expand Down
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Encoders or sending made by @xMasterX:
- Keeloq: Mutancode
- Keeloq: Normstahl
- Keeloq: Beninca + Allmatic
- Keeloq: Stilmatic / Schellenberg
- Keeloq: Stilmatic
- Keeloq: CAME Space
- Keeloq: Aprimatic (model TR and similar)

Expand Down
2 changes: 1 addition & 1 deletion applications/external/dtmf_dolphin/dtmf_dolphin_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ bool dtmf_dolphin_audio_play_tones(
generate_waveform(current_player, 0);
generate_waveform(current_player, current_player->half_buffer_length);

dtmf_dolphin_speaker_init();
dtmf_dolphin_dma_init((uint32_t)current_player->sample_buffer, current_player->buffer_length);

furi_hal_interrupt_set_isr(
FuriHalInterruptIdDma1Ch1, dtmf_dolphin_audio_dma_isr, current_player->queue);
if(furi_hal_speaker_acquire(1000)) {
dtmf_dolphin_speaker_init();
dtmf_dolphin_dma_start();
dtmf_dolphin_speaker_start();
current_player->playing = true;
Expand Down
4 changes: 3 additions & 1 deletion applications/external/protoview/app_subghz.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ void protoview_timer_isr(void* ctx) {
void raw_sampling_worker_start(ProtoViewApp* app) {
UNUSED(app);

furi_hal_bus_enable(FuriHalBusTIM2);

LL_TIM_InitTypeDef tim_init = {
.Prescaler = 63, /* CPU frequency is ~64Mhz. */
.CounterMode = LL_TIM_COUNTERMODE_UP,
Expand All @@ -195,6 +197,6 @@ void raw_sampling_worker_stop(ProtoViewApp* app) {
LL_TIM_DisableCounter(TIM2);
LL_TIM_DisableIT_UPDATE(TIM2);
furi_hal_interrupt_set_isr(FuriHalInterruptIdTIM2, NULL, NULL);
LL_TIM_DeInit(TIM2);
furi_hal_bus_disable(FuriHalBusTIM2);
FURI_CRITICAL_EXIT();
}
12 changes: 6 additions & 6 deletions applications/external/protoview/protocols/unknown.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ static bool decode(uint8_t* bits, uint32_t numbytes, uint32_t numbits, ProtoView
linecode = LineCodeManchester;
start1 = tmp1;
msgbits = manchester_bits * 2;
FURI_LOG_E(TAG, "MANCHESTER START: %lu", tmp1);
//FURI_LOG_T(TAG, "MANCHESTER START: %lu", tmp1);
}

if(linecode == LineCodeNone) return false;
Expand Down Expand Up @@ -284,11 +284,11 @@ static bool decode(uint8_t* bits, uint32_t numbytes, uint32_t numbits, ProtoView
* transfer all that is needed, like a message
* terminator (that we don't detect). */

if(preamble_found) FURI_LOG_E(TAG, "PREAMBLE AT: %lu", preamble_start);
FURI_LOG_E(TAG, "START: %lu", info->start_off);
FURI_LOG_E(TAG, "MSGBITS: %lu", msgbits);
FURI_LOG_E(TAG, "DATASTART: %lu", start1);
FURI_LOG_E(TAG, "PULSES: %lu", info->pulses_count);
/*if(preamble_found) FURI_LOG_T(TAG, "PREAMBLE AT: %lu", preamble_start);
FURI_LOG_T(TAG, "START: %lu", info->start_off);
FURI_LOG_T(TAG, "MSGBITS: %lu", msgbits);
FURI_LOG_T(TAG, "DATASTART: %lu", start1);
FURI_LOG_T(TAG, "PULSES: %lu", info->pulses_count);*/

/* We think there is a message and we know where it starts and the
* line code used. We can turn it into bits and bytes. */
Expand Down
4 changes: 3 additions & 1 deletion applications/external/protoview/view_direct_sampling.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ static void ds_timer_isr(void* ctx) {
static void direct_sampling_timer_start(ProtoViewApp* app) {
DirectSamplingViewPrivData* privdata = app->view_privdata;

furi_hal_bus_enable(FuriHalBusTIM2);

LL_TIM_InitTypeDef tim_init = {
.Prescaler = 63, /* CPU frequency is ~64Mhz. */
.CounterMode = LL_TIM_COUNTERMODE_UP,
Expand All @@ -157,6 +159,6 @@ static void direct_sampling_timer_stop(ProtoViewApp* app) {
LL_TIM_DisableCounter(TIM2);
LL_TIM_DisableIT_UPDATE(TIM2);
furi_hal_interrupt_set_isr(FuriHalInterruptIdTIM2, NULL, NULL);
LL_TIM_DeInit(TIM2);
furi_hal_bus_disable(FuriHalBusTIM2);
FURI_CRITICAL_EXIT();
}
11 changes: 7 additions & 4 deletions applications/external/wav_player/wav_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,12 @@ static void app_run(WavPlayerApp* app) {
bool eof = fill_data(app, 0);
eof = fill_data(app, app->samples_count_half);

wav_player_speaker_init(app->sample_rate);
wav_player_dma_init((uint32_t)app->sample_buffer, app->samples_count);
if(furi_hal_speaker_acquire(1000)) {
wav_player_speaker_init(app->sample_rate);
wav_player_dma_init((uint32_t)app->sample_buffer, app->samples_count);

furi_hal_interrupt_set_isr(FuriHalInterruptIdDma1Ch1, wav_player_dma_isr, app->queue);
furi_hal_interrupt_set_isr(FuriHalInterruptIdDma1Ch1, wav_player_dma_isr, app->queue);

if(furi_hal_speaker_acquire(1000)) {
wav_player_dma_start();
wav_player_speaker_start();

Expand Down Expand Up @@ -440,6 +440,9 @@ static void app_run(WavPlayerApp* app) {
furi_hal_speaker_release();
}

// Reset GPIO pin and bus states
wav_player_hal_deinit();

furi_hal_interrupt_set_isr(FuriHalInterruptIdDma1Ch1, NULL, NULL);
}

Expand Down
10 changes: 10 additions & 0 deletions applications/external/wav_player/wav_player_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#define DMA_INSTANCE DMA1, LL_DMA_CHANNEL_1

void wav_player_speaker_init(uint32_t sample_rate) {
// Enable bus
furi_hal_bus_enable(FuriHalBusTIM2);

LL_TIM_InitTypeDef TIM_InitStruct = {0};
//TIM_InitStruct.Prescaler = 4;
TIM_InitStruct.Prescaler = 1;
Expand Down Expand Up @@ -56,6 +59,13 @@ void wav_player_speaker_init(uint32_t sample_rate) {
GpioAltFn14TIM16);
}

void wav_player_hal_deinit() {
furi_hal_gpio_init(&gpio_ext_pa6, GpioModeAnalog, GpioPullNo, GpioSpeedLow);

// Disable bus
furi_hal_bus_disable(FuriHalBusTIM2);
}

void wav_player_speaker_start() {
LL_TIM_EnableAllOutputs(FURI_HAL_SPEAKER_TIMER);
LL_TIM_EnableCounter(FURI_HAL_SPEAKER_TIMER);
Expand Down
2 changes: 2 additions & 0 deletions applications/external/wav_player/wav_player_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ void wav_player_dma_start();

void wav_player_dma_stop();

void wav_player_hal_deinit();

#ifdef __cplusplus
}
#endif
1 change: 1 addition & 0 deletions applications/main/subghz/helpers/subghz_custom_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ typedef enum {
SubmenuIndexElmesElectronic,
SubmenuIndexSommer_FM_434,
SubmenuIndexSommer_FM_868,
SubmenuIndexStilmatic,
SubmenuIndexDTMNeo433,
SubmenuIndexGibidi433,
SubmenuIndexGSN,
Expand Down
15 changes: 15 additions & 0 deletions applications/main/subghz/scenes/subghz_scene_set_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ void subghz_scene_set_type_on_enter(void* context) {
SubmenuIndexSommer_FM_868,
subghz_scene_set_type_submenu_callback,
subghz);
submenu_add_item(
subghz->submenu,
"KL: Stilmatic 433MHz",
SubmenuIndexStilmatic,
subghz_scene_set_type_submenu_callback,
subghz);
submenu_add_item(
subghz->submenu,
"KL: IronLogic 433MHz",
Expand Down Expand Up @@ -510,6 +516,15 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
}
break;
case SubmenuIndexStilmatic:
generated_protocol = subghz_txrx_gen_keeloq_protocol(
subghz->txrx, "AM650", 433920000, key & 0x0FFFFFFF, 0x1, 0x0003, "Stilmatic");
if(!generated_protocol) {
furi_string_set(
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
}
break;
case SubmenuIndexSommer_FM_434:
generated_protocol = subghz_txrx_gen_keeloq_protocol(
subghz->txrx, "FM476", 434420000, key & 0x0FFFFFFF, 0x4, 0x0003, "Sommer(fsk476)");
Expand Down
4 changes: 2 additions & 2 deletions applications/services/dolphin/dolphin.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Dolphin* dolphin_alloc() {
dolphin->state = dolphin_state_alloc();
dolphin->event_queue = furi_message_queue_alloc(8, sizeof(DolphinEvent));
dolphin->pubsub = furi_pubsub_alloc();
dolphin->butthurt_timer = xTimerCreate(
NULL, HOURS_IN_TICKS(2 * 24), pdTRUE, dolphin, dolphin_butthurt_timer_callback);
dolphin->butthurt_timer =
xTimerCreate(NULL, HOURS_IN_TICKS(24), pdTRUE, dolphin, dolphin_butthurt_timer_callback);
dolphin->flush_timer =
xTimerCreate(NULL, 30 * 1000, pdFALSE, dolphin, dolphin_flush_timer_callback);
dolphin->clear_limits_timer = xTimerCreate(
Expand Down
6 changes: 3 additions & 3 deletions assets/resources/infrared/assets/ac.ir
Original file line number Diff line number Diff line change
Expand Up @@ -494,16 +494,16 @@ name: Heat_lo
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 6071 7300 630 504 605 505 605 505 604 505 605 505 605 506 603 507 602 508 601 509 601 510 600 511 599 511 599 511 599 512 598 512 598 512 598 511 599 511 599 511 599 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 1612 599 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 1613 598 1612 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 599 512 598 512 598 512 598 513 597 1613 598 1613 597 512 598 513 597 1613 598 513 597 512 598 513 597 513 597 513 597 513 597 513 597 513 597 513 597 1613 597 513 598 513 597 513 597 513 597 513 597 513 597 513 597 1613 598 1613 597 513 597 1614 596 513 597 514 596 1613 597 513 597 1614 597 513 597 1614 597 1614 596 1614 596 514 596 1614 597 1614 596 1614 597 7336 623
data: 6095 7331 630 1607 630 1606 630 1607 629 1607 629 1609 626 1612 623 1639 572 1665 572 544 572 544 572 544 572 544 572 544 572 544 572 544 572 544 572 1665 572 1665 572 1665 572 1665 572 1665 572 1665 572 1665 572 1665 572 544 572 544 572 544 572 544 572 545 571 544 572 544 572 544 572 1665 572 545 571 1665 572 1665 572 1666 571 1665 572 1665 572 1665 572 545 571 1666 571 545 571 545 571 545 571 544 572 545 571 545 571 1666 571 545 571 545 571 1666 571 1666 571 545 571 1666 571 1666 571 545 571 1666 571 1666 571 545 571 545 571 1666 571 545 571 545 571 545 571 545 571 545 571 1666 571 1666 571 1666 571 1666 571 545 571 1666 571 1666 571 1666 571 545 571 545 571 545 571 545 571 1666 571 546 570 1666 571 545 571 1666 571 545 571 1667 570 545 571 546 570 1667 570 546 570 1667 570 546 570 1667 570 546 570 1667 570 1667 570 7389 570
#
name: Cool_lo
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 6068 7327 603 509 600 534 604 506 576 533 577 533 603 506 603 507 602 507 601 509 600 510 599 511 597 513 573 537 573 537 573 537 573 537 573 537 573 538 572 537 573 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 1638 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 1638 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 1638 572 1638 572 538 572 538 572 1638 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 538 572 1639 571 538 572 1639 571 1639 571 1639 571 538 572 1639 571 539 571 539 571 1639 571 539 571 1639 571 539 571 539 571 1639 571 539 571 1639 571 1639 571 1639 571 539 571 1639 571 1639 571 539 571 539 571 1639 571 7360 597
data: 6095 7303 654 1581 656 1605 631 1606 630 1607 629 1608 628 1609 627 1610 626 1611 626 491 625 491 625 491 625 491 625 491 625 491 625 491 625 491 625 1613 624 1612 625 1612 625 1613 624 1612 625 1612 625 1612 625 1612 625 492 624 491 625 491 625 491 625 491 625 492 624 492 624 492 624 1613 624 492 624 1613 624 1612 625 1613 624 1613 624 1613 624 1613 624 492 624 1613 624 492 624 492 624 492 624 492 624 492 624 492 624 1613 624 492 624 492 624 1613 624 1613 624 492 624 1613 624 1613 624 492 624 1613 624 1613 624 492 624 492 624 1614 623 493 623 492 624 492 624 492 624 493 623 1614 623 1614 623 492 624 1614 623 1614 623 1614 623 1614 623 1614 623 493 623 493 623 1614 623 493 623 493 623 493 623 1614 623 493 623 1614 623 493 623 1614 623 493 623 493 623 1614 623 493 623 1614 623 493 623 1614 623 493 623 1614 623 1614 623 7337 621
#
name: Dh
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 6094 7326 630 479 630 480 605 505 605 505 604 506 603 506 603 507 602 509 600 510 599 511 599 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 1613 597 512 598 512 598 512 598 512 598 512 598 512 598 512 598 512 598 513 597 512 598 1613 598 512 598 512 598 513 597 512 598 512 598 513 597 513 597 513 597 513 597 512 598 513 597 513 597 513 597 513 597 513 597 513 597 1614 597 1613 597 513 597 513 597 1614 597 513 597 513 597 513 597 513 597 513 597 513 597 513 597 513 597 513 597 1614 597 513 597 513 597 513 597 513 597 513 597 1614 597 1614 596 514 596 1614 597 513 597 1614 597 514 596 514 596 1614 596 514 596 1614 596 514 596 514 596 1614 596 1614 596 514 596 514 596 1615 596 1615 595 7336 623
data: 6064 7357 602 1634 602 1635 602 1634 603 1634 603 1634 603 1634 602 1634 602 1635 627 489 626 490 600 516 600 517 599 518 598 517 599 518 598 517 599 1639 598 1639 598 1638 599 1638 599 1639 598 1639 598 1639 598 1639 598 517 599 518 598 518 598 518 598 518 598 518 598 518 598 518 598 1639 598 1639 598 518 598 1639 598 1639 598 1639 598 1639 598 1639 598 518 598 518 598 1639 598 518 598 518 598 518 598 518 598 518 598 1639 598 518 598 518 598 1639 598 1639 598 518 598 518 598 1640 597 518 598 1639 598 1640 597 518 598 518 598 1639 598 1639 598 519 597 518 598 1640 597 1640 597 519 597 1640 597 1640 597 519 597 1640 597 1640 597 519 597 519 597 1641 596 519 597 519 597 1640 597 519 597 519 597 1640 597 519 597 1640 597 519 597 1641 596 520 596 519 597 1641 596 519 597 1641 596 520 596 1641 596 520 596 1642 595 1641 596 7363 596
2 changes: 2 additions & 0 deletions firmware/targets/f7/furi_hal/furi_hal_bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ void furi_hal_bt_init() {
furi_hal_bus_enable(FuriHalBusIPCC);
furi_hal_bus_enable(FuriHalBusAES2);
furi_hal_bus_enable(FuriHalBusPKA);
furi_hal_bus_enable(FuriHalBusCRC);

if(!furi_hal_bt_core2_mtx) {
furi_hal_bt_core2_mtx = furi_mutex_alloc(FuriMutexTypeNormal);
Expand Down Expand Up @@ -279,6 +280,7 @@ void furi_hal_bt_reinit() {
furi_hal_bus_disable(FuriHalBusIPCC);
furi_hal_bus_disable(FuriHalBusAES2);
furi_hal_bus_disable(FuriHalBusPKA);
furi_hal_bus_disable(FuriHalBusCRC);

FURI_LOG_I(TAG, "Start BT initialization");
furi_hal_bt_init();
Expand Down
Loading

0 comments on commit ac222f1

Please sign in to comment.