Merge branch 'fz-dev' into dev

This commit is contained in:
MX 2023-02-09 17:48:50 +03:00
commit b9351649ed
No known key found for this signature in database
GPG Key ID: 7CCC66B7DBDD1C83
49 changed files with 1537 additions and 134 deletions

View File

@ -70,7 +70,7 @@ void minunit_print_progress() {
}
void minunit_print_fail(const char* str) {
printf(FURI_LOG_CLR_E "%s\r\n" FURI_LOG_CLR_RESET, str);
printf(_FURI_LOG_CLR_E "%s\r\n" _FURI_LOG_CLR_RESET, str);
}
void unit_tests_cli(Cli* cli, FuriString* args, void* context) {

View File

@ -12,7 +12,7 @@ App(
],
provides=["subghz_start"],
icon="A_Sub1ghz_14",
stack_size=2 * 1024,
stack_size=3 * 1024,
order=10,
)

View File

@ -419,6 +419,6 @@ void subghz_scene_read_raw_on_exit(void* context) {
subghz->state_notifications = SubGhzNotificationStateIDLE;
notification_message(subghz->notifications, &sequence_reset_rgb);
// filter restoration
subghz_receiver_set_filter(subghz->txrx->receiver, SubGhzProtocolFlag_Decodable);
//filter restoration
subghz_receiver_set_filter(subghz->txrx->receiver, subghz->txrx->filter);
}

View File

