mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-07 19:01:54 -07:00
Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev
This commit is contained in:
@@ -7,8 +7,8 @@ App(
|
||||
"vibro_test",
|
||||
"keypad_test",
|
||||
"usb_test",
|
||||
"USB_Mouse",
|
||||
"UART_Echo",
|
||||
"usb_mouse",
|
||||
"uart_echo",
|
||||
"display_test",
|
||||
"text_box_test",
|
||||
"file_browser_test",
|
||||
|
||||
@@ -29,6 +29,12 @@ static const uint32_t nfc_test_file_version = 1;
|
||||
#define NFC_TEST_DATA_MAX_LEN 18
|
||||
#define NFC_TETS_TIMINGS_MAX_LEN 1350
|
||||
|
||||
// Maximum allowed time for buffer preparation to fit 500us nt message timeout
|
||||
#define NFC_TEST_4_BYTE_BUILD_BUFFER_TIM_MAX (150)
|
||||
#define NFC_TEST_16_BYTE_BUILD_BUFFER_TIM_MAX (640)
|
||||
#define NFC_TEST_4_BYTE_BUILD_SIGNAL_TIM_MAX (110)
|
||||
#define NFC_TEST_16_BYTE_BUILD_SIGNAL_TIM_MAX (440)
|
||||
|
||||
typedef struct {
|
||||
Storage* storage;
|
||||
NfcaSignal* signal;
|
||||
@@ -91,13 +97,13 @@ static bool nfc_test_read_signal_from_file(const char* file_name) {
|
||||
|
||||
static bool nfc_test_digital_signal_test_encode(
|
||||
const char* file_name,
|
||||
uint32_t encode_max_time,
|
||||
uint32_t build_signal_max_time_us,
|
||||
uint32_t build_buffer_max_time_us,
|
||||
uint32_t timing_tolerance,
|
||||
uint32_t timings_sum_tolerance) {
|
||||
furi_assert(nfc_test);
|
||||
|
||||
bool success = false;
|
||||
uint32_t time = 0;
|
||||
uint32_t dut_timings_sum = 0;
|
||||
uint32_t ref_timings_sum = 0;
|
||||
uint8_t parity[10] = {};
|
||||
@@ -111,17 +117,37 @@ static bool nfc_test_digital_signal_test_encode(
|
||||
|
||||
// Encode signal
|
||||
FURI_CRITICAL_ENTER();
|
||||
time = DWT->CYCCNT;
|
||||
uint32_t time_start = DWT->CYCCNT;
|
||||
|
||||
nfca_signal_encode(
|
||||
nfc_test->signal, nfc_test->test_data, nfc_test->test_data_len * 8, parity);
|
||||
|
||||
uint32_t time_signal =
|
||||
(DWT->CYCCNT - time_start) / furi_hal_cortex_instructions_per_microsecond();
|
||||
|
||||
time_start = DWT->CYCCNT;
|
||||
|
||||
digital_signal_prepare_arr(nfc_test->signal->tx_signal);
|
||||
time = (DWT->CYCCNT - time) / furi_hal_cortex_instructions_per_microsecond();
|
||||
|
||||
uint32_t time_buffer =
|
||||
(DWT->CYCCNT - time_start) / furi_hal_cortex_instructions_per_microsecond();
|
||||
FURI_CRITICAL_EXIT();
|
||||
|
||||
// Check timings
|
||||
if(time > encode_max_time) {
|
||||
if(time_signal > build_signal_max_time_us) {
|
||||
FURI_LOG_E(
|
||||
TAG, "Encoding time: %ld us while accepted value: %ld us", time, encode_max_time);
|
||||
TAG,
|
||||
"Build signal time: %ld us while accepted value: %ld us",
|
||||
time_signal,
|
||||
build_signal_max_time_us);
|
||||
break;
|
||||
}
|
||||
if(time_buffer > build_buffer_max_time_us) {
|
||||
FURI_LOG_E(
|
||||
TAG,
|
||||
"Build buffer time: %ld us while accepted value: %ld us",
|
||||
time_buffer,
|
||||
build_buffer_max_time_us);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -158,7 +184,16 @@ static bool nfc_test_digital_signal_test_encode(
|
||||
break;
|
||||
}
|
||||
|
||||
FURI_LOG_I(TAG, "Encoding time: %ld us. Acceptable time: %ld us", time, encode_max_time);
|
||||
FURI_LOG_I(
|
||||
TAG,
|
||||
"Build signal time: %ld us. Acceptable time: %ld us",
|
||||
time_signal,
|
||||
build_signal_max_time_us);
|
||||
FURI_LOG_I(
|
||||
TAG,
|
||||
"Build buffer time: %ld us. Acceptable time: %ld us",
|
||||
time_buffer,
|
||||
build_buffer_max_time_us);
|
||||
FURI_LOG_I(
|
||||
TAG,
|
||||
"Timings sum difference: %ld [1/64MHZ]. Acceptable difference: %ld [1/64MHz]",
|
||||
@@ -173,11 +208,19 @@ static bool nfc_test_digital_signal_test_encode(
|
||||
MU_TEST(nfc_digital_signal_test) {
|
||||
mu_assert(
|
||||
nfc_test_digital_signal_test_encode(
|
||||
NFC_TEST_RESOURCES_DIR NFC_TEST_SIGNAL_SHORT_FILE, 500, 1, 37),
|
||||
NFC_TEST_RESOURCES_DIR NFC_TEST_SIGNAL_SHORT_FILE,
|
||||
NFC_TEST_4_BYTE_BUILD_SIGNAL_TIM_MAX,
|
||||
NFC_TEST_4_BYTE_BUILD_BUFFER_TIM_MAX,
|
||||
1,
|
||||
37),
|
||||
"NFC short digital signal test failed\r\n");
|
||||
mu_assert(
|
||||
nfc_test_digital_signal_test_encode(
|
||||
NFC_TEST_RESOURCES_DIR NFC_TEST_SIGNAL_LONG_FILE, 2000, 1, 37),
|
||||
NFC_TEST_RESOURCES_DIR NFC_TEST_SIGNAL_LONG_FILE,
|
||||
NFC_TEST_16_BYTE_BUILD_SIGNAL_TIM_MAX,
|
||||
NFC_TEST_16_BYTE_BUILD_BUFFER_TIM_MAX,
|
||||
1,
|
||||
37),
|
||||
"NFC long digital signal test failed\r\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="USB_Mouse",
|
||||
appid="usb_mouse",
|
||||
name="USB Mouse",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="usb_mouse_app",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Arkanoid",
|
||||
appid="arkanoid",
|
||||
name="Arkanoid",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="arkanoid_game_app",
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#include "util.h"
|
||||
#include "ui.h"
|
||||
|
||||
#include "Blackjack_icons.h"
|
||||
#include "blackjack_icons.h"
|
||||
|
||||
#define DEALER_MAX 17
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="DOOM",
|
||||
appid="doom",
|
||||
name="DOOM",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="doom_app",
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="ESP8266_Deauther",
|
||||
appid="esp8266_deauther",
|
||||
name="[ESP8266] Deauther",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="esp8266_deauth_app",
|
||||
|
||||
+3
-3
@@ -373,8 +373,8 @@ int32_t esp8266_deauth_app(void* p) {
|
||||
view_port_input_callback_set(view_port, esp8266_deauth_module_input_callback, event_queue);
|
||||
|
||||
// Open GUI and register view_port
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
app->m_gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(app->m_gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
//notification_message(app->notification, &sequence_set_only_blue_255);
|
||||
|
||||
@@ -515,7 +515,7 @@ int32_t esp8266_deauth_app(void* p) {
|
||||
|
||||
view_port_enabled_set(view_port, false);
|
||||
|
||||
gui_remove_view_port(gui, view_port);
|
||||
gui_remove_view_port(app->m_gui, view_port);
|
||||
|
||||
// Close gui record
|
||||
furi_record_close(RECORD_GUI);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="FlappyBird",
|
||||
appid="flappy_bird",
|
||||
name="Flappy Bird",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="flappy_game_app",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <FlappyBird_icons.h>
|
||||
#include <flappy_bird_icons.h>
|
||||
#include <furi.h>
|
||||
#include <gui/gui.h>
|
||||
#include <gui/icon_animation_i.h>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="RFID_Fuzzer",
|
||||
appid="rfid_fuzzer",
|
||||
name="RFID Fuzzer",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="flipfrid_start",
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <toolbox/stream/file_stream.h>
|
||||
#include <toolbox/stream/buffered_file_stream.h>
|
||||
|
||||
#include <RFID_Fuzzer_icons.h>
|
||||
#include <rfid_fuzzer_icons.h>
|
||||
|
||||
#include <lib/lfrfid/lfrfid_worker.h>
|
||||
#include <lfrfid/protocols/lfrfid_protocols.h>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="i2cTools",
|
||||
appid="i2c_tools",
|
||||
name="[GPIO] i2c Tools",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="i2ctools_app",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include <gui/gui.h>
|
||||
#include <i2cTools_icons.h>
|
||||
#include <i2c_tools_icons.h>
|
||||
#define APP_NAME "I2C Tools"
|
||||
|
||||
#define SCAN_MENU_TEXT "Scan"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include <gui/gui.h>
|
||||
#include <i2cTools_icons.h>
|
||||
#include <i2c_tools_icons.h>
|
||||
#include "../i2cscanner.h"
|
||||
|
||||
#define SCAN_TEXT "SCAN"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include <gui/gui.h>
|
||||
#include <i2cTools_icons.h>
|
||||
#include <i2c_tools_icons.h>
|
||||
#include "../i2csender.h"
|
||||
|
||||
#define SEND_TEXT "SEND"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include <gui/gui.h>
|
||||
#include <i2cTools_icons.h>
|
||||
#include <i2c_tools_icons.h>
|
||||
#include "../i2csniffer.h"
|
||||
|
||||
#define SNIFF_TEXT "SNIFF"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="iBtn_Fuzzer",
|
||||
appid="ibtn_fuzzer",
|
||||
name="iButton Fuzzer",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="ibtnfuzzer_start",
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <toolbox/stream/file_stream.h>
|
||||
#include <toolbox/stream/buffered_file_stream.h>
|
||||
|
||||
#include <iBtn_Fuzzer_icons.h>
|
||||
#include <ibtn_fuzzer_icons.h>
|
||||
|
||||
#include <lib/ibutton/ibutton_worker.h>
|
||||
#include <lib/ibutton/ibutton_key.h>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Metronome",
|
||||
appid="metronome",
|
||||
name="Metronome",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="metronome_app",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#include <gui/canvas.h>
|
||||
#include <gui/icon_i.h>
|
||||
#include <Metronome_icons.h>
|
||||
#include <metronome_icons.h>
|
||||
|
||||
//lib can only do bottom left/right
|
||||
void elements_button_top_left(Canvas* canvas, const char* str) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Minesweeper",
|
||||
appid="minesweeper",
|
||||
name="Minesweeper",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="minesweeper_app",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="NRF24_Mouse_Jacker",
|
||||
appid="nrf24_mouse_jacker",
|
||||
name="[NRF24] Mouse Jacker",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="mousejacker_app",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Multi_Converter",
|
||||
appid="multi_converter",
|
||||
name="Multi Converter",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="multi_converter_app",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Music_Player",
|
||||
appid="music_player",
|
||||
name="Music Player",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="music_player_app",
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
|
||||
#include <Music_Player_icons.h>
|
||||
#include <music_player_icons.h>
|
||||
#include <gui/gui.h>
|
||||
#include <dialogs/dialogs.h>
|
||||
#include <storage/storage.h>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="NRF24_Sniffer",
|
||||
appid="nrf24_sniffer",
|
||||
name="[NRF24] Sniffer",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="nrfsniff_app",
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <toolbox/path.h>
|
||||
#include <flipper_format/flipper_format.h>
|
||||
#include <Picopass_icons.h>
|
||||
#include <picopass_icons.h>
|
||||
|
||||
#define TAG "PicopassDevice"
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <storage/storage.h>
|
||||
#include <lib/toolbox/path.h>
|
||||
#include <Picopass_icons.h>
|
||||
#include <picopass_icons.h>
|
||||
|
||||
#define PICOPASS_TEXT_STORE_SIZE 128
|
||||
|
||||
|
||||
+3
-1
@@ -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,
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
+6
-6
@@ -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;
|
||||
@@ -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. */
|
||||
|
||||
+3
-1
@@ -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,
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="GPIO_Sentry_Safe",
|
||||
appid="gpio_sentry_safe",
|
||||
name="[GPIO] Sentry Safe",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="sentry_safe_app",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "../signal_gen_app_i.h"
|
||||
#include <furi_hal.h>
|
||||
#include <gui/elements.h>
|
||||
#include <Signal_Generator_icons.h>
|
||||
#include <signal_generator_icons.h>
|
||||
|
||||
typedef enum {
|
||||
LineIndexChannel,
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Snake",
|
||||
appid="snake",
|
||||
name="Snake Game",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="snake_game_app",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Solitaire",
|
||||
appid="solitaire",
|
||||
name="Solitaire",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="solitaire_app",
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#include <gui/canvas_i.h>
|
||||
#include "defines.h"
|
||||
#include "common/ui.h"
|
||||
#include "Solitaire_icons.h"
|
||||
#include "solitaire_icons.h"
|
||||
#include <notification/notification.h>
|
||||
#include <notification/notification_messages.h>
|
||||
void init(GameState* game_state);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Spectrum_Analyzer",
|
||||
appid="spectrum_analyzer",
|
||||
name="Spectrum Analyzer",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="spectrum_analyzer_app",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="SubGHz_Playlist",
|
||||
appid="subghz_playlist",
|
||||
name="Sub-GHz Playlist",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="playlist_app",
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include <storage/storage.h>
|
||||
|
||||
#include <lib/toolbox/path.h>
|
||||
#include <SubGHz_Playlist_icons.h>
|
||||
#include <subghz_playlist_icons.h>
|
||||
|
||||
#include <lib/subghz/protocols/protocol_items.h>
|
||||
#include <flipper_format/flipper_format_i.h>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Tetris",
|
||||
appid="tetris",
|
||||
name="Tetris",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="tetris_game_app",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="TicTacToe",
|
||||
appid="tictactoe",
|
||||
name="Tic Tac Toe",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="tictactoe_game_app",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="WAV_Player",
|
||||
appid="wav_player",
|
||||
name="WAV Player",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="wav_player_app",
|
||||
|
||||
+9
-6
@@ -12,7 +12,7 @@
|
||||
#include "wav_player_view.h"
|
||||
#include <math.h>
|
||||
|
||||
#include <WAV_Player_icons.h>
|
||||
#include <wav_player_icons.h>
|
||||
|
||||
#define TAG "WavPlayer"
|
||||
|
||||
@@ -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);
|
||||
|
||||
furi_hal_interrupt_set_isr(FuriHalInterruptIdDma1Ch1, wav_player_dma_isr, app->queue);
|
||||
|
||||
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);
|
||||
|
||||
wav_player_dma_start();
|
||||
wav_player_speaker_start();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
|
||||
@@ -18,6 +18,8 @@ void wav_player_dma_start();
|
||||
|
||||
void wav_player_dma_stop();
|
||||
|
||||
void wav_player_hal_deinit();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="ESP32_WiFi_Marauder",
|
||||
appid="esp32_wifi_marauder",
|
||||
name="[ESP32] WiFi Marauder",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="wifi_marauder_app",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <gui/modules/widget.h>
|
||||
#include "wifi_marauder_text_input.h"
|
||||
|
||||
#include <ESP32_WiFi_Marauder_icons.h>
|
||||
#include <esp32_wifi_marauder_icons.h>
|
||||
#include <storage/storage.h>
|
||||
#include <lib/toolbox/path.h>
|
||||
#include <dialogs/dialogs.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "wifi_marauder_text_input.h"
|
||||
#include <gui/elements.h>
|
||||
#include "ESP32_WiFi_Marauder_icons.h"
|
||||
#include "esp32_wifi_marauder_icons.h"
|
||||
#include "wifi_marauder_app_i.h"
|
||||
#include <furi.h>
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="WiFi_Scanner",
|
||||
appid="wifi_scanner",
|
||||
name="[WiFi] Scanner",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="wifi_scanner_app",
|
||||
|
||||
+3
-3
@@ -889,8 +889,8 @@ int32_t wifi_scanner_app(void* p) {
|
||||
view_port_input_callback_set(view_port, wifi_module_input_callback, event_queue);
|
||||
|
||||
// Open GUI and register view_port
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
app->m_gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(app->m_gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
//notification_message(app->notification, &sequence_set_only_blue_255);
|
||||
|
||||
@@ -1040,7 +1040,7 @@ int32_t wifi_scanner_app(void* p) {
|
||||
|
||||
view_port_enabled_set(view_port, false);
|
||||
|
||||
gui_remove_view_port(gui, view_port);
|
||||
gui_remove_view_port(app->m_gui, view_port);
|
||||
|
||||
// Close gui record
|
||||
furi_record_close(RECORD_GUI);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="Zombiez",
|
||||
appid="zombiez",
|
||||
name="Zombiez",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="zombiez_game_app",
|
||||
|
||||
@@ -20,6 +20,7 @@ ADD_SCENE(nfc, nfcv_key_input, NfcVKeyInput)
|
||||
ADD_SCENE(nfc, nfcv_unlock, NfcVUnlock)
|
||||
ADD_SCENE(nfc, nfcv_emulate, NfcVEmulate)
|
||||
ADD_SCENE(nfc, nfcv_sniff, NfcVSniff)
|
||||
ADD_SCENE(nfc, nfcv_read_success, NfcVReadSuccess)
|
||||
ADD_SCENE(nfc, nfcf_read_success, NfcfReadSuccess)
|
||||
ADD_SCENE(nfc, nfcf_menu, NfcfMenu)
|
||||
ADD_SCENE(nfc, mf_ultralight_read_success, MfUltralightReadSuccess)
|
||||
|
||||
@@ -17,7 +17,7 @@ void nfc_scene_nfc_data_info_on_enter(void* context) {
|
||||
NfcProtocol protocol = dev_data->protocol;
|
||||
uint8_t text_scroll_height = 0;
|
||||
if((protocol == NfcDeviceProtocolMifareDesfire) || (protocol == NfcDeviceProtocolMifareUl) ||
|
||||
(protocol == NfcDeviceProtocolMifareClassic) || (protocol == NfcDeviceProtocolNfcV)) {
|
||||
(protocol == NfcDeviceProtocolMifareClassic)) {
|
||||
widget_add_button_element(
|
||||
widget, GuiButtonTypeRight, "More", nfc_scene_nfc_data_info_widget_callback, nfc);
|
||||
text_scroll_height = 52;
|
||||
@@ -94,25 +94,6 @@ void nfc_scene_nfc_data_info_on_enter(void* context) {
|
||||
furi_string_cat_printf(temp_str, "Blocks: %02X\n", nfcv_data->block_num);
|
||||
furi_string_cat_printf(temp_str, "Blocksize: %02X\n", nfcv_data->block_size);
|
||||
|
||||
furi_string_cat_printf(
|
||||
temp_str, "Data (%d byte)\n", nfcv_data->block_num * nfcv_data->block_size);
|
||||
|
||||
int maxBlocks = nfcv_data->block_num;
|
||||
if(maxBlocks > 32) {
|
||||
maxBlocks = 32;
|
||||
furi_string_cat_printf(temp_str, "(truncated to %d blocks)\n", maxBlocks);
|
||||
}
|
||||
|
||||
for(int block = 0; block < maxBlocks; block++) {
|
||||
const char* status = (nfcv_data->security_status[block] & 0x01) ? "(lck)" : "";
|
||||
for(int pos = 0; pos < nfcv_data->block_size; pos++) {
|
||||
furi_string_cat_printf(
|
||||
temp_str, " %02X", nfcv_data->data[block * nfcv_data->block_size + pos]);
|
||||
}
|
||||
furi_string_cat_printf(temp_str, " %s\n", status);
|
||||
}
|
||||
furi_string_cat_printf(temp_str, "\n");
|
||||
|
||||
switch(dev_data->nfcv_data.sub_type) {
|
||||
case NfcVTypePlain:
|
||||
furi_string_cat_printf(temp_str, "Type: Plain\n");
|
||||
@@ -193,6 +174,25 @@ void nfc_scene_nfc_data_info_on_enter(void* context) {
|
||||
furi_string_cat_printf(temp_str, "\e#ISO15693 (unknown)\n");
|
||||
break;
|
||||
}
|
||||
|
||||
furi_string_cat_printf(
|
||||
temp_str, "Data (%d byte)\n", nfcv_data->block_num * nfcv_data->block_size);
|
||||
|
||||
int maxBlocks = nfcv_data->block_num;
|
||||
if(maxBlocks > 32) {
|
||||
maxBlocks = 32;
|
||||
furi_string_cat_printf(temp_str, "(truncated to %d blocks)\n", maxBlocks);
|
||||
}
|
||||
|
||||
for(int block = 0; block < maxBlocks; block++) {
|
||||
const char* status = (nfcv_data->security_status[block] & 0x01) ? "(lck)" : "";
|
||||
for(int pos = 0; pos < nfcv_data->block_size; pos++) {
|
||||
furi_string_cat_printf(
|
||||
temp_str, " %02X", nfcv_data->data[block * nfcv_data->block_size + pos]);
|
||||
}
|
||||
furi_string_cat_printf(temp_str, " %s\n", status);
|
||||
}
|
||||
|
||||
} else if(type == FuriHalNfcTypeF) {
|
||||
// Set NFC-F data
|
||||
furi_string_cat_printf(temp_str, "ISO 18092 (NFC-F)\n");
|
||||
|
||||
@@ -13,7 +13,9 @@ bool nfc_scene_nfcv_emulate_worker_callback(NfcWorkerEvent event, void* context)
|
||||
|
||||
switch(event) {
|
||||
case NfcWorkerEventNfcVCommandExecuted:
|
||||
view_dispatcher_send_custom_event(nfc->view_dispatcher, NfcCustomEventUpdateLog);
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
|
||||
view_dispatcher_send_custom_event(nfc->view_dispatcher, NfcCustomEventUpdateLog);
|
||||
}
|
||||
break;
|
||||
case NfcWorkerEventNfcVContentChanged:
|
||||
view_dispatcher_send_custom_event(nfc->view_dispatcher, NfcCustomEventSaveShadow);
|
||||
@@ -45,9 +47,9 @@ static void nfc_scene_nfcv_emulate_widget_config(Nfc* nfc, bool data_received) {
|
||||
FuriString* info_str;
|
||||
info_str = furi_string_alloc();
|
||||
|
||||
widget_add_icon_element(widget, 0, 3, &I_RFIDDolphinSend_97x61);
|
||||
widget_add_string_element(
|
||||
widget, 89, 32, AlignCenter, AlignTop, FontPrimary, "Emulating NfcV");
|
||||
widget_add_icon_element(widget, 0, 3, &I_NFC_dolphin_emulation_47x61);
|
||||
widget_add_string_multiline_element(
|
||||
widget, 87, 13, AlignCenter, AlignTop, FontPrimary, "Emulating\nNFC V");
|
||||
if(strcmp(nfc->dev->dev_name, "")) {
|
||||
furi_string_printf(info_str, "%s", nfc->dev->dev_name);
|
||||
} else {
|
||||
@@ -57,11 +59,13 @@ static void nfc_scene_nfcv_emulate_widget_config(Nfc* nfc, bool data_received) {
|
||||
}
|
||||
furi_string_trim(info_str);
|
||||
widget_add_text_box_element(
|
||||
widget, 56, 43, 70, 21, AlignCenter, AlignTop, furi_string_get_cstr(info_str), true);
|
||||
widget, 52, 40, 70, 21, AlignCenter, AlignTop, furi_string_get_cstr(info_str), true);
|
||||
furi_string_free(info_str);
|
||||
if(data_received) {
|
||||
widget_add_button_element(
|
||||
widget, GuiButtonTypeCenter, "Log", nfc_scene_nfcv_emulate_widget_callback, nfc);
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
|
||||
widget_add_button_element(
|
||||
widget, GuiButtonTypeCenter, "Log", nfc_scene_nfcv_emulate_widget_callback, nfc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,9 +130,11 @@ bool nfc_scene_nfcv_emulate_on_event(void* context, SceneManagerEvent event) {
|
||||
}
|
||||
consumed = true;
|
||||
} else if(event.event == GuiButtonTypeCenter && state == NfcSceneNfcVEmulateStateWidget) {
|
||||
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewTextBox);
|
||||
scene_manager_set_scene_state(
|
||||
nfc->scene_manager, NfcSceneNfcVEmulate, NfcSceneNfcVEmulateStateTextBox);
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
|
||||
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewTextBox);
|
||||
scene_manager_set_scene_state(
|
||||
nfc->scene_manager, NfcSceneNfcVEmulate, NfcSceneNfcVEmulateStateTextBox);
|
||||
}
|
||||
consumed = true;
|
||||
} else if(event.event == NfcCustomEventViewExit && state == NfcSceneNfcVEmulateStateTextBox) {
|
||||
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
enum SubmenuIndex {
|
||||
SubmenuIndexSave,
|
||||
SubmenuIndexEmulate,
|
||||
SubmenuIndexInfo,
|
||||
};
|
||||
|
||||
void nfc_scene_nfcv_menu_submenu_callback(void* context, uint32_t index) {
|
||||
@@ -19,6 +20,7 @@ void nfc_scene_nfcv_menu_on_enter(void* context) {
|
||||
submenu_add_item(
|
||||
submenu, "Emulate", SubmenuIndexEmulate, nfc_scene_nfcv_menu_submenu_callback, nfc);
|
||||
submenu_add_item(submenu, "Save", SubmenuIndexSave, nfc_scene_nfcv_menu_submenu_callback, nfc);
|
||||
submenu_add_item(submenu, "Info", SubmenuIndexInfo, nfc_scene_nfcv_menu_submenu_callback, nfc);
|
||||
|
||||
submenu_set_selected_item(
|
||||
nfc->submenu, scene_manager_get_scene_state(nfc->scene_manager, NfcSceneNfcVMenu));
|
||||
@@ -45,6 +47,9 @@ bool nfc_scene_nfcv_menu_on_event(void* context, SceneManagerEvent event) {
|
||||
DOLPHIN_DEED(DolphinDeedNfcEmulate);
|
||||
}
|
||||
consumed = true;
|
||||
} else if(event.event == SubmenuIndexInfo) {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcDataInfo);
|
||||
consumed = true;
|
||||
}
|
||||
scene_manager_set_scene_state(nfc->scene_manager, NfcSceneNfcVMenu, event.event);
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
#include "../nfc_i.h"
|
||||
|
||||
void nfc_scene_nfcv_read_success_widget_callback(
|
||||
GuiButtonType result,
|
||||
InputType type,
|
||||
void* context) {
|
||||
furi_assert(context);
|
||||
Nfc* nfc = context;
|
||||
|
||||
if(type == InputTypeShort) {
|
||||
view_dispatcher_send_custom_event(nfc->view_dispatcher, result);
|
||||
}
|
||||
}
|
||||
|
||||
void nfc_scene_nfcv_read_success_on_enter(void* context) {
|
||||
Nfc* nfc = context;
|
||||
NfcDeviceData* dev_data = &nfc->dev->dev_data;
|
||||
FuriHalNfcDevData* nfc_data = &nfc->dev->dev_data.nfc_data;
|
||||
NfcVData* nfcv_data = &nfc->dev->dev_data.nfcv_data;
|
||||
// Setup view
|
||||
Widget* widget = nfc->widget;
|
||||
widget_add_button_element(
|
||||
widget, GuiButtonTypeLeft, "Retry", nfc_scene_nfcv_read_success_widget_callback, nfc);
|
||||
widget_add_button_element(
|
||||
widget, GuiButtonTypeRight, "More", nfc_scene_nfcv_read_success_widget_callback, nfc);
|
||||
|
||||
FuriString* temp_str = furi_string_alloc();
|
||||
|
||||
switch(dev_data->nfcv_data.sub_type) {
|
||||
case NfcVTypePlain:
|
||||
furi_string_cat_printf(temp_str, "\e#ISO15693\n");
|
||||
break;
|
||||
case NfcVTypeSlix:
|
||||
furi_string_cat_printf(temp_str, "\e#ISO15693 SLIX\n");
|
||||
break;
|
||||
case NfcVTypeSlixS:
|
||||
furi_string_cat_printf(temp_str, "\e#ISO15693 SLIX-S\n");
|
||||
break;
|
||||
case NfcVTypeSlixL:
|
||||
furi_string_cat_printf(temp_str, "\e#ISO15693 SLIX-L\n");
|
||||
break;
|
||||
case NfcVTypeSlix2:
|
||||
furi_string_cat_printf(temp_str, "\e#ISO15693 SLIX2\n");
|
||||
break;
|
||||
default:
|
||||
furi_string_cat_printf(temp_str, "\e#ISO15693 (unknown)\n");
|
||||
break;
|
||||
}
|
||||
furi_string_cat_printf(temp_str, "UID:");
|
||||
for(size_t i = 0; i < nfc_data->uid_len; i++) {
|
||||
furi_string_cat_printf(temp_str, " %02X", nfc_data->uid[i]);
|
||||
}
|
||||
furi_string_cat_printf(temp_str, "\n");
|
||||
furi_string_cat_printf(temp_str, "Blocks: %02X\n", nfcv_data->block_num);
|
||||
furi_string_cat_printf(temp_str, "Blocksize: %02X\n", nfcv_data->block_size);
|
||||
|
||||
widget_add_text_scroll_element(widget, 0, 0, 128, 52, furi_string_get_cstr(temp_str));
|
||||
furi_string_free(temp_str);
|
||||
|
||||
notification_message_block(nfc->notifications, &sequence_set_green_255);
|
||||
|
||||
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget);
|
||||
}
|
||||
|
||||
bool nfc_scene_nfcv_read_success_on_event(void* context, SceneManagerEvent event) {
|
||||
Nfc* nfc = context;
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == GuiButtonTypeLeft) {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneRetryConfirm);
|
||||
consumed = true;
|
||||
} else if(event.event == GuiButtonTypeRight) {
|
||||
// Clear device name
|
||||
nfc_device_set_name(nfc->dev, "");
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVMenu);
|
||||
consumed = true;
|
||||
}
|
||||
} else if(event.type == SceneManagerEventTypeBack) {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneExitConfirm);
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void nfc_scene_nfcv_read_success_on_exit(void* context) {
|
||||
Nfc* nfc = context;
|
||||
|
||||
notification_message_block(nfc->notifications, &sequence_reset_green);
|
||||
|
||||
// Clear view
|
||||
widget_reset(nfc->widget);
|
||||
}
|
||||
@@ -69,7 +69,7 @@ bool nfc_scene_read_on_event(void* context, SceneManagerEvent event) {
|
||||
consumed = true;
|
||||
} else if(event.event == NfcWorkerEventReadNfcV) {
|
||||
notification_message(nfc->notifications, &sequence_success);
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcDataInfo);
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVReadSuccess);
|
||||
DOLPHIN_DEED(DolphinDeedNfcReadSuccess);
|
||||
consumed = true;
|
||||
} else if(event.event == NfcWorkerEventReadMfUltralight) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,28.1,,
|
||||
Version,+,28.2,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
Header,+,applications/services/cli/cli_vcp.h,,
|
||||
@@ -80,6 +80,7 @@ Header,+,firmware/targets/furi_hal_include/furi_hal_usb_hid.h,,
|
||||
Header,+,firmware/targets/furi_hal_include/furi_hal_usb_hid_u2f.h,,
|
||||
Header,+,firmware/targets/furi_hal_include/furi_hal_version.h,,
|
||||
Header,+,firmware/targets/furi_hal_include/furi_hal_vibro.h,,
|
||||
Header,+,lib/digital_signal/digital_signal.h,,
|
||||
Header,+,lib/flipper_application/api_hashtable/api_hashtable.h,,
|
||||
Header,+,lib/flipper_application/api_hashtable/compilesort.hpp,,
|
||||
Header,+,lib/flipper_application/flipper_application.h,,
|
||||
@@ -617,6 +618,24 @@ Function,+,dialog_message_set_text,void,"DialogMessage*, const char*, uint8_t, u
|
||||
Function,+,dialog_message_show,DialogMessageButton,"DialogsApp*, const DialogMessage*"
|
||||
Function,+,dialog_message_show_storage_error,void,"DialogsApp*, const char*"
|
||||
Function,-,difftime,double,"time_t, time_t"
|
||||
Function,-,digital_sequence_add,void,"DigitalSequence*, uint8_t"
|
||||
Function,-,digital_sequence_alloc,DigitalSequence*,"uint32_t, const GpioPin*"
|
||||
Function,-,digital_sequence_clear,void,DigitalSequence*
|
||||
Function,-,digital_sequence_free,void,DigitalSequence*
|
||||
Function,-,digital_sequence_send,_Bool,DigitalSequence*
|
||||
Function,-,digital_sequence_set_sendtime,void,"DigitalSequence*, uint32_t"
|
||||
Function,-,digital_sequence_set_signal,void,"DigitalSequence*, uint8_t, DigitalSignal*"
|
||||
Function,-,digital_sequence_timebase_correction,void,"DigitalSequence*, float"
|
||||
Function,-,digital_signal_add,void,"DigitalSignal*, uint32_t"
|
||||
Function,-,digital_signal_add_pulse,void,"DigitalSignal*, uint32_t, _Bool"
|
||||
Function,-,digital_signal_alloc,DigitalSignal*,uint32_t
|
||||
Function,-,digital_signal_append,_Bool,"DigitalSignal*, DigitalSignal*"
|
||||
Function,-,digital_signal_free,void,DigitalSignal*
|
||||
Function,-,digital_signal_get_edge,uint32_t,"DigitalSignal*, uint32_t"
|
||||
Function,-,digital_signal_get_edges_cnt,uint32_t,DigitalSignal*
|
||||
Function,-,digital_signal_get_start_level,_Bool,DigitalSignal*
|
||||
Function,-,digital_signal_prepare_arr,void,DigitalSignal*
|
||||
Function,-,digital_signal_send,void,"DigitalSignal*, const GpioPin*"
|
||||
Function,-,diprintf,int,"int, const char*, ..."
|
||||
Function,+,dir_walk_alloc,DirWalk*,Storage*
|
||||
Function,+,dir_walk_close,void,DirWalk*
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,28.1,,
|
||||
Version,+,28.2,,
|
||||
Header,+,applications/main/archive/helpers/favorite_timeout.h,,
|
||||
Header,+,applications/main/fap_loader/fap_loader_app.h,,
|
||||
Header,+,applications/main/subghz/helpers/subghz_txrx.h,,
|
||||
@@ -90,6 +90,7 @@ Header,+,firmware/targets/furi_hal_include/furi_hal_usb_hid.h,,
|
||||
Header,+,firmware/targets/furi_hal_include/furi_hal_usb_hid_u2f.h,,
|
||||
Header,+,firmware/targets/furi_hal_include/furi_hal_version.h,,
|
||||
Header,+,firmware/targets/furi_hal_include/furi_hal_vibro.h,,
|
||||
Header,+,lib/digital_signal/digital_signal.h,,
|
||||
Header,+,lib/drivers/rgb_backlight.h,,
|
||||
Header,+,lib/flipper_application/api_hashtable/api_hashtable.h,,
|
||||
Header,+,lib/flipper_application/api_hashtable/compilesort.hpp,,
|
||||
|
||||
|
@@ -28,6 +28,7 @@
|
||||
"flipperformat",
|
||||
"toolbox",
|
||||
"nfc",
|
||||
"digital_signal",
|
||||
"pulse_reader",
|
||||
"microtar",
|
||||
"usb_stm32",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
- `nfc` - NFC library, used by NFC application
|
||||
- `one_wire` - OneWire library, used by iButton application
|
||||
- `print` - Tiny printf implementation
|
||||
- `digital_signal` - Digital Signal library used by NFC for software implemented protocols
|
||||
- `pulse_reader` - Pulse Reader library used by NFC for software implemented protocols
|
||||
- `qrcode` - QR-Code library
|
||||
- `stm32wb_cmsis` - STM32WB series CMSIS headers, extends CMSIS Core
|
||||
|
||||
+1
-1
@@ -15,7 +15,6 @@ env.Append(
|
||||
Dir("u8g2"),
|
||||
Dir("update_util"),
|
||||
Dir("print"),
|
||||
Dir("pulse_reader"),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -96,6 +95,7 @@ libs = env.BuildModules(
|
||||
"mbedtls",
|
||||
"subghz",
|
||||
"nfc",
|
||||
"digital_signal",
|
||||
"pulse_reader",
|
||||
"appframe",
|
||||
"misc",
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
Import("env")
|
||||
|
||||
env.Append(
|
||||
CPPPATH=[
|
||||
"#/lib/digital_signal",
|
||||
],
|
||||
SDK_HEADERS=[
|
||||
File("digital_signal.h"),
|
||||
],
|
||||
)
|
||||
|
||||
libenv = env.Clone(FW_LIB_NAME="digital_signal")
|
||||
libenv.ApplyLibFlags()
|
||||
libenv.Append(CCFLAGS=["-O3", "-funroll-loops", "-Ofast"])
|
||||
|
||||
sources = libenv.GlobRecursive("*.c*")
|
||||
|
||||
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
|
||||
libenv.Install("${LIB_DIST_DIR}", lib)
|
||||
Return("lib")
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <stm32wbxx_ll_tim.h>
|
||||
|
||||
/* must be on bank B */
|
||||
#define DEBUG_OUTPUT gpio_ext_pb3
|
||||
//#define DEBUG_OUTPUT gpio_ext_pb3
|
||||
|
||||
struct ReloadBuffer {
|
||||
uint32_t* buffer; /* DMA ringbuffer */
|
||||
@@ -212,8 +212,7 @@ void digital_signal_prepare_arr(DigitalSignal* signal) {
|
||||
internals->reload_reg_entries = 0;
|
||||
|
||||
for(size_t pos = 0; pos < signal->edge_cnt; pos++) {
|
||||
uint32_t edge_scaled = (internals->factor * signal->edge_timings[pos]) / (1024 * 1024);
|
||||
uint32_t pulse_duration = edge_scaled + internals->reload_reg_remainder;
|
||||
uint32_t pulse_duration = signal->edge_timings[pos] + internals->reload_reg_remainder;
|
||||
if(pulse_duration < 10 || pulse_duration > 10000000) {
|
||||
/*FURI_LOG_D(
|
||||
TAG,
|
||||
|
||||
@@ -4,8 +4,6 @@ Import("env")
|
||||
|
||||
env.Append(
|
||||
CPPPATH=[
|
||||
"#/lib/digital_signal",
|
||||
"#/lib/pulse_reader",
|
||||
"#/lib/fnv1a_hash",
|
||||
"#/lib/heatshrink",
|
||||
"#/lib/micro-ecc",
|
||||
@@ -28,8 +26,6 @@ libenv.ApplyLibFlags()
|
||||
sources = []
|
||||
|
||||
libs_recurse = [
|
||||
"digital_signal",
|
||||
"pulse_reader",
|
||||
"micro-ecc",
|
||||
"u8g2",
|
||||
"update_util",
|
||||
|
||||
@@ -410,6 +410,9 @@ void nfcv_emu_free(NfcVData* nfcv_data) {
|
||||
digital_sequence_free(nfcv_data->emu_air.nfcv_signal);
|
||||
}
|
||||
if(nfcv_data->emu_air.reader_signal) {
|
||||
// Stop pulse reader and disable bus before free
|
||||
pulse_reader_stop(nfcv_data->emu_air.reader_signal);
|
||||
// Free pulse reader
|
||||
pulse_reader_free(nfcv_data->emu_air.reader_signal);
|
||||
}
|
||||
|
||||
@@ -1372,13 +1375,15 @@ bool nfcv_emu_loop(
|
||||
|
||||
pulse_reader_start(nfcv_data->emu_air.reader_signal);
|
||||
ret = true;
|
||||
} else {
|
||||
if(frame_state != NFCV_FRAME_STATE_SOF1) {
|
||||
|
||||
}
|
||||
#ifdef NFCV_VERBOSE
|
||||
else {
|
||||
if(frame_state != NFCV_FRAME_STATE_SOF1) {
|
||||
FURI_LOG_T(TAG, "leaving while in state: %lu", frame_state);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NFCV_DIAGNOSTIC_DUMPS
|
||||
if(period_buffer_pos) {
|
||||
|
||||
@@ -49,11 +49,11 @@ class DolphinBubbleAnimation:
|
||||
|
||||
def load(self, animation_directory: str):
|
||||
if not os.path.isdir(animation_directory):
|
||||
raise Exception(f"Animation folder doesn't exists: { animation_directory }")
|
||||
raise Exception(f"Animation folder doesn't exist: { animation_directory }")
|
||||
|
||||
meta_filename = os.path.join(animation_directory, "meta.txt")
|
||||
if not os.path.isfile(meta_filename):
|
||||
raise Exception(f"Animation meta file doesn't exists: { meta_filename }")
|
||||
raise Exception(f"Animation meta file doesn't exist: { meta_filename }")
|
||||
|
||||
self.logger.info(f"Loading meta from {meta_filename}")
|
||||
file = FlipperFormatFile()
|
||||
|
||||
Reference in New Issue
Block a user