mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 05:06:30 +04:00
adapt plugins to furi stream, fix printf formats
This commit is contained in:
@@ -258,7 +258,7 @@ static bool music_player_worker_parse_notes(MusicPlayerWorker* instance, const c
|
|||||||
if(!is_valid) {
|
if(!is_valid) {
|
||||||
FURI_LOG_E(
|
FURI_LOG_E(
|
||||||
TAG,
|
TAG,
|
||||||
"Invalid note: %u%c%c%u.%u",
|
"Invalid note: %lu%c%c%lu.%lu",
|
||||||
duration,
|
duration,
|
||||||
note_char == '\0' ? '_' : note_char,
|
note_char == '\0' ? '_' : note_char,
|
||||||
sharp_char == '\0' ? '_' : sharp_char,
|
sharp_char == '\0' ? '_' : sharp_char,
|
||||||
@@ -281,7 +281,7 @@ static bool music_player_worker_parse_notes(MusicPlayerWorker* instance, const c
|
|||||||
if(music_player_worker_add_note(instance, semitone, duration, dots)) {
|
if(music_player_worker_add_note(instance, semitone, duration, dots)) {
|
||||||
FURI_LOG_D(
|
FURI_LOG_D(
|
||||||
TAG,
|
TAG,
|
||||||
"Added note: %c%c%u.%u = %u %u",
|
"Added note: %c%c%lu.%lu = %u %lu",
|
||||||
note_char == '\0' ? '_' : note_char,
|
note_char == '\0' ? '_' : note_char,
|
||||||
sharp_char == '\0' ? '_' : sharp_char,
|
sharp_char == '\0' ? '_' : sharp_char,
|
||||||
octave,
|
octave,
|
||||||
@@ -291,7 +291,7 @@ static bool music_player_worker_parse_notes(MusicPlayerWorker* instance, const c
|
|||||||
} else {
|
} else {
|
||||||
FURI_LOG_E(
|
FURI_LOG_E(
|
||||||
TAG,
|
TAG,
|
||||||
"Invalid note: %c%c%u.%u = %u %u",
|
"Invalid note: %c%c%lu.%lu = %u %lu",
|
||||||
note_char == '\0' ? '_' : note_char,
|
note_char == '\0' ? '_' : note_char,
|
||||||
sharp_char == '\0' ? '_' : sharp_char,
|
sharp_char == '\0' ? '_' : sharp_char,
|
||||||
octave,
|
octave,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
//#include <notification/notification.h>
|
//#include <notification/notification.h>
|
||||||
//#include <notification/notification_messages.h>
|
//#include <notification/notification_messages.h>
|
||||||
//#include <stdlib.h>
|
//#include <stdlib.h>
|
||||||
#include <stream_buffer.h>
|
|
||||||
#include <u8g2.h>
|
#include <u8g2.h>
|
||||||
|
|
||||||
#include "FlipperZeroWiFiDeauthModuleDefines.h"
|
#include "FlipperZeroWiFiDeauthModuleDefines.h"
|
||||||
@@ -65,7 +65,7 @@ typedef struct SWiFiDeauthApp {
|
|||||||
Gui* m_gui;
|
Gui* m_gui;
|
||||||
FuriThread* m_worker_thread;
|
FuriThread* m_worker_thread;
|
||||||
//NotificationApp* m_notification;
|
//NotificationApp* m_notification;
|
||||||
StreamBufferHandle_t m_rx_stream;
|
FuriStreamBuffer* m_rx_stream;
|
||||||
SGpioButtons m_GpioButtons;
|
SGpioButtons m_GpioButtons;
|
||||||
|
|
||||||
bool m_wifiDeauthModuleInitialized;
|
bool m_wifiDeauthModuleInitialized;
|
||||||
@@ -219,7 +219,6 @@ static void
|
|||||||
|
|
||||||
static void uart_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context) {
|
static void uart_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context) {
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
|
||||||
|
|
||||||
SWiFiDeauthApp* app = context;
|
SWiFiDeauthApp* app = context;
|
||||||
|
|
||||||
@@ -227,9 +226,8 @@ static void uart_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context) {
|
|||||||
|
|
||||||
if(ev == UartIrqEventRXNE) {
|
if(ev == UartIrqEventRXNE) {
|
||||||
DEAUTH_APP_LOG_I("ev == UartIrqEventRXNE");
|
DEAUTH_APP_LOG_I("ev == UartIrqEventRXNE");
|
||||||
xStreamBufferSendFromISR(app->m_rx_stream, &data, 1, &xHigherPriorityTaskWoken);
|
furi_stream_buffer_send(app->m_rx_stream, &data, 1, 0);
|
||||||
furi_thread_flags_set(furi_thread_get_id(app->m_worker_thread), WorkerEventRx);
|
furi_thread_flags_set(furi_thread_get_id(app->m_worker_thread), WorkerEventRx);
|
||||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,7 +240,7 @@ static int32_t uart_worker(void* context) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamBufferHandle_t rx_stream = app->m_rx_stream;
|
FuriStreamBuffer* rx_stream = app->m_rx_stream;
|
||||||
|
|
||||||
release_mutex((ValueMutex*)context, app);
|
release_mutex((ValueMutex*)context, app);
|
||||||
|
|
||||||
@@ -272,7 +270,7 @@ static int32_t uart_worker(void* context) {
|
|||||||
const uint8_t dataBufferSize = 64;
|
const uint8_t dataBufferSize = 64;
|
||||||
uint8_t dataBuffer[dataBufferSize];
|
uint8_t dataBuffer[dataBufferSize];
|
||||||
dataReceivedLength =
|
dataReceivedLength =
|
||||||
xStreamBufferReceive(rx_stream, dataBuffer, dataBufferSize, 25);
|
furi_stream_buffer_receive(rx_stream, dataBuffer, dataBufferSize, 25);
|
||||||
if(dataReceivedLength > 0) {
|
if(dataReceivedLength > 0) {
|
||||||
#if ENABLE_MODULE_POWER
|
#if ENABLE_MODULE_POWER
|
||||||
if(!initialized) {
|
if(!initialized) {
|
||||||
@@ -367,7 +365,7 @@ int32_t esp8266_deauth_app(void* p) {
|
|||||||
|
|
||||||
DEAUTH_APP_LOG_I("Mutex created");
|
DEAUTH_APP_LOG_I("Mutex created");
|
||||||
|
|
||||||
app->m_rx_stream = xStreamBufferCreate(1 * 1024, 1);
|
app->m_rx_stream = furi_stream_buffer_alloc(1 * 1024, 1);
|
||||||
|
|
||||||
//app->m_notification = furi_record_open("notification");
|
//app->m_notification = furi_record_open("notification");
|
||||||
|
|
||||||
@@ -518,7 +516,7 @@ int32_t esp8266_deauth_app(void* p) {
|
|||||||
|
|
||||||
furi_message_queue_free(event_queue);
|
furi_message_queue_free(event_queue);
|
||||||
|
|
||||||
vStreamBufferDelete(app->m_rx_stream);
|
furi_stream_buffer_free(app->m_rx_stream);
|
||||||
|
|
||||||
delete_mutex(&app_data_mutex);
|
delete_mutex(&app_data_mutex);
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ static bool open_ducky_script(Stream* stream, PluginState* plugin_state) {
|
|||||||
furi_record_close("dialogs");
|
furi_record_close("dialogs");
|
||||||
if(ret) {
|
if(ret) {
|
||||||
if(!file_stream_open(stream, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING)) {
|
if(!file_stream_open(stream, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING)) {
|
||||||
FURI_LOG_D(TAG, "Cannot open file \"%s\"", (path));
|
FURI_LOG_D(TAG, "Cannot open file \"%s\"", furi_string_get_cstr(path));
|
||||||
} else {
|
} else {
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
@@ -147,7 +147,7 @@ static bool open_addrs_file(Stream* stream) {
|
|||||||
furi_record_close("dialogs");
|
furi_record_close("dialogs");
|
||||||
if(ret) {
|
if(ret) {
|
||||||
if(!file_stream_open(stream, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING)) {
|
if(!file_stream_open(stream, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING)) {
|
||||||
FURI_LOG_D(TAG, "Cannot open file \"%s\"", (path));
|
FURI_LOG_D(TAG, "Cannot open file \"%s\"", furi_string_get_cstr(path));
|
||||||
} else {
|
} else {
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ static bool mj_process_ducky_line(
|
|||||||
repeat_cnt = atoi(line_tmp);
|
repeat_cnt = atoi(line_tmp);
|
||||||
if(repeat_cnt < 2) return false;
|
if(repeat_cnt < 2) return false;
|
||||||
|
|
||||||
FURI_LOG_D(TAG, "repeating %s %d times", prev_line, repeat_cnt);
|
FURI_LOG_D(TAG, "repeating %s %ld times", prev_line, repeat_cnt);
|
||||||
for(uint32_t i = 0; i < repeat_cnt; i++)
|
for(uint32_t i = 0; i < repeat_cnt; i++)
|
||||||
mj_process_ducky_line(handle, addr, addr_size, rate, prev_line, NULL, plugin_state);
|
mj_process_ducky_line(handle, addr, addr_size, rate, prev_line, NULL, plugin_state);
|
||||||
|
|
||||||
|
|||||||
@@ -473,9 +473,9 @@ static void render_callback(Canvas* canvas, void* ctx) {
|
|||||||
canvas, 1, 19, AlignLeft, AlignTop, furi_string_get_cstr(temp_str));
|
canvas, 1, 19, AlignLeft, AlignTop, furi_string_get_cstr(temp_str));
|
||||||
|
|
||||||
if(app->meta->playlist_repetitions <= 0) {
|
if(app->meta->playlist_repetitions <= 0) {
|
||||||
furi_string_printf(temp_str, "Repeat: inf", app->meta->playlist_repetitions);
|
furi_string_set(temp_str, "Repeat: inf");
|
||||||
} else if(app->meta->playlist_repetitions == 1) {
|
} else if(app->meta->playlist_repetitions == 1) {
|
||||||
furi_string_printf(temp_str, "Repeat: no", app->meta->playlist_repetitions);
|
furi_string_set(temp_str, "Repeat: no");
|
||||||
} else {
|
} else {
|
||||||
furi_string_printf(temp_str, "Repeat: %dx", app->meta->playlist_repetitions);
|
furi_string_printf(temp_str, "Repeat: %dx", app->meta->playlist_repetitions);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ void spectrum_analyzer_calculate_frequencies(SpectrumAnalyzerModel* model) {
|
|||||||
model->max_rssi = -200.0;
|
model->max_rssi = -200.0;
|
||||||
model->max_rssi_dec = 0;
|
model->max_rssi_dec = 0;
|
||||||
|
|
||||||
FURI_LOG_D("Spectrum", "setup_frequencies - max_hz: %u - min_hz: %u", max_hz, min_hz);
|
FURI_LOG_D("Spectrum", "setup_frequencies - max_hz: %lu - min_hz: %lu", max_hz, min_hz);
|
||||||
FURI_LOG_D("Spectrum", "center_freq: %u", model->center_freq);
|
FURI_LOG_D("Spectrum", "center_freq: %u", model->center_freq);
|
||||||
FURI_LOG_D(
|
FURI_LOG_D(
|
||||||
"Spectrum",
|
"Spectrum",
|
||||||
@@ -450,7 +450,7 @@ int32_t spectrum_analyzer_app(void* p) {
|
|||||||
break;
|
break;
|
||||||
case InputKeyRight:
|
case InputKeyRight:
|
||||||
model->center_freq += hstep;
|
model->center_freq += hstep;
|
||||||
FURI_LOG_D("Spectrum", "center_freq: %lu", model->center_freq);
|
FURI_LOG_D("Spectrum", "center_freq: %u", model->center_freq);
|
||||||
spectrum_analyzer_calculate_frequencies(model);
|
spectrum_analyzer_calculate_frequencies(model);
|
||||||
spectrum_analyzer_worker_set_frequencies(
|
spectrum_analyzer_worker_set_frequencies(
|
||||||
spectrum_analyzer->worker, model->channel0_frequency, model->spacing, model->width);
|
spectrum_analyzer->worker, model->channel0_frequency, model->spacing, model->width);
|
||||||
@@ -460,7 +460,7 @@ int32_t spectrum_analyzer_app(void* p) {
|
|||||||
spectrum_analyzer_calculate_frequencies(model);
|
spectrum_analyzer_calculate_frequencies(model);
|
||||||
spectrum_analyzer_worker_set_frequencies(
|
spectrum_analyzer_worker_set_frequencies(
|
||||||
spectrum_analyzer->worker, model->channel0_frequency, model->spacing, model->width);
|
spectrum_analyzer->worker, model->channel0_frequency, model->spacing, model->width);
|
||||||
FURI_LOG_D("Spectrum", "center_freq: %lu", model->center_freq);
|
FURI_LOG_D("Spectrum", "center_freq: %u", model->center_freq);
|
||||||
break;
|
break;
|
||||||
case InputKeyOk: {
|
case InputKeyOk: {
|
||||||
switch(model->width) {
|
switch(model->width) {
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ void spectrum_analyzer_worker_set_frequencies(
|
|||||||
|
|
||||||
FURI_LOG_D(
|
FURI_LOG_D(
|
||||||
"SpectrumWorker",
|
"SpectrumWorker",
|
||||||
"spectrum_analyzer_worker_set_frequencies - channel0_frequency= %u - spacing = %u - width = %u",
|
"spectrum_analyzer_worker_set_frequencies - channel0_frequency= %lu - spacing = %lu - width = %u",
|
||||||
channel0_frequency,
|
channel0_frequency,
|
||||||
spacing,
|
spacing,
|
||||||
width);
|
width);
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ bool subbrute_device_create_packet_parsed(SubBruteDevice* instance, uint64_t ste
|
|||||||
//snprintf(step_payload, sizeof(step_payload), "%16X", step);
|
//snprintf(step_payload, sizeof(step_payload), "%16X", step);
|
||||||
//snprintf(step_payload, sizeof(step_payload), "%016llX", step);
|
//snprintf(step_payload, sizeof(step_payload), "%016llX", step);
|
||||||
FuriString* buffer = furi_string_alloc();
|
FuriString* buffer = furi_string_alloc();
|
||||||
furi_string_printf(buffer, "%16X", step);
|
furi_string_printf(buffer, "%16llX", step);
|
||||||
int j = 0;
|
int j = 0;
|
||||||
furi_string_set_str(candidate, " ");
|
furi_string_set_str(candidate, " ");
|
||||||
for(uint8_t i = 0; i < 16; i++) {
|
for(uint8_t i = 0; i < 16; i++) {
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include <notification/notification_messages.h>
|
#include <notification/notification_messages.h>
|
||||||
|
|
||||||
#include <lib/toolbox/stream/stream.h>
|
#include <lib/toolbox/stream/stream.h>
|
||||||
#include <stream_buffer.h>
|
|
||||||
|
|
||||||
#include <gui/gui.h>
|
#include <gui/gui.h>
|
||||||
#include <gui/view_dispatcher.h>
|
#include <gui/view_dispatcher.h>
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
#include "wifi_marauder_app_i.h"
|
#include "wifi_marauder_app_i.h"
|
||||||
#include "wifi_marauder_uart.h"
|
#include "wifi_marauder_uart.h"
|
||||||
|
|
||||||
#include <stream_buffer.h>
|
|
||||||
|
|
||||||
#define UART_CH (FuriHalUartIdUSART1)
|
#define UART_CH (FuriHalUartIdUSART1)
|
||||||
#define BAUDRATE (115200)
|
#define BAUDRATE (115200)
|
||||||
|
|
||||||
struct WifiMarauderUart {
|
struct WifiMarauderUart {
|
||||||
WifiMarauderApp* app;
|
WifiMarauderApp* app;
|
||||||
FuriThread* rx_thread;
|
FuriThread* rx_thread;
|
||||||
StreamBufferHandle_t rx_stream;
|
FuriStreamBuffer* rx_stream;
|
||||||
uint8_t rx_buf[RX_BUF_SIZE + 1];
|
uint8_t rx_buf[RX_BUF_SIZE + 1];
|
||||||
void (*handle_rx_data_cb)(uint8_t* buf, size_t len, void* context);
|
void (*handle_rx_data_cb)(uint8_t* buf, size_t len, void* context);
|
||||||
};
|
};
|
||||||
@@ -30,19 +28,17 @@ void wifi_marauder_uart_set_handle_rx_data_cb(
|
|||||||
|
|
||||||
void wifi_marauder_uart_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context) {
|
void wifi_marauder_uart_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context) {
|
||||||
WifiMarauderUart* uart = (WifiMarauderUart*)context;
|
WifiMarauderUart* uart = (WifiMarauderUart*)context;
|
||||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
|
||||||
|
|
||||||
if(ev == UartIrqEventRXNE) {
|
if(ev == UartIrqEventRXNE) {
|
||||||
xStreamBufferSendFromISR(uart->rx_stream, &data, 1, &xHigherPriorityTaskWoken);
|
furi_stream_buffer_send(uart->rx_stream, &data, 1, 0);
|
||||||
furi_thread_flags_set(furi_thread_get_id(uart->rx_thread), WorkerEvtRxDone);
|
furi_thread_flags_set(furi_thread_get_id(uart->rx_thread), WorkerEvtRxDone);
|
||||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t uart_worker(void* context) {
|
static int32_t uart_worker(void* context) {
|
||||||
WifiMarauderUart* uart = (void*)context;
|
WifiMarauderUart* uart = (void*)context;
|
||||||
|
|
||||||
uart->rx_stream = xStreamBufferCreate(RX_BUF_SIZE, 1);
|
uart->rx_stream = furi_stream_buffer_alloc(RX_BUF_SIZE, 1);
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
uint32_t events =
|
uint32_t events =
|
||||||
@@ -50,14 +46,14 @@ static int32_t uart_worker(void* context) {
|
|||||||
furi_check((events & FuriFlagError) == 0);
|
furi_check((events & FuriFlagError) == 0);
|
||||||
if(events & WorkerEvtStop) break;
|
if(events & WorkerEvtStop) break;
|
||||||
if(events & WorkerEvtRxDone) {
|
if(events & WorkerEvtRxDone) {
|
||||||
size_t len = xStreamBufferReceive(uart->rx_stream, uart->rx_buf, RX_BUF_SIZE, 0);
|
size_t len = furi_stream_buffer_receive(uart->rx_stream, uart->rx_buf, RX_BUF_SIZE, 0);
|
||||||
if(len > 0) {
|
if(len > 0) {
|
||||||
if(uart->handle_rx_data_cb) uart->handle_rx_data_cb(uart->rx_buf, len, uart->app);
|
if(uart->handle_rx_data_cb) uart->handle_rx_data_cb(uart->rx_buf, len, uart->app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vStreamBufferDelete(uart->rx_stream);
|
furi_stream_buffer_free(uart->rx_stream);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include <notification/notification.h>
|
#include <notification/notification.h>
|
||||||
#include <notification/notification_messages.h>
|
#include <notification/notification_messages.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stream_buffer.h>
|
|
||||||
#include <u8g2.h>
|
#include <u8g2.h>
|
||||||
|
|
||||||
#include "FlipperZeroWiFiModuleDefines.h"
|
#include "FlipperZeroWiFiModuleDefines.h"
|
||||||
@@ -86,7 +86,7 @@ typedef struct SWiFiScannerApp {
|
|||||||
Gui* m_gui;
|
Gui* m_gui;
|
||||||
FuriThread* m_worker_thread;
|
FuriThread* m_worker_thread;
|
||||||
NotificationApp* m_notification;
|
NotificationApp* m_notification;
|
||||||
StreamBufferHandle_t m_rx_stream;
|
FuriStreamBuffer* m_rx_stream;
|
||||||
|
|
||||||
bool m_wifiModuleInitialized;
|
bool m_wifiModuleInitialized;
|
||||||
bool m_wifiModuleAttached;
|
bool m_wifiModuleAttached;
|
||||||
@@ -445,7 +445,6 @@ static void wifi_module_input_callback(InputEvent* input_event, FuriMessageQueue
|
|||||||
|
|
||||||
static void uart_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context) {
|
static void uart_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context) {
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
|
||||||
|
|
||||||
SWiFiScannerApp* app = context;
|
SWiFiScannerApp* app = context;
|
||||||
|
|
||||||
@@ -453,9 +452,8 @@ static void uart_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context) {
|
|||||||
|
|
||||||
if(ev == UartIrqEventRXNE) {
|
if(ev == UartIrqEventRXNE) {
|
||||||
WIFI_APP_LOG_I("ev == UartIrqEventRXNE");
|
WIFI_APP_LOG_I("ev == UartIrqEventRXNE");
|
||||||
xStreamBufferSendFromISR(app->m_rx_stream, &data, 1, &xHigherPriorityTaskWoken);
|
furi_stream_buffer_send(app->m_rx_stream, &data, 1, 0);
|
||||||
furi_thread_flags_set(furi_thread_get_id(app->m_worker_thread), WorkerEventRx);
|
furi_thread_flags_set(furi_thread_get_id(app->m_worker_thread), WorkerEventRx);
|
||||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -467,7 +465,7 @@ static int32_t uart_worker(void* context) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamBufferHandle_t rx_stream = app->m_rx_stream;
|
FuriStreamBuffer* rx_stream = app->m_rx_stream;
|
||||||
|
|
||||||
release_mutex((ValueMutex*)context, app);
|
release_mutex((ValueMutex*)context, app);
|
||||||
|
|
||||||
@@ -483,7 +481,7 @@ static int32_t uart_worker(void* context) {
|
|||||||
receivedString = furi_string_alloc();
|
receivedString = furi_string_alloc();
|
||||||
do {
|
do {
|
||||||
uint8_t data[64];
|
uint8_t data[64];
|
||||||
length = xStreamBufferReceive(rx_stream, data, 64, 25);
|
length = furi_stream_buffer_receive(rx_stream, data, 64, 25);
|
||||||
if(length > 0) {
|
if(length > 0) {
|
||||||
WIFI_APP_LOG_I("Received Data - length: %i", length);
|
WIFI_APP_LOG_I("Received Data - length: %i", length);
|
||||||
|
|
||||||
@@ -676,7 +674,7 @@ int32_t wifi_scanner_app(void* p) {
|
|||||||
|
|
||||||
WIFI_APP_LOG_I("Mutex created");
|
WIFI_APP_LOG_I("Mutex created");
|
||||||
|
|
||||||
app->m_rx_stream = xStreamBufferCreate(1 * 1024, 1);
|
app->m_rx_stream = furi_stream_buffer_alloc(1 * 1024, 1);
|
||||||
|
|
||||||
app->m_notification = furi_record_open("notification");
|
app->m_notification = furi_record_open("notification");
|
||||||
|
|
||||||
@@ -839,7 +837,7 @@ int32_t wifi_scanner_app(void* p) {
|
|||||||
|
|
||||||
furi_message_queue_free(event_queue);
|
furi_message_queue_free(event_queue);
|
||||||
|
|
||||||
vStreamBufferDelete(app->m_rx_stream);
|
furi_stream_buffer_free(app->m_rx_stream);
|
||||||
|
|
||||||
delete_mutex(&app_data_mutex);
|
delete_mutex(&app_data_mutex);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user