@ -1,6 +1,7 @@
#include "../subghz_i.h"
#include "../views/receiver.h"
#include <dolphin/dolphin.h>
#include <lib/subghz/protocols/bin_raw.h>
#define TAG "SubGhzSceneReceiver"
@ -160,6 +161,11 @@ void subghz_scene_receiver_on_enter(void* context) {
}
subghz_view_receiver_set_idx_menu(subghz->subghz_receiver, subghz->txrx->idx_menu_chosen);
//to use a universal decoder, we are looking for a link to it
subghz->txrx->decoder_result = subghz_receiver_search_decoder_base_by_name(
subghz->txrx->receiver, SUBGHZ_PROTOCOL_BIN_RAW_NAME);
furi_assert(subghz->txrx->decoder_result);
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdReceiver);
}
@ -223,6 +229,13 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
subghz_hopper_update(subghz);
subghz_scene_receiver_update_statusbar(subghz);
}
//get RSSI
float rssi = furi_hal_subghz_get_rssi();
subghz_receiver_rssi(subghz->subghz_receiver, rssi);
subghz_protocol_decoder_bin_raw_data_input_rssi(
(SubGhzProtocolDecoderBinRAW*)subghz->txrx->decoder_result, rssi);
switch(subghz->state_notifications) {
case SubGhzNotificationStateRx:
notification_message(subghz->notifications, &sequence_blink_cyan_10);

View File

@ -5,6 +5,7 @@ enum SubGhzSettingIndex {
SubGhzSettingIndexFrequency,
SubGhzSettingIndexHopping,
SubGhzSettingIndexModulation,
SubGhzSettingIndexBinRAW,
SubGhzSettingIndexSound,
SubGhzSettingIndexLock,
SubGhzSettingIndexRAWThesholdRSSI,
@ -58,6 +59,15 @@ const uint32_t speaker_value[SPEAKER_COUNT] = {
SubGhzSpeakerStateShutdown,
SubGhzSpeakerStateEnable,
};
#define BIN_RAW_COUNT 2
const char* const bin_raw_text[BIN_RAW_COUNT] = {
"OFF",
"ON",
};
const uint32_t bin_raw_value[BIN_RAW_COUNT] = {
SubGhzProtocolFlag_Decodable,
SubGhzProtocolFlag_Decodable | SubGhzProtocolFlag_BinRAW,
};
uint8_t subghz_scene_receiver_config_next_frequency(const uint32_t value, void* context) {
furi_assert(context);
@ -190,6 +200,15 @@ static void subghz_scene_receiver_config_set_speaker(VariableItem* item) {
subghz->txrx->speaker_state = speaker_value[index];
}
static void subghz_scene_receiver_config_set_bin_raw(VariableItem* item) {
SubGhz* subghz = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, bin_raw_text[index]);
subghz->txrx->filter = bin_raw_value[index];
subghz_receiver_set_filter(subghz->txrx->receiver, subghz->txrx->filter);
}
static void subghz_scene_receiver_config_set_raw_threshold_rssi(VariableItem* item) {
SubGhz* subghz = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);
@ -262,6 +281,19 @@ void subghz_scene_receiver_config_on_enter(void* context) {
// Enable speaker, will send all incoming noises and signals to speaker so you can listen how your remote sounds like :)
item = variable_item_list_add(
subghz->variable_item_list,
if(scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneReadRAW) !=
SubGhzCustomEventManagerSet) {
item = variable_item_list_add(
subghz->variable_item_list,
"Bin_RAW:",
BIN_RAW_COUNT,
subghz_scene_receiver_config_set_bin_raw,
subghz);
value_index = value_index_uint32(subghz->txrx->filter, bin_raw_value, BIN_RAW_COUNT);
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, bin_raw_text[value_index]);
}
"Sound:",
SPEAKER_COUNT,
subghz_scene_receiver_config_set_speaker,

View File

@ -279,8 +279,8 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
subghz_environment_set_protocol_registry(
subghz->txrx->environment, (void*)&subghz_protocol_registry);
subghz->txrx->receiver = subghz_receiver_alloc_init(subghz->txrx->environment);
subghz_receiver_set_filter(subghz->txrx->receiver, SubGhzProtocolFlag_Decodable);
subghz->txrx->filter = SubGhzProtocolFlag_Decodable;
subghz_receiver_set_filter(subghz->txrx->receiver, subghz->txrx->filter);
subghz_worker_set_overrun_callback(
subghz->txrx->worker, (SubGhzWorkerOverrunCallback)subghz_receiver_reset);
@ -304,6 +304,8 @@ void subghz_free(SubGhz* subghz, bool alloc_for_tx_only) {
subghz->rpc_ctx = NULL;
}
subghz_speaker_off(subghz);
#if FURI_DEBUG
// Packet Test
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdTestPacket);

View File

@ -4,6 +4,7 @@
#include <furi.h>
#define SUBGHZ_HISTORY_MAX 50
#define SUBGHZ_HISTORY_FREE_HEAP 20480
#define TAG "SubGhzHistory"
typedef struct {
@ -120,8 +121,12 @@ FlipperFormat* subghz_history_get_raw_data(SubGhzHistory* instance, uint16_t idx
}
bool subghz_history_get_text_space_left(SubGhzHistory* instance, FuriString* output) {
furi_assert(instance);
if(memmgr_get_free_heap() < SUBGHZ_HISTORY_FREE_HEAP) {
if(output != NULL) furi_string_printf(output, " Free heap LOW");
return true;
}
if(instance->last_index_write == SUBGHZ_HISTORY_MAX) {
if(output != NULL) furi_string_printf(output, "Memory is FULL");
if(output != NULL) furi_string_printf(output, " Memory is FULL");
return true;
}
if(output != NULL)
@ -144,6 +149,7 @@ bool subghz_history_add_to_history(
furi_assert(instance);
furi_assert(context);
if(memmgr_get_free_heap() < SUBGHZ_HISTORY_FREE_HEAP) return false;
if(instance->last_index_write >= SUBGHZ_HISTORY_MAX) return false;
SubGhzProtocolDecoderBase* decoder_base = context;
@ -202,27 +208,31 @@ bool subghz_history_add_to_history(
}
uint8_t key_data[sizeof(uint64_t)] = {0};
if(!flipper_format_read_hex(item->flipper_string, "Key", key_data, sizeof(uint64_t))) {
FURI_LOG_E(TAG, "Missing Key");
break;
FURI_LOG_D(TAG, "No Key");
}
uint64_t data = 0;
for(uint8_t i = 0; i < sizeof(uint64_t); i++) {
data = (data << 8) | key_data[i];
}
if(!(uint32_t)(data >> 32)) {
furi_string_printf(
item->item_str,
"%s %lX",
furi_string_get_cstr(instance->tmp_string),
(uint32_t)(data & 0xFFFFFFFF));
if(data != 0) {
if(!(uint32_t)(data >> 32)) {
furi_string_printf(
item->item_str,
"%s %lX",
furi_string_get_cstr(instance->tmp_string),
(uint32_t)(data & 0xFFFFFFFF));
} else {
furi_string_printf(
item->item_str,
"%s %lX%08lX",
furi_string_get_cstr(instance->tmp_string),
(uint32_t)(data >> 32),
(uint32_t)(data & 0xFFFFFFFF));
}
} else {
furi_string_printf(
item->item_str,
"%s %lX%08lX",
furi_string_get_cstr(instance->tmp_string),
(uint32_t)(data >> 32),
(uint32_t)(data & 0xFFFFFFFF));
furi_string_printf(item->item_str, "%s", furi_string_get_cstr(instance->tmp_string));
}
} while(false);
furi_string_free(text);

View File

@ -62,6 +62,7 @@ struct SubGhzTxRx {
SubGhzEnvironment* environment;
SubGhzReceiver* receiver;
SubGhzTransmitter* transmitter;
SubGhzProtocolFlag filter;
SubGhzProtocolDecoderBase* decoder_result;
FlipperFormat* fff_data;
SecureData* secure_data;

View File

@ -12,6 +12,8 @@
#define MENU_ITEMS 4u
#define UNLOCK_CNT 3
#define SUBGHZ_RAW_TRESHOLD_MIN -90.0f
typedef struct {
FuriString* item_str;
uint8_t type;
@ -62,6 +64,7 @@ typedef struct {
uint16_t history_item;
SubGhzViewReceiverBarShow bar_show;
SubGhzViewReceiverMode mode;
uint8_t u_rssi;
} SubGhzViewReceiverModel;
void subghz_view_receiver_set_mode(
@ -71,6 +74,21 @@ void subghz_view_receiver_set_mode(
subghz_receiver->view, SubGhzViewReceiverModel * model, { model->mode = mode; }, true);
}
void subghz_receiver_rssi(SubGhzViewReceiver* instance, float rssi) {
furi_assert(instance);
with_view_model(
instance->view,
SubGhzViewReceiverModel * model,
{
if(rssi < SUBGHZ_RAW_TRESHOLD_MIN) {
model->u_rssi = 0;
} else {
model->u_rssi = (uint8_t)(rssi - SUBGHZ_RAW_TRESHOLD_MIN);
}
},
true);
}
void subghz_view_receiver_set_lock(SubGhzViewReceiver* subghz_receiver, SubGhzLock lock) {
furi_assert(subghz_receiver);
subghz_receiver->lock_count = 0;
@ -189,6 +207,16 @@ static void subghz_view_receiver_draw_frame(Canvas* canvas, uint16_t idx, bool s
canvas_draw_dot(canvas, scrollbar ? 121 : 126, (0 + idx * FRAME_HEIGHT) + 11);
}
static void subghz_view_rssi_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
for(uint8_t i = 1; i < model->u_rssi; i++) {
if(i % 5) {
canvas_draw_dot(canvas, 46 + i, 50);
canvas_draw_dot(canvas, 47 + i, 51);
canvas_draw_dot(canvas, 46 + i, 52);
}
}
}
void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
canvas_clear(canvas);
canvas_set_color(canvas, ColorBlack);
@ -251,6 +279,7 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
}
}
subghz_view_rssi_draw(canvas, model);
switch(model->bar_show) {
case SubGhzViewReceiverBarShowLock:
canvas_draw_icon(canvas, 64, 55, &I_Lock_7x8);

View File

@ -12,6 +12,8 @@ void subghz_view_receiver_set_mode(
SubGhzViewReceiver* subghz_receiver,
SubGhzViewReceiverMode mode);
void subghz_receiver_rssi(SubGhzViewReceiver* instance, float rssi);
void subghz_view_receiver_set_lock(SubGhzViewReceiver* subghz_receiver, SubGhzLock keyboard);
void subghz_view_receiver_set_callback(

View File

@ -84,7 +84,8 @@ void subghz_view_transmitter_draw(Canvas* canvas, SubGhzViewTransmitterModel* mo
canvas_clear(canvas);
canvas_set_color(canvas, ColorBlack);
canvas_set_font(canvas, FontSecondary);
elements_multiline_text(canvas, 0, 7, furi_string_get_cstr(model->key_str));
elements_multiline_text_aligned(
canvas, 0, 0, AlignLeft, AlignTop, furi_string_get_cstr(model->key_str));
canvas_draw_str(canvas, 78, 7, furi_string_get_cstr(model->frequency_str));
canvas_draw_str(canvas, 113, 7, furi_string_get_cstr(model->preset_str));

View File

@ -69,6 +69,19 @@ void picopass_scene_read_card_success_on_enter(void* context) {
furi_string_cat_printf(sio_str, "+SIO");
}
if(pacs->key) {
if(pacs->sio) {
furi_string_cat_printf(sio_str, " ");
}
furi_string_cat_printf(sio_str, "Key: ");
uint8_t key[PICOPASS_BLOCK_LEN];
memcpy(key, &pacs->key, PICOPASS_BLOCK_LEN);
for(uint8_t i = 0; i < PICOPASS_BLOCK_LEN; i++) {
furi_string_cat_printf(sio_str, "%02X", key[i]);
}
}
widget_add_button_element(
widget,
GuiButtonTypeLeft,

View File

@ -58,7 +58,7 @@ uint8_t* canvas_get_buffer(Canvas* canvas) {
return u8g2_GetBufferPtr(&canvas->fb);
}
size_t canvas_get_buffer_size(Canvas* canvas) {
size_t canvas_get_buffer_size(const Canvas* canvas) {
furi_assert(canvas);
return u8g2_GetBufferTileWidth(&canvas->fb) * u8g2_GetBufferTileHeight(&canvas->fb) * 8;
}
@ -76,17 +76,17 @@ void canvas_frame_set(
canvas->height = height;
}
uint8_t canvas_width(Canvas* canvas) {
uint8_t canvas_width(const Canvas* canvas) {
furi_assert(canvas);
return canvas->width;
}
uint8_t canvas_height(Canvas* canvas) {
uint8_t canvas_height(const Canvas* canvas) {
furi_assert(canvas);
return canvas->height;
}
uint8_t canvas_current_font_height(Canvas* canvas) {
uint8_t canvas_current_font_height(const Canvas* canvas) {
furi_assert(canvas);
uint8_t font_height = u8g2_GetMaxCharHeight(&canvas->fb);
@ -97,10 +97,10 @@ uint8_t canvas_current_font_height(Canvas* canvas) {
return font_height;
}
CanvasFontParameters* canvas_get_font_params(Canvas* canvas, Font font) {
const CanvasFontParameters* canvas_get_font_params(const Canvas* canvas, Font font) {
furi_assert(canvas);
furi_assert(font < FontTotalNumber);
return (CanvasFontParameters*)&canvas_font_params[font];
return &canvas_font_params[font];
}
void canvas_clear(Canvas* canvas) {

View File

@ -86,7 +86,7 @@ void canvas_commit(Canvas* canvas);
*
* @return width in pixels.
*/
uint8_t canvas_width(Canvas* canvas);
uint8_t canvas_width(const Canvas* canvas);
/** Get Canvas height
*
@ -94,7 +94,7 @@ uint8_t canvas_width(Canvas* canvas);
*
* @return height in pixels.
*/
uint8_t canvas_height(Canvas* canvas);
uint8_t canvas_height(const Canvas* canvas);
/** Get current font height
*
@ -102,7 +102,7 @@ uint8_t canvas_height(Canvas* canvas);
*
* @return height in pixels.
*/
uint8_t canvas_current_font_height(Canvas* canvas);
uint8_t canvas_current_font_height(const Canvas* canvas);
/** Get font parameters
*
@ -111,7 +111,7 @@ uint8_t canvas_current_font_height(Canvas* canvas);
*
* @return pointer to CanvasFontParameters structure
*/
CanvasFontParameters* canvas_get_font_params(Canvas* canvas, Font font);
const CanvasFontParameters* canvas_get_font_params(const Canvas* canvas, Font font);
/** Clear canvas
*

View File

@ -49,7 +49,7 @@ uint8_t* canvas_get_buffer(Canvas* canvas);
*
* @return size of canvas in bytes
*/
size_t canvas_get_buffer_size(Canvas* canvas);
size_t canvas_get_buffer_size(const Canvas* canvas);
/** Set drawing region relative to real screen buffer
*

View File

@ -639,7 +639,7 @@ void elements_text_box(
bool inversed_present = false;
Font current_font = FontSecondary;
Font prev_font = FontSecondary;
CanvasFontParameters* font_params = canvas_get_font_params(canvas, current_font);
const CanvasFontParameters* font_params = canvas_get_font_params(canvas, current_font);
// Fill line parameters
uint8_t line_leading_min = font_params->leading_min;

View File

@ -467,7 +467,7 @@ void gui_remove_framebuffer_callback(Gui* gui, GuiCanvasCommitCallback callback,
gui_unlock(gui);
}
size_t gui_get_framebuffer_size(Gui* gui) {
size_t gui_get_framebuffer_size(const Gui* gui) {
furi_assert(gui);
return canvas_get_buffer_size(gui->canvas);
}

View File

@ -94,7 +94,7 @@ void gui_remove_framebuffer_callback(Gui* gui, GuiCanvasCommitCallback callback,
* @param gui Gui instance
* @return size_t size of frame buffer in bytes
*/
size_t gui_get_framebuffer_size(Gui* gui);
size_t gui_get_framebuffer_size(const Gui* gui);
/** Set lockdown mode
*

View File

@ -29,7 +29,7 @@ void icon_animation_set_update_callback(
instance->callback_context = context;
}
const uint8_t* icon_animation_get_data(IconAnimation* instance) {
const uint8_t* icon_animation_get_data(const IconAnimation* instance) {
return instance->icon->frames[instance->frame];
}
@ -51,12 +51,12 @@ void icon_animation_timer_callback(void* context) {
}
}
uint8_t icon_animation_get_width(IconAnimation* instance) {
uint8_t icon_animation_get_width(const IconAnimation* instance) {
furi_assert(instance);
return instance->icon->width;
}
uint8_t icon_animation_get_height(IconAnimation* instance) {
uint8_t icon_animation_get_height(const IconAnimation* instance) {
furi_assert(instance);
return instance->icon->height;
}
@ -83,7 +83,7 @@ void icon_animation_stop(IconAnimation* instance) {
}
}
bool icon_animation_is_last_frame(IconAnimation* instance) {
bool icon_animation_is_last_frame(const IconAnimation* instance) {
furi_assert(instance);
return instance->icon->frame_count - instance->frame <= 1;
}

View File

@ -55,7 +55,7 @@ void icon_animation_set_update_callback(
*
* @return width in pixels
*/
uint8_t icon_animation_get_width(IconAnimation* instance);
uint8_t icon_animation_get_width(const IconAnimation* instance);
/** Get icon animation height
*
@ -63,7 +63,7 @@ uint8_t icon_animation_get_width(IconAnimation* instance);
*
* @return height in pixels
*/
uint8_t icon_animation_get_height(IconAnimation* instance);
uint8_t icon_animation_get_height(const IconAnimation* instance);
/** Start icon animation
*
@ -83,7 +83,7 @@ void icon_animation_stop(IconAnimation* instance);
*
* @return true if last frame
*/
bool icon_animation_is_last_frame(IconAnimation* instance);
bool icon_animation_is_last_frame(const IconAnimation* instance);
#ifdef __cplusplus
}

View File

@ -24,7 +24,7 @@ struct IconAnimation {
*
* @return pointer to current frame XBM bitmap data
*/
const uint8_t* icon_animation_get_data(IconAnimation* instance);
const uint8_t* icon_animation_get_data(const IconAnimation* instance);
/** Advance to next frame
*

View File

@ -74,7 +74,7 @@ static void widget_element_text_scroll_fill_lines(Canvas* canvas, WidgetElement*
}
// Set canvas font
canvas_set_font(canvas, line_tmp.font);
CanvasFontParameters* params = canvas_get_font_params(canvas, line_tmp.font);
const CanvasFontParameters* params = canvas_get_font_params(canvas, line_tmp.font);
total_height += params->height;
if(total_height > model->height) {
model->scroll_pos_total++;
@ -138,7 +138,7 @@ static void widget_element_text_scroll_draw(Canvas* canvas, WidgetElement* eleme
TextScrollLineArray_next(it), curr_line++) {
if(curr_line < model->scroll_pos_current) continue;
TextScrollLineArray* line = TextScrollLineArray_ref(it);
CanvasFontParameters* params = canvas_get_font_params(canvas, line->font);
const CanvasFontParameters* params = canvas_get_font_params(canvas, line->font);
if(y + params->descender > model->y + model->height) break;
canvas_set_font(canvas, line->font);
if(line->horizontal == AlignLeft) {

View File

@ -34,7 +34,7 @@ void scene_manager_set_scene_state(SceneManager* scene_manager, uint32_t scene_i
scene_manager->scene[scene_id].state = state;
}
uint32_t scene_manager_get_scene_state(SceneManager* scene_manager, uint32_t scene_id) {
uint32_t scene_manager_get_scene_state(const SceneManager* scene_manager, uint32_t scene_id) {
furi_assert(scene_manager);
furi_assert(scene_id < scene_manager->scene_handlers->scene_num);
@ -184,7 +184,7 @@ bool scene_manager_search_and_switch_to_previous_scene_one_of(
return scene_found;
}
bool scene_manager_has_previous_scene(SceneManager* scene_manager, uint32_t scene_id) {
bool scene_manager_has_previous_scene(const SceneManager* scene_manager, uint32_t scene_id) {
furi_assert(scene_manager);
bool scene_found = false;

View File

@ -63,7 +63,7 @@ void scene_manager_set_scene_state(SceneManager* scene_manager, uint32_t scene_i
*
* @return Scene state
*/
uint32_t scene_manager_get_scene_state(SceneManager* scene_manager, uint32_t scene_id);
uint32_t scene_manager_get_scene_state(const SceneManager* scene_manager, uint32_t scene_id);
/** Scene Manager allocation and configuration
*
@ -134,7 +134,7 @@ bool scene_manager_previous_scene(SceneManager* scene_manager);
*
* @return true if previous scene was found, false otherwise
*/
bool scene_manager_has_previous_scene(SceneManager* scene_manager, uint32_t scene_id);
bool scene_manager_has_previous_scene(const SceneManager* scene_manager, uint32_t scene_id);
/** Search and switch to previous Scene
*

View File

@ -89,7 +89,7 @@ void view_port_set_width(ViewPort* view_port, uint8_t width) {
view_port->width = width;
}
uint8_t view_port_get_width(ViewPort* view_port) {
uint8_t view_port_get_width(const ViewPort* view_port) {
furi_assert(view_port);
return view_port->width;
}
@ -99,7 +99,7 @@ void view_port_set_height(ViewPort* view_port, uint8_t height) {
view_port->height = height;
}
uint8_t view_port_get_height(ViewPort* view_port) {
uint8_t view_port_get_height(const ViewPort* view_port) {
furi_assert(view_port);
return view_port->height;
}
@ -112,7 +112,7 @@ void view_port_enabled_set(ViewPort* view_port, bool enabled) {
}
}
bool view_port_is_enabled(ViewPort* view_port) {
bool view_port_is_enabled(const ViewPort* view_port) {
furi_assert(view_port);
return view_port->is_enabled;
}

View File

@ -56,7 +56,7 @@ void view_port_free(ViewPort* view_port);
* @param width wanted width, 0 - auto.
*/
void view_port_set_width(ViewPort* view_port, uint8_t width);
uint8_t view_port_get_width(ViewPort* view_port);
uint8_t view_port_get_width(const ViewPort* view_port);
/** Set view_port height.
*
@ -66,7 +66,7 @@ uint8_t view_port_get_width(ViewPort* view_port);
* @param height wanted height, 0 - auto.
*/
void view_port_set_height(ViewPort* view_port, uint8_t height);
uint8_t view_port_get_height(ViewPort* view_port);
uint8_t view_port_get_height(const ViewPort* view_port);
/** Enable or disable view_port rendering.
*
@ -75,7 +75,7 @@ uint8_t view_port_get_height(ViewPort* view_port);
* @warning automatically dispatches update event
*/
void view_port_enabled_set(ViewPort* view_port, bool enabled);
bool view_port_is_enabled(ViewPort* view_port);
bool view_port_is_enabled(const ViewPort* view_port);
/** ViewPort event callbacks
*

View File

@ -262,7 +262,7 @@ void loader_unlock(Loader* instance) {
FURI_CRITICAL_EXIT();
}
bool loader_is_locked(Loader* instance) {
bool loader_is_locked(const Loader* instance) {
return instance->lock_count > 0;
}

View File

@ -43,7 +43,7 @@ bool loader_lock(Loader* instance);
void loader_unlock(Loader* instance);
/** Get loader lock status */
bool loader_is_locked(Loader* instance);
bool loader_is_locked(const Loader* instance);
/** Show primary loader */
void loader_show_menu();

View File

@ -81,7 +81,7 @@ void locale_format_time(
*
* @return The Locale DateFormat.
*/
LocaleDateFormat locale_get_date_format();
LocaleDateFormat locale_get_date_format(void);
/** Set Locale DateFormat
*

View File

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,13.1,,
Version,+,14.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@ -522,7 +522,7 @@ Function,-,bzero,void,"void*, size_t"
Function,-,calloc,void*,"size_t, size_t"
Function,+,canvas_clear,void,Canvas*
Function,+,canvas_commit,void,Canvas*
Function,+,canvas_current_font_height,uint8_t,Canvas*
Function,+,canvas_current_font_height,uint8_t,const Canvas*
Function,+,canvas_draw_bitmap,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, const uint8_t*"
Function,+,canvas_draw_box,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t"
Function,+,canvas_draw_circle,void,"Canvas*, uint8_t, uint8_t, uint8_t"
@ -539,9 +539,9 @@ Function,+,canvas_draw_str,void,"Canvas*, uint8_t, uint8_t, const char*"
Function,+,canvas_draw_str_aligned,void,"Canvas*, uint8_t, uint8_t, Align, Align, const char*"
Function,+,canvas_draw_triangle,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, CanvasDirection"
Function,+,canvas_draw_xbm,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, const uint8_t*"
Function,+,canvas_get_font_params,CanvasFontParameters*,"Canvas*, Font"
Function,+,canvas_get_font_params,const CanvasFontParameters*,"const Canvas*, Font"
Function,+,canvas_glyph_width,uint8_t,"Canvas*, char"
Function,+,canvas_height,uint8_t,Canvas*
Function,+,canvas_height,uint8_t,const Canvas*
Function,+,canvas_invert_color,void,Canvas*
Function,+,canvas_reset,void,Canvas*
Function,+,canvas_set_bitmap_mode,void,"Canvas*, _Bool"
@ -550,7 +550,7 @@ Function,+,canvas_set_custom_u8g2_font,void,"Canvas*, const uint8_t*"
Function,+,canvas_set_font,void,"Canvas*, Font"
Function,+,canvas_set_font_direction,void,"Canvas*, CanvasDirection"
Function,+,canvas_string_width,uint16_t,"Canvas*, const char*"
Function,+,canvas_width,uint8_t,Canvas*
Function,+,canvas_width,uint8_t,const Canvas*
Function,-,cfree,void,void*
Function,-,clearerr,void,FILE*
Function,-,clearerr_unlocked,void,FILE*
@ -1063,9 +1063,9 @@ Function,+,furi_hal_spi_bus_handle_deinit,void,FuriHalSpiBusHandle*
Function,+,furi_hal_spi_bus_handle_init,void,FuriHalSpiBusHandle*
Function,+,furi_hal_spi_bus_init,void,FuriHalSpiBus*
Function,+,furi_hal_spi_bus_rx,_Bool,"FuriHalSpiBusHandle*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_trx,_Bool,"FuriHalSpiBusHandle*, uint8_t*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_trx,_Bool,"FuriHalSpiBusHandle*, const uint8_t*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_trx_dma,_Bool,"FuriHalSpiBusHandle*, uint8_t*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_tx,_Bool,"FuriHalSpiBusHandle*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_tx,_Bool,"FuriHalSpiBusHandle*, const uint8_t*, size_t, uint32_t"
Function,-,furi_hal_spi_config_deinit_early,void,
Function,-,furi_hal_spi_config_init,void,
Function,-,furi_hal_spi_config_init_early,void,
@ -1123,6 +1123,7 @@ Function,+,furi_kernel_unlock,int32_t,
Function,+,furi_log_get_level,FuriLogLevel,
Function,-,furi_log_init,void,
Function,+,furi_log_print_format,void,"FuriLogLevel, const char*, const char*, ..."
Function,+,furi_log_print_raw_format,void,"FuriLogLevel, const char*, ..."
Function,+,furi_log_set_level,void,FuriLogLevel
Function,-,furi_log_set_puts,void,FuriLogPuts
Function,-,furi_log_set_timestamp,void,FuriLogTimestamp
@ -1287,7 +1288,7 @@ Function,+,gui_add_framebuffer_callback,void,"Gui*, GuiCanvasCommitCallback, voi
Function,+,gui_add_view_port,void,"Gui*, ViewPort*, GuiLayer"
Function,+,gui_direct_draw_acquire,Canvas*,Gui*
Function,+,gui_direct_draw_release,void,Gui*
Function,+,gui_get_framebuffer_size,size_t,Gui*
Function,+,gui_get_framebuffer_size,size_t,const Gui*
Function,+,gui_remove_framebuffer_callback,void,"Gui*, GuiCanvasCommitCallback, void*"
Function,+,gui_remove_view_port,void,"Gui*, ViewPort*"
Function,+,gui_set_lockdown,void,"Gui*, _Bool"
@ -1301,9 +1302,9 @@ Function,+,hmac_sha256_init,void,"hmac_sha256_context*, const uint8_t*"
Function,+,hmac_sha256_update,void,"const hmac_sha256_context*, const uint8_t*, unsigned"
Function,+,icon_animation_alloc,IconAnimation*,const Icon*
Function,+,icon_animation_free,void,IconAnimation*
Function,+,icon_animation_get_height,uint8_t,IconAnimation*
Function,+,icon_animation_get_width,uint8_t,IconAnimation*
Function,+,icon_animation_is_last_frame,_Bool,IconAnimation*
Function,+,icon_animation_get_height,uint8_t,const IconAnimation*
Function,+,icon_animation_get_width,uint8_t,const IconAnimation*
Function,+,icon_animation_is_last_frame,_Bool,const IconAnimation*
Function,+,icon_animation_set_update_callback,void,"IconAnimation*, IconAnimationCallback, void*"
Function,+,icon_animation_start,void,IconAnimation*
Function,+,icon_animation_stop,void,IconAnimation*
@ -1352,7 +1353,7 @@ Function,-,ldiv,ldiv_t,"long, long"
Function,-,llabs,long long,long long
Function,-,lldiv,lldiv_t,"long long, long long"
Function,+,loader_get_pubsub,FuriPubSub*,Loader*
Function,+,loader_is_locked,_Bool,Loader*
Function,+,loader_is_locked,_Bool,const Loader*
Function,+,loader_lock,_Bool,Loader*
Function,+,loader_show_menu,void,
Function,+,loader_start,LoaderStatus,"Loader*, const char*, const char*"
@ -1570,11 +1571,11 @@ Function,+,saved_struct_save,_Bool,"const char*, void*, size_t, uint8_t, uint8_t
Function,-,scanf,int,"const char*, ..."
Function,+,scene_manager_alloc,SceneManager*,"const SceneManagerHandlers*, void*"
Function,+,scene_manager_free,void,SceneManager*
Function,+,scene_manager_get_scene_state,uint32_t,"SceneManager*, uint32_t"
Function,+,scene_manager_get_scene_state,uint32_t,"const SceneManager*, uint32_t"
Function,+,scene_manager_handle_back_event,_Bool,SceneManager*
Function,+,scene_manager_handle_custom_event,_Bool,"SceneManager*, uint32_t"
Function,+,scene_manager_handle_tick_event,void,SceneManager*
Function,+,scene_manager_has_previous_scene,_Bool,"SceneManager*, uint32_t"
Function,+,scene_manager_has_previous_scene,_Bool,"const SceneManager*, uint32_t"
Function,+,scene_manager_next_scene,void,"SceneManager*, uint32_t"
Function,+,scene_manager_previous_scene,_Bool,SceneManager*
Function,+,scene_manager_search_and_switch_to_another_scene,_Bool,"SceneManager*, uint32_t"
@ -1946,11 +1947,11 @@ Function,+,view_port_alloc,ViewPort*,
Function,+,view_port_draw_callback_set,void,"ViewPort*, ViewPortDrawCallback, void*"
Function,+,view_port_enabled_set,void,"ViewPort*, _Bool"
Function,+,view_port_free,void,ViewPort*
Function,+,view_port_get_height,uint8_t,ViewPort*
Function,+,view_port_get_height,uint8_t,const ViewPort*
Function,+,view_port_get_orientation,ViewPortOrientation,const ViewPort*
Function,+,view_port_get_width,uint8_t,ViewPort*
Function,+,view_port_get_width,uint8_t,const ViewPort*
Function,+,view_port_input_callback_set,void,"ViewPort*, ViewPortInputCallback, void*"
Function,+,view_port_is_enabled,_Bool,ViewPort*
Function,+,view_port_is_enabled,_Bool,const ViewPort*
Function,+,view_port_set_height,void,"ViewPort*, uint8_t"
Function,+,view_port_set_orientation,void,"ViewPort*, ViewPortOrientation"
Function,+,view_port_set_width,void,"ViewPort*, uint8_t"

1 entry status name type params
2 Version + 13.1 14.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
522 Function - calloc void* size_t, size_t
523 Function + canvas_clear void Canvas*
524 Function + canvas_commit void Canvas*
525 Function + canvas_current_font_height uint8_t Canvas* const Canvas*
526 Function + canvas_draw_bitmap void Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, const uint8_t*
527 Function + canvas_draw_box void Canvas*, uint8_t, uint8_t, uint8_t, uint8_t
528 Function + canvas_draw_circle void Canvas*, uint8_t, uint8_t, uint8_t
539 Function + canvas_draw_str_aligned void Canvas*, uint8_t, uint8_t, Align, Align, const char*
540 Function + canvas_draw_triangle void Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, CanvasDirection
541 Function + canvas_draw_xbm void Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, const uint8_t*
542 Function + canvas_get_font_params CanvasFontParameters* const CanvasFontParameters* Canvas*, Font const Canvas*, Font
543 Function + canvas_glyph_width uint8_t Canvas*, char
544 Function + canvas_height uint8_t Canvas* const Canvas*
545 Function + canvas_invert_color void Canvas*
546 Function + canvas_reset void Canvas*
547 Function + canvas_set_bitmap_mode void Canvas*, _Bool
550 Function + canvas_set_font void Canvas*, Font
551 Function + canvas_set_font_direction void Canvas*, CanvasDirection
552 Function + canvas_string_width uint16_t Canvas*, const char*
553 Function + canvas_width uint8_t Canvas* const Canvas*
554 Function - cfree void void*
555 Function - clearerr void FILE*
556 Function - clearerr_unlocked void FILE*
1063 Function + furi_hal_spi_bus_handle_init void FuriHalSpiBusHandle*
1064 Function + furi_hal_spi_bus_init void FuriHalSpiBus*
1065 Function + furi_hal_spi_bus_rx _Bool FuriHalSpiBusHandle*, uint8_t*, size_t, uint32_t
1066 Function + furi_hal_spi_bus_trx _Bool FuriHalSpiBusHandle*, uint8_t*, uint8_t*, size_t, uint32_t FuriHalSpiBusHandle*, const uint8_t*, uint8_t*, size_t, uint32_t
1067 Function + furi_hal_spi_bus_trx_dma _Bool FuriHalSpiBusHandle*, uint8_t*, uint8_t*, size_t, uint32_t
1068 Function + furi_hal_spi_bus_tx _Bool FuriHalSpiBusHandle*, uint8_t*, size_t, uint32_t FuriHalSpiBusHandle*, const uint8_t*, size_t, uint32_t
1069 Function - furi_hal_spi_config_deinit_early void
1070 Function - furi_hal_spi_config_init void
1071 Function - furi_hal_spi_config_init_early void
1123 Function + furi_log_get_level FuriLogLevel
1124 Function - furi_log_init void
1125 Function + furi_log_print_format void FuriLogLevel, const char*, const char*, ...
1126 Function + furi_log_print_raw_format void FuriLogLevel, const char*, ...
1127 Function + furi_log_set_level void FuriLogLevel
1128 Function - furi_log_set_puts void FuriLogPuts
1129 Function - furi_log_set_timestamp void FuriLogTimestamp
1288 Function + gui_add_view_port void Gui*, ViewPort*, GuiLayer
1289 Function + gui_direct_draw_acquire Canvas* Gui*
1290 Function + gui_direct_draw_release void Gui*
1291 Function + gui_get_framebuffer_size size_t Gui* const Gui*
1292 Function + gui_remove_framebuffer_callback void Gui*, GuiCanvasCommitCallback, void*
1293 Function + gui_remove_view_port void Gui*, ViewPort*
1294 Function + gui_set_lockdown void Gui*, _Bool
1302 Function + hmac_sha256_update void const hmac_sha256_context*, const uint8_t*, unsigned
1303 Function + icon_animation_alloc IconAnimation* const Icon*
1304 Function + icon_animation_free void IconAnimation*
1305 Function + icon_animation_get_height uint8_t IconAnimation* const IconAnimation*
1306 Function + icon_animation_get_width uint8_t IconAnimation* const IconAnimation*
1307 Function + icon_animation_is_last_frame _Bool IconAnimation* const IconAnimation*
1308 Function + icon_animation_set_update_callback void IconAnimation*, IconAnimationCallback, void*
1309 Function + icon_animation_start void IconAnimation*
1310 Function + icon_animation_stop void IconAnimation*
1353 Function - llabs long long long long
1354 Function - lldiv lldiv_t long long, long long
1355 Function + loader_get_pubsub FuriPubSub* Loader*
1356 Function + loader_is_locked _Bool Loader* const Loader*
1357 Function + loader_lock _Bool Loader*
1358 Function + loader_show_menu void
1359 Function + loader_start LoaderStatus Loader*, const char*, const char*
1571 Function - scanf int const char*, ...
1572 Function + scene_manager_alloc SceneManager* const SceneManagerHandlers*, void*
1573 Function + scene_manager_free void SceneManager*
1574 Function + scene_manager_get_scene_state uint32_t SceneManager*, uint32_t const SceneManager*, uint32_t
1575 Function + scene_manager_handle_back_event _Bool SceneManager*
1576 Function + scene_manager_handle_custom_event _Bool SceneManager*, uint32_t
1577 Function + scene_manager_handle_tick_event void SceneManager*
1578 Function + scene_manager_has_previous_scene _Bool SceneManager*, uint32_t const SceneManager*, uint32_t
1579 Function + scene_manager_next_scene void SceneManager*, uint32_t
1580 Function + scene_manager_previous_scene _Bool SceneManager*
1581 Function + scene_manager_search_and_switch_to_another_scene _Bool SceneManager*, uint32_t
1947 Function + view_port_draw_callback_set void ViewPort*, ViewPortDrawCallback, void*
1948 Function + view_port_enabled_set void ViewPort*, _Bool
1949 Function + view_port_free void ViewPort*
1950 Function + view_port_get_height uint8_t ViewPort* const ViewPort*
1951 Function + view_port_get_orientation ViewPortOrientation const ViewPort*
1952 Function + view_port_get_width uint8_t ViewPort* const ViewPort*
1953 Function + view_port_input_callback_set void ViewPort*, ViewPortInputCallback, void*
1954 Function + view_port_is_enabled _Bool ViewPort* const ViewPort*
1955 Function + view_port_set_height void ViewPort*, uint8_t
1956 Function + view_port_set_orientation void ViewPort*, ViewPortOrientation
1957 Function + view_port_set_width void ViewPort*, uint8_t

View File

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,13.1,,
Version,+,14.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@ -615,7 +615,7 @@ Function,-,bzero,void,"void*, size_t"
Function,-,calloc,void*,"size_t, size_t"
Function,+,canvas_clear,void,Canvas*
Function,+,canvas_commit,void,Canvas*
Function,+,canvas_current_font_height,uint8_t,Canvas*
Function,+,canvas_current_font_height,uint8_t,const Canvas*
Function,+,canvas_draw_bitmap,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, const uint8_t*"
Function,+,canvas_draw_box,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t"
Function,+,canvas_draw_circle,void,"Canvas*, uint8_t, uint8_t, uint8_t"
@ -651,7 +651,7 @@ Function,+,canvas_set_font,void,"Canvas*, Font"
Function,+,canvas_set_font_direction,void,"Canvas*, CanvasDirection"
Function,-,canvas_set_orientation,void,"Canvas*, CanvasOrientation"
Function,+,canvas_string_width,uint16_t,"Canvas*, const char*"
Function,+,canvas_width,uint8_t,Canvas*
Function,+,canvas_width,uint8_t,const Canvas*
Function,-,cbrt,double,double
Function,-,cbrtf,float,float
Function,-,cbrtl,long double,long double
@ -1334,9 +1334,9 @@ Function,+,furi_hal_spi_bus_handle_deinit,void,FuriHalSpiBusHandle*
Function,+,furi_hal_spi_bus_handle_init,void,FuriHalSpiBusHandle*
Function,+,furi_hal_spi_bus_init,void,FuriHalSpiBus*
Function,+,furi_hal_spi_bus_rx,_Bool,"FuriHalSpiBusHandle*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_trx,_Bool,"FuriHalSpiBusHandle*, uint8_t*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_trx,_Bool,"FuriHalSpiBusHandle*, const uint8_t*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_trx_dma,_Bool,"FuriHalSpiBusHandle*, uint8_t*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_tx,_Bool,"FuriHalSpiBusHandle*, uint8_t*, size_t, uint32_t"
Function,+,furi_hal_spi_bus_tx,_Bool,"FuriHalSpiBusHandle*, const uint8_t*, size_t, uint32_t"
Function,-,furi_hal_spi_config_deinit_early,void,
Function,-,furi_hal_spi_config_init,void,
Function,-,furi_hal_spi_config_init_early,void,
@ -1433,6 +1433,7 @@ Function,+,furi_kernel_unlock,int32_t,
Function,+,furi_log_get_level,FuriLogLevel,
Function,-,furi_log_init,void,
Function,+,furi_log_print_format,void,"FuriLogLevel, const char*, const char*, ..."
Function,+,furi_log_print_raw_format,void,"FuriLogLevel, const char*, ..."
Function,+,furi_log_set_level,void,FuriLogLevel
Function,-,furi_log_set_puts,void,FuriLogPuts
Function,-,furi_log_set_timestamp,void,FuriLogTimestamp
@ -1601,7 +1602,7 @@ Function,+,gui_add_framebuffer_callback,void,"Gui*, GuiCanvasCommitCallback, voi
Function,+,gui_add_view_port,void,"Gui*, ViewPort*, GuiLayer"
Function,+,gui_direct_draw_acquire,Canvas*,Gui*
Function,+,gui_direct_draw_release,void,Gui*
Function,+,gui_get_framebuffer_size,size_t,Gui*
Function,+,gui_get_framebuffer_size,size_t,const Gui*
Function,+,gui_remove_framebuffer_callback,void,"Gui*, GuiCanvasCommitCallback, void*"
Function,+,gui_remove_view_port,void,"Gui*, ViewPort*"
Function,+,gui_set_lockdown,void,"Gui*, _Bool"
@ -1644,9 +1645,9 @@ Function,+,ibutton_worker_write_set_callback,void,"iButtonWorker*, iButtonWorker
Function,+,ibutton_worker_write_start,void,"iButtonWorker*, iButtonKey*"
Function,+,icon_animation_alloc,IconAnimation*,const Icon*
Function,+,icon_animation_free,void,IconAnimation*
Function,+,icon_animation_get_height,uint8_t,IconAnimation*
Function,+,icon_animation_get_width,uint8_t,IconAnimation*
Function,+,icon_animation_is_last_frame,_Bool,IconAnimation*
Function,+,icon_animation_get_height,uint8_t,const IconAnimation*
Function,+,icon_animation_get_width,uint8_t,const IconAnimation*
Function,+,icon_animation_is_last_frame,_Bool,const IconAnimation*
Function,+,icon_animation_set_update_callback,void,"IconAnimation*, IconAnimationCallback, void*"
Function,+,icon_animation_start,void,IconAnimation*
Function,+,icon_animation_stop,void,IconAnimation*
@ -1788,7 +1789,7 @@ Function,-,llround,long long int,double
Function,-,llroundf,long long int,float
Function,-,llroundl,long long int,long double
Function,+,loader_get_pubsub,FuriPubSub*,Loader*
Function,+,loader_is_locked,_Bool,Loader*
Function,+,loader_is_locked,_Bool,const Loader*
Function,+,loader_lock,_Bool,Loader*
Function,+,loader_show_menu,void,
Function,+,loader_start,LoaderStatus,"Loader*, const char*, const char*"
@ -2397,11 +2398,11 @@ Function,-,scalbnl,long double,"long double, int"
Function,-,scanf,int,"const char*, ..."
Function,+,scene_manager_alloc,SceneManager*,"const SceneManagerHandlers*, void*"
Function,+,scene_manager_free,void,SceneManager*
Function,+,scene_manager_get_scene_state,uint32_t,"SceneManager*, uint32_t"
Function,+,scene_manager_get_scene_state,uint32_t,"const SceneManager*, uint32_t"
Function,+,scene_manager_handle_back_event,_Bool,SceneManager*
Function,+,scene_manager_handle_custom_event,_Bool,"SceneManager*, uint32_t"
Function,+,scene_manager_handle_tick_event,void,SceneManager*
Function,+,scene_manager_has_previous_scene,_Bool,"SceneManager*, uint32_t"
Function,+,scene_manager_has_previous_scene,_Bool,"const SceneManager*, uint32_t"
Function,+,scene_manager_next_scene,void,"SceneManager*, uint32_t"
Function,+,scene_manager_previous_scene,_Bool,SceneManager*
Function,+,scene_manager_search_and_switch_to_another_scene,_Bool,"SceneManager*, uint32_t"
@ -2627,7 +2628,7 @@ Function,+,subghz_protocol_blocks_crc8le,uint8_t,"const uint8_t[], size_t, uint8
Function,+,subghz_protocol_blocks_get_bit_array,_Bool,"uint8_t[], size_t"
Function,+,subghz_protocol_blocks_get_hash_data,uint8_t,"SubGhzBlockDecoder*, size_t"
Function,+,subghz_protocol_blocks_get_parity,uint8_t,"uint64_t, uint8_t"
Function,+,subghz_protocol_blocks_get_upload,size_t,"uint8_t[], size_t, LevelDuration*, size_t, uint32_t"
Function,+,subghz_protocol_blocks_get_upload_from_bit_array,size_t,"uint8_t[], size_t, LevelDuration*, size_t, uint32_t, SubGhzProtocolBlockAlignBit"
Function,+,subghz_protocol_blocks_lfsr_digest16,uint16_t,"const uint8_t[], size_t, uint16_t, uint16_t"
Function,+,subghz_protocol_blocks_lfsr_digest8,uint8_t,"const uint8_t[], size_t, uint8_t, uint8_t"
Function,+,subghz_protocol_blocks_lfsr_digest8_reflect,uint8_t,"const uint8_t[], size_t, uint8_t, uint8_t"
@ -4489,11 +4490,11 @@ Function,+,view_port_alloc,ViewPort*,
Function,+,view_port_draw_callback_set,void,"ViewPort*, ViewPortDrawCallback, void*"
Function,+,view_port_enabled_set,void,"ViewPort*, _Bool"
Function,+,view_port_free,void,ViewPort*
Function,+,view_port_get_height,uint8_t,ViewPort*
Function,+,view_port_get_height,uint8_t,const ViewPort*
Function,+,view_port_get_orientation,ViewPortOrientation,const ViewPort*
Function,+,view_port_get_width,uint8_t,ViewPort*
Function,+,view_port_get_width,uint8_t,const ViewPort*
Function,+,view_port_input_callback_set,void,"ViewPort*, ViewPortInputCallback, void*"
Function,+,view_port_is_enabled,_Bool,ViewPort*
Function,+,view_port_is_enabled,_Bool,const ViewPort*
Function,+,view_port_set_height,void,"ViewPort*, uint8_t"
Function,+,view_port_set_orientation,void,"ViewPort*, ViewPortOrientation"
Function,+,view_port_set_width,void,"ViewPort*, uint8_t"

1 entry status name type params
2 Version + 13.1 14.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
615 Function - calloc void* size_t, size_t
616 Function + canvas_clear void Canvas*
617 Function + canvas_commit void Canvas*
618 Function + canvas_current_font_height uint8_t Canvas* const Canvas*
619 Function + canvas_draw_bitmap void Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, const uint8_t*
620 Function + canvas_draw_box void Canvas*, uint8_t, uint8_t, uint8_t, uint8_t
621 Function + canvas_draw_circle void Canvas*, uint8_t, uint8_t, uint8_t
651 Function + canvas_set_font_direction void Canvas*, CanvasDirection
652 Function - canvas_set_orientation void Canvas*, CanvasOrientation
653 Function + canvas_string_width uint16_t Canvas*, const char*
654 Function + canvas_width uint8_t Canvas* const Canvas*
655 Function - cbrt double double
656 Function - cbrtf float float
657 Function - cbrtl long double long double
1334 Function + furi_hal_spi_bus_handle_init void FuriHalSpiBusHandle*
1335 Function + furi_hal_spi_bus_init void FuriHalSpiBus*
1336 Function + furi_hal_spi_bus_rx _Bool FuriHalSpiBusHandle*, uint8_t*, size_t, uint32_t
1337 Function + furi_hal_spi_bus_trx _Bool FuriHalSpiBusHandle*, uint8_t*, uint8_t*, size_t, uint32_t FuriHalSpiBusHandle*, const uint8_t*, uint8_t*, size_t, uint32_t
1338 Function + furi_hal_spi_bus_trx_dma _Bool FuriHalSpiBusHandle*, uint8_t*, uint8_t*, size_t, uint32_t
1339 Function + furi_hal_spi_bus_tx _Bool FuriHalSpiBusHandle*, uint8_t*, size_t, uint32_t FuriHalSpiBusHandle*, const uint8_t*, size_t, uint32_t
1340 Function - furi_hal_spi_config_deinit_early void
1341 Function - furi_hal_spi_config_init void
1342 Function - furi_hal_spi_config_init_early void
1433 Function + furi_log_get_level FuriLogLevel
1434 Function - furi_log_init void
1435 Function + furi_log_print_format void FuriLogLevel, const char*, const char*, ...
1436 Function + furi_log_print_raw_format void FuriLogLevel, const char*, ...
1437 Function + furi_log_set_level void FuriLogLevel
1438 Function - furi_log_set_puts void FuriLogPuts
1439 Function - furi_log_set_timestamp void FuriLogTimestamp
1602 Function + gui_add_view_port void Gui*, ViewPort*, GuiLayer
1603 Function + gui_direct_draw_acquire Canvas* Gui*
1604 Function + gui_direct_draw_release void Gui*
1605 Function + gui_get_framebuffer_size size_t Gui* const Gui*
1606 Function + gui_remove_framebuffer_callback void Gui*, GuiCanvasCommitCallback, void*
1607 Function + gui_remove_view_port void Gui*, ViewPort*
1608 Function + gui_set_lockdown void Gui*, _Bool
1645 Function + ibutton_worker_write_start void iButtonWorker*, iButtonKey*
1646 Function + icon_animation_alloc IconAnimation* const Icon*
1647 Function + icon_animation_free void IconAnimation*
1648 Function + icon_animation_get_height uint8_t IconAnimation* const IconAnimation*
1649 Function + icon_animation_get_width uint8_t IconAnimation* const IconAnimation*
1650 Function + icon_animation_is_last_frame _Bool IconAnimation* const IconAnimation*
1651 Function + icon_animation_set_update_callback void IconAnimation*, IconAnimationCallback, void*
1652 Function + icon_animation_start void IconAnimation*
1653 Function + icon_animation_stop void IconAnimation*
1789 Function - llroundf long long int float
1790 Function - llroundl long long int long double
1791 Function + loader_get_pubsub FuriPubSub* Loader*
1792 Function + loader_is_locked _Bool Loader* const Loader*
1793 Function + loader_lock _Bool Loader*
1794 Function + loader_show_menu void
1795 Function + loader_start LoaderStatus Loader*, const char*, const char*
2398 Function - scanf int const char*, ...
2399 Function + scene_manager_alloc SceneManager* const SceneManagerHandlers*, void*
2400 Function + scene_manager_free void SceneManager*
2401 Function + scene_manager_get_scene_state uint32_t SceneManager*, uint32_t const SceneManager*, uint32_t
2402 Function + scene_manager_handle_back_event _Bool SceneManager*
2403 Function + scene_manager_handle_custom_event _Bool SceneManager*, uint32_t
2404 Function + scene_manager_handle_tick_event void SceneManager*
2405 Function + scene_manager_has_previous_scene _Bool SceneManager*, uint32_t const SceneManager*, uint32_t
2406 Function + scene_manager_next_scene void SceneManager*, uint32_t
2407 Function + scene_manager_previous_scene _Bool SceneManager*
2408 Function + scene_manager_search_and_switch_to_another_scene _Bool SceneManager*, uint32_t
2628 Function + subghz_protocol_blocks_get_bit_array _Bool uint8_t[], size_t
2629 Function + subghz_protocol_blocks_get_hash_data uint8_t SubGhzBlockDecoder*, size_t
2630 Function + subghz_protocol_blocks_get_parity uint8_t uint64_t, uint8_t
2631 Function + subghz_protocol_blocks_get_upload subghz_protocol_blocks_get_upload_from_bit_array size_t uint8_t[], size_t, LevelDuration*, size_t, uint32_t uint8_t[], size_t, LevelDuration*, size_t, uint32_t, SubGhzProtocolBlockAlignBit
2632 Function + subghz_protocol_blocks_lfsr_digest16 uint16_t const uint8_t[], size_t, uint16_t, uint16_t
2633 Function + subghz_protocol_blocks_lfsr_digest8 uint8_t const uint8_t[], size_t, uint8_t, uint8_t
2634 Function + subghz_protocol_blocks_lfsr_digest8_reflect uint8_t const uint8_t[], size_t, uint8_t, uint8_t
4490 Function + view_port_draw_callback_set void ViewPort*, ViewPortDrawCallback, void*
4491 Function + view_port_enabled_set void ViewPort*, _Bool
4492 Function + view_port_free void ViewPort*
4493 Function + view_port_get_height uint8_t ViewPort* const ViewPort*
4494 Function + view_port_get_orientation ViewPortOrientation const ViewPort*
4495 Function + view_port_get_width uint8_t ViewPort* const ViewPort*
4496 Function + view_port_input_callback_set void ViewPort*, ViewPortInputCallback, void*
4497 Function + view_port_is_enabled _Bool ViewPort* const ViewPort*
4498 Function + view_port_set_height void ViewPort*, uint8_t
4499 Function + view_port_set_orientation void ViewPort*, ViewPortOrientation
4500 Function + view_port_set_width void ViewPort*, uint8_t

View File

@ -103,7 +103,7 @@ bool furi_hal_spi_bus_rx(
bool furi_hal_spi_bus_tx(
FuriHalSpiBusHandle* handle,
uint8_t* buffer,
const uint8_t* buffer,
size_t size,
uint32_t timeout) {
furi_assert(handle);
@ -128,7 +128,7 @@ bool furi_hal_spi_bus_tx(
bool furi_hal_spi_bus_trx(
FuriHalSpiBusHandle* handle,
uint8_t* tx_buffer,
const uint8_t* tx_buffer,
uint8_t* rx_buffer,
size_t size,
uint32_t timeout) {

View File

@ -85,7 +85,7 @@ bool furi_hal_spi_bus_rx(
*/
bool furi_hal_spi_bus_tx(
FuriHalSpiBusHandle* handle,
uint8_t* buffer,
const uint8_t* buffer,
size_t size,
uint32_t timeout);
@ -101,7 +101,7 @@ bool furi_hal_spi_bus_tx(
*/
bool furi_hal_spi_bus_trx(
FuriHalSpiBusHandle* handle,
uint8_t* tx_buffer,
const uint8_t* tx_buffer,
uint8_t* rx_buffer,
size_t size,
uint32_t timeout);

View File

@ -28,27 +28,27 @@ void furi_log_print_format(FuriLogLevel level, const char* tag, const char* form
FuriString* string;
string = furi_string_alloc();
const char* color = FURI_LOG_CLR_RESET;
const char* color = _FURI_LOG_CLR_RESET;
const char* log_letter = " ";
switch(level) {
case FuriLogLevelError:
color = FURI_LOG_CLR_E;
color = _FURI_LOG_CLR_E;
log_letter = "E";
break;
case FuriLogLevelWarn:
color = FURI_LOG_CLR_W;
color = _FURI_LOG_CLR_W;
log_letter = "W";
break;
case FuriLogLevelInfo:
color = FURI_LOG_CLR_I;
color = _FURI_LOG_CLR_I;
log_letter = "I";
break;
case FuriLogLevelDebug:
color = FURI_LOG_CLR_D;
color = _FURI_LOG_CLR_D;
log_letter = "D";
break;
case FuriLogLevelTrace:
color = FURI_LOG_CLR_T;
color = _FURI_LOG_CLR_T;
log_letter = "T";
break;
default:
@ -58,7 +58,7 @@ void furi_log_print_format(FuriLogLevel level, const char* tag, const char* form
// Timestamp
furi_string_printf(
string,
"%lu %s[%s][%s] " FURI_LOG_CLR_RESET,
"%lu %s[%s][%s] " _FURI_LOG_CLR_RESET,
furi_log.timestamp(),
color,
log_letter,
@ -80,6 +80,23 @@ void furi_log_print_format(FuriLogLevel level, const char* tag, const char* form
}
}
void furi_log_print_raw_format(FuriLogLevel level, const char* format, ...) {
if(level <= furi_log.log_level &&
furi_mutex_acquire(furi_log.mutex, FuriWaitForever) == FuriStatusOk) {
FuriString* string;
string = furi_string_alloc();
va_list args;
va_start(args, format);
furi_string_vprintf(string, format, args);
va_end(args);
furi_log.puts(furi_string_get_cstr(string));
furi_string_free(string);
furi_mutex_release(furi_log.mutex);
}
}
void furi_log_set_level(FuriLogLevel level) {
if(level == FuriLogLevelDefault) {
level = FURI_LOG_LEVEL_DEFAULT;

View File

@ -22,21 +22,21 @@ typedef enum {
FuriLogLevelTrace = 6,
} FuriLogLevel;
#define FURI_LOG_CLR(clr) "\033[0;" clr "m"
#define FURI_LOG_CLR_RESET "\033[0m"
#define _FURI_LOG_CLR(clr) "\033[0;" clr "m"
#define _FURI_LOG_CLR_RESET "\033[0m"
#define FURI_LOG_CLR_BLACK "30"
#define FURI_LOG_CLR_RED "31"
#define FURI_LOG_CLR_GREEN "32"
#define FURI_LOG_CLR_BROWN "33"
#define FURI_LOG_CLR_BLUE "34"
#define FURI_LOG_CLR_PURPLE "35"
#define _FURI_LOG_CLR_BLACK "30"
#define _FURI_LOG_CLR_RED "31"
#define _FURI_LOG_CLR_GREEN "32"
#define _FURI_LOG_CLR_BROWN "33"
#define _FURI_LOG_CLR_BLUE "34"
#define _FURI_LOG_CLR_PURPLE "35"
#define FURI_LOG_CLR_E FURI_LOG_CLR(FURI_LOG_CLR_RED)
#define FURI_LOG_CLR_W FURI_LOG_CLR(FURI_LOG_CLR_BROWN)
#define FURI_LOG_CLR_I FURI_LOG_CLR(FURI_LOG_CLR_GREEN)
#define FURI_LOG_CLR_D FURI_LOG_CLR(FURI_LOG_CLR_BLUE)
#define FURI_LOG_CLR_T FURI_LOG_CLR(FURI_LOG_CLR_PURPLE)
#define _FURI_LOG_CLR_E _FURI_LOG_CLR(_FURI_LOG_CLR_RED)
#define _FURI_LOG_CLR_W _FURI_LOG_CLR(_FURI_LOG_CLR_BROWN)
#define _FURI_LOG_CLR_I _FURI_LOG_CLR(_FURI_LOG_CLR_GREEN)
#define _FURI_LOG_CLR_D _FURI_LOG_CLR(_FURI_LOG_CLR_BLUE)
#define _FURI_LOG_CLR_T _FURI_LOG_CLR(_FURI_LOG_CLR_PURPLE)
typedef void (*FuriLogPuts)(const char* data);
typedef uint32_t (*FuriLogTimestamp)(void);
@ -54,6 +54,15 @@ void furi_log_init();
void furi_log_print_format(FuriLogLevel level, const char* tag, const char* format, ...)
_ATTRIBUTE((__format__(__printf__, 3, 4)));
/** Print log record
*
* @param level
* @param format
* @param ...
*/
void furi_log_print_raw_format(FuriLogLevel level, const char* format, ...)
_ATTRIBUTE((__format__(__printf__, 2, 3)));
/** Set log level
*
* @param[in] level The level
@ -95,6 +104,22 @@ void furi_log_set_timestamp(FuriLogTimestamp timestamp);
#define FURI_LOG_T(tag, format, ...) \
furi_log_print_format(FuriLogLevelTrace, tag, format, ##__VA_ARGS__)
/** Log methods
*
* @param format The raw format
* @param ... VA Args
*/
#define FURI_LOG_RAW_E(format, ...) \
furi_log_print_raw_format(FuriLogLevelError, format, ##__VA_ARGS__)
#define FURI_LOG_RAW_W(format, ...) \
furi_log_print_raw_format(FuriLogLevelWarn, format, ##__VA_ARGS__)
#define FURI_LOG_RAW_I(format, ...) \
furi_log_print_raw_format(FuriLogLevelInfo, format, ##__VA_ARGS__)
#define FURI_LOG_RAW_D(format, ...) \
furi_log_print_raw_format(FuriLogLevelDebug, format, ##__VA_ARGS__)
#define FURI_LOG_RAW_T(format, ...) \
furi_log_print_raw_format(FuriLogLevelTrace, format, ##__VA_ARGS__)
#ifdef __cplusplus
}
#endif

View File

@ -2,6 +2,8 @@
#include "math.h"
#include <core/check.h>
#include "furi.h"
#define TAG "SubGhzBlockEncoder"
void subghz_protocol_blocks_set_bit_array(
@ -17,21 +19,32 @@ bool subghz_protocol_blocks_get_bit_array(uint8_t data_array[], size_t read_inde
return bit_read(data_array[read_index_bit >> 3], 7 - (read_index_bit & 0x7));
}
size_t subghz_protocol_blocks_get_upload(
size_t subghz_protocol_blocks_get_upload_from_bit_array(
uint8_t data_array[],
size_t count_bit_data_array,
LevelDuration* upload,
size_t max_size_upload,
uint32_t duration_bit) {
size_t index_bit = 0;
uint32_t duration_bit,
SubGhzProtocolBlockAlignBit align_bit) {
size_t bias_bit = 0;
size_t size_upload = 0;
uint32_t duration = duration_bit;
if(align_bit == SubGhzProtocolBlockAlignBitRight) {
if(count_bit_data_array & 0x7) {
bias_bit = 8 - (count_bit_data_array & 0x7);
}
}
size_t index_bit = bias_bit;
bool last_bit = subghz_protocol_blocks_get_bit_array(data_array, index_bit++);
for(size_t i = 1; i < count_bit_data_array; i++) {
for(size_t i = 1 + bias_bit; i < count_bit_data_array + bias_bit; i++) {
if(last_bit == subghz_protocol_blocks_get_bit_array(data_array, index_bit)) {
duration += duration_bit;
} else {
furi_assert(max_size_upload > size_upload);
if(size_upload > max_size_upload) {
furi_crash("SubGhz: Encoder buffer overflow");
}
upload[size_upload++] = level_duration_make(
subghz_protocol_blocks_get_bit_array(data_array, index_bit - 1), duration);
last_bit = !last_bit;

View File

@ -19,6 +19,11 @@ typedef struct {
} SubGhzProtocolBlockEncoder;
typedef enum {
SubGhzProtocolBlockAlignBitLeft,
SubGhzProtocolBlockAlignBitRight,
} SubGhzProtocolBlockAlignBit;
/**
* Set data bit when encoding HEX array.
* @param bit_value The value of the bit to be set
@ -47,13 +52,15 @@ bool subghz_protocol_blocks_get_bit_array(uint8_t data_array[], size_t read_inde
* @param upload Pointer to a LevelDuration
* @param max_size_upload upload size, check not to overflow
* @param duration_bit duration 1 bit
* @param align_bit alignment of useful bits in an array
*/
size_t subghz_protocol_blocks_get_upload(
size_t subghz_protocol_blocks_get_upload_from_bit_array(
uint8_t data_array[],
size_t count_bit_data_array,
LevelDuration* upload,
size_t max_size_upload,
uint32_t duration_bit);
uint32_t duration_bit,
SubGhzProtocolBlockAlignBit align_bit);
#ifdef __cplusplus
}

View File

@ -100,7 +100,7 @@ bool subghz_block_generic_deserialize(SubGhzBlockGeneric* instance, FlipperForma
FURI_LOG_E(TAG, "Missing Bit");
break;
}
instance->data_count_bit = (uint8_t)temp_data;
instance->data_count_bit = (uint16_t)temp_data;
uint8_t key_data[sizeof(uint64_t)] = {0};
if(!flipper_format_read_hex(flipper_format, "Key", key_data, sizeof(uint64_t))) {

View File

@ -20,7 +20,7 @@ struct SubGhzBlockGeneric {
uint64_t data;
uint64_t data_2;
uint32_t serial;
uint8_t data_count_bit;
uint16_t data_count_bit;
uint8_t btn;
uint32_t cnt;
uint8_t cnt_2;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,111 @@
#pragma once
#include "base.h"
#define SUBGHZ_PROTOCOL_BIN_RAW_NAME "BinRAW"
typedef struct SubGhzProtocolDecoderBinRAW SubGhzProtocolDecoderBinRAW;
typedef struct SubGhzProtocolEncoderBinRAW SubGhzProtocolEncoderBinRAW;
extern const SubGhzProtocolDecoder subghz_protocol_bin_raw_decoder;
extern const SubGhzProtocolEncoder subghz_protocol_bin_raw_encoder;
extern const SubGhzProtocol subghz_protocol_bin_raw;
/**
* Allocate SubGhzProtocolEncoderBinRAW.
* @param environment Pointer to a SubGhzEnvironment instance
* @return SubGhzProtocolEncoderBinRAW* pointer to a SubGhzProtocolEncoderBinRAW instance
*/
void* subghz_protocol_encoder_bin_raw_alloc(SubGhzEnvironment* environment);
/**
* Free SubGhzProtocolEncoderBinRAW.
* @param context Pointer to a SubGhzProtocolEncoderBinRAW instance
*/
void subghz_protocol_encoder_bin_raw_free(void* context);
/**
* Deserialize and generating an upload to send.
* @param context Pointer to a SubGhzProtocolEncoderBinRAW instance
* @param flipper_format Pointer to a FlipperFormat instance
* @return true On success
*/
bool subghz_protocol_encoder_bin_raw_deserialize(void* context, FlipperFormat* flipper_format);
/**
* Forced transmission stop.
* @param context Pointer to a SubGhzProtocolEncoderBinRAW instance
*/
void subghz_protocol_encoder_bin_raw_stop(void* context);
/**
* Getting the level and duration of the upload to be loaded into DMA.
* @param context Pointer to a SubGhzProtocolEncoderBinRAW instance
* @return LevelDuration
*/
LevelDuration subghz_protocol_encoder_bin_raw_yield(void* context);
/**
* Allocate SubGhzProtocolDecoderBinRAW.
* @param environment Pointer to a SubGhzEnvironment instance
* @return SubGhzProtocolDecoderBinRAW* pointer to a SubGhzProtocolDecoderBinRAW instance
*/
void* subghz_protocol_decoder_bin_raw_alloc(SubGhzEnvironment* environment);
/**
* Free SubGhzProtocolDecoderBinRAW.
* @param context Pointer to a SubGhzProtocolDecoderBinRAW instance
*/
void subghz_protocol_decoder_bin_raw_free(void* context);
/**
* Reset decoder SubGhzProtocolDecoderBinRAW.
* @param context Pointer to a SubGhzProtocolDecoderBinRAW instance
*/
void subghz_protocol_decoder_bin_raw_reset(void* context);
/**
* Parse a raw sequence of levels and durations received from the air.
* @param context Pointer to a SubGhzProtocolDecoderBinRAW instance
* @param level Signal level true-high false-low
* @param duration Duration of this level in, us
*/
void subghz_protocol_decoder_bin_raw_feed(void* context, bool level, uint32_t duration);
/**
* Getting the hash sum of the last randomly received parcel.
* @param context Pointer to a SubGhzProtocolDecoderBinRAW instance
* @return hash Hash sum
*/
uint8_t subghz_protocol_decoder_bin_raw_get_hash_data(void* context);
void subghz_protocol_decoder_bin_raw_data_input_rssi(
SubGhzProtocolDecoderBinRAW* instance,
float rssi);
/**
* Serialize data SubGhzProtocolDecoderBinRAW.
* @param context Pointer to a SubGhzProtocolDecoderBinRAW instance
* @param flipper_format Pointer to a FlipperFormat instance
* @param preset The modulation on which the signal was received, SubGhzRadioPreset
* @return true On success
*/
bool subghz_protocol_decoder_bin_raw_serialize(
void* context,
FlipperFormat* flipper_format,
SubGhzRadioPreset* preset);
/**
* Deserialize data SubGhzProtocolDecoderBinRAW.
* @param context Pointer to a SubGhzProtocolDecoderBinRAW instance
* @param flipper_format Pointer to a FlipperFormat instance
* @return true On success
*/
bool subghz_protocol_decoder_bin_raw_deserialize(void* context, FlipperFormat* flipper_format);
/**
* Getting a textual representation of the received data.
* @param context Pointer to a SubGhzProtocolDecoderBinRAW instance
* @param output Resulting text
*/
void subghz_protocol_decoder_bin_raw_get_string(void* context, FuriString* output);

View File

@ -196,12 +196,13 @@ static bool
break;
}
instance->encoder.size_upload = subghz_protocol_blocks_get_upload(
instance->encoder.size_upload = subghz_protocol_blocks_get_upload_from_bit_array(
upload_hex_data,
upload_hex_count_bit,
instance->encoder.upload,
instance->encoder.size_upload,
subghz_protocol_chamb_code_const.te_short);
subghz_protocol_chamb_code_const.te_short,
SubGhzProtocolBlockAlignBitLeft);
return true;
}

View File

@ -42,6 +42,7 @@ const SubGhzProtocol* subghz_protocol_registry_items[] = {
&subghz_protocol_dooya,
&subghz_protocol_alutech_at_4n,
&subghz_protocol_kinggates_stylo_4k,
&subghz_protocol_bin_raw,
};
const SubGhzProtocolRegistry subghz_protocol_registry = {

View File

@ -42,6 +42,7 @@
#include "dooya.h"
#include "alutech_at_4n.h"
#include "kinggates_stylo_4k.h"
#include "bin_raw.h"
#ifdef __cplusplus
extern "C" {

View File

@ -261,16 +261,16 @@ static bool
data = order << 4 | invert;
int k = 0;
for(int i = 6; i >= 0; i -= 2) {
roll_array[k++] = (data >> i) & 0x03;
if(roll_array[k] == 3) {
roll_array[k] = (data >> i) & 0x03;
if(roll_array[k++] == 3) {
FURI_LOG_E(TAG, "Roll_Array FAIL");
return false;
}
}
for(int i = 8; i >= 0; i -= 2) {
roll_array[k++] = (p[2] >> i) & 0x03;
if(roll_array[k] == 3) {
roll_array[k] = (p[2] >> i) & 0x03;
if(roll_array[k++] == 3) {
FURI_LOG_E(TAG, "Roll_Array FAIL");
return false;
}

View File

@ -64,7 +64,7 @@ void subghz_receiver_decode(SubGhzReceiver* instance, bool level, uint32_t durat
for
M_EACH(slot, instance->slots, SubGhzReceiverSlotArray_t) {
if((slot->base->protocol->flag & instance->filter) == instance->filter) {
if((slot->base->protocol->flag & instance->filter) != 0) {
slot->base->protocol->decoder->feed(slot->base, level, duration);
}
}

View File

@ -90,6 +90,7 @@ typedef enum {
SubGhzProtocolFlag_Save = (1 << 7),
SubGhzProtocolFlag_Load = (1 << 8),
SubGhzProtocolFlag_Send = (1 << 9),
SubGhzProtocolFlag_BinRAW = (1 << 10),
} SubGhzProtocolFlag;
typedef struct {

View File

@ -13,8 +13,8 @@
#define LEVEL_DURATION_RESERVED 0x800000U
typedef struct {
uint32_t level;
uint32_t duration;
uint32_t duration : 30;
uint8_t level : 2;
} LevelDuration;
static inline LevelDuration level_duration_make(bool level, uint32_t duration) {

View File

@ -47,6 +47,7 @@ def generate(env, **kw):
"source ${FBT_DEBUG_DIR}/gdbinit",
],
GDBOPTS_BLACKMAGIC=[
"-q",
"-ex",
"monitor swdp_scan",
"-ex",