Merge remote-tracking branch 'OFW/dev' into dev

This commit is contained in:
MX 2024-06-06 00:35:40 +03:00
commit 17dbb4105d
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83
151 changed files with 703 additions and 612 deletions

View file

@ -5,6 +5,10 @@ CompileFlags:
Remove:
- -mword-relocations
Diagnostics:
ClangTidy:
FastCheckFilter: None
---
If:

View file

@ -1,7 +1,6 @@
#include "../accessor_app.h"
#include "../accessor_view_manager.h"
#include "../accessor_event.h"
#include "callback_connector.h"
#include "accessor_scene_start.h"
void AccessorSceneStart::on_enter(AccessorApp* app) {

View file

@ -68,7 +68,7 @@ static void draw_battery(Canvas* canvas, BatteryInfoModel* data, int x, int y) {
drain_current > HIGH_DRAIN_CURRENT_THRESHOLD ? "mA!" : "mA");
} else if(drain_current != 0) {
snprintf(header, 20, "...");
} else if(data->charging_voltage < 4.2) {
} else if(data->charging_voltage < 4.2f) {
// Non-default battery charging limit, mention it
snprintf(emote, sizeof(emote), "Charged!");
snprintf(header, sizeof(header), "Limited to");

View file

@ -1,5 +1,3 @@
#include "display_test.h"
#include <furi_hal.h>
#include <furi.h>

View file

@ -1 +0,0 @@
#pragma once

View file

@ -34,8 +34,8 @@ static void lfrfid_debug_view_tune_draw_callback(Canvas* canvas, void* _model) {
canvas_set_color(canvas, ColorBlack);
char buffer[TEMP_STR_LEN + 1];
double freq = ((float)SystemCoreClock / ((float)model->ARR + 1));
double duty = ((float)model->CCR + 1) / ((float)model->ARR + 1) * 100.0f;
double freq = ((double)SystemCoreClock / (model->ARR + 1));
double duty = (double)((model->CCR + 1) * 100) / (model->ARR + 1);
snprintf(
buffer,
TEMP_STR_LEN,

View file

@ -1,4 +1,4 @@
#include "../subghz_test_app_i.h"
#include "../subghz_test_app_i.h" // IWYU pragma: keep
// Generate scene on_enter handlers array
#define ADD_SCENE(prefix, name, id) prefix##_scene_##name##_on_enter,

View file

@ -1,5 +1,3 @@
#include "subghz_test_app_i.h"
#include <furi.h>
#define TAG "SubGhzTest"

View file

@ -1,5 +1,4 @@
#include "subghz_test_carrier.h"
#include "../subghz_test_app_i.h"
#include "../helpers/subghz_test_frequency.h"
#include <lib/subghz/devices/cc1101_configs.h>
@ -75,7 +74,7 @@ void subghz_test_carrier_draw(Canvas* canvas, SubGhzTestCarrierModel* model) {
sizeof(buffer),
"RSSI: %ld.%ld dBm",
(int32_t)(model->rssi),
(int32_t)fabs(model->rssi * 10) % 10);
(int32_t)fabsf(model->rssi * 10.f) % 10);
canvas_draw_str(canvas, 0, 42, buffer);
} else {
canvas_draw_str(canvas, 0, 42, "TX");

View file

@ -1,5 +1,4 @@
#include "subghz_test_packet.h"
#include "../subghz_test_app_i.h"
#include "../helpers/subghz_test_frequency.h"
#include <lib/subghz/devices/cc1101_configs.h>
@ -123,7 +122,7 @@ static void subghz_test_packet_draw(Canvas* canvas, SubGhzTestPacketModel* model
sizeof(buffer),
"RSSI: %ld.%ld dBm",
(int32_t)(model->rssi),
(int32_t)fabs(model->rssi * 10) % 10);
(int32_t)fabsf(model->rssi * 10.0f) % 10);
canvas_draw_str(canvas, 0, 53, buffer);
} else {
canvas_draw_str(canvas, 0, 53, "TX");

View file

@ -1,9 +1,7 @@
#include "subghz_test_static.h"
#include "../subghz_test_app_i.h"
#include "../helpers/subghz_test_frequency.h"
#include <lib/subghz/devices/cc1101_configs.h>
#include <math.h>
#include <furi.h>
#include <furi_hal.h>
#include <input/input.h>

View file

@ -1,5 +1,5 @@
#include <furi.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <bit_lib/bit_lib.h>
MU_TEST(test_bit_lib_increment_index) {

View file

@ -1,6 +1,6 @@
#include <furi.h>
#include <furi_hal.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <bt/bt_service/bt_keys_storage.h>
#include <storage/storage.h>

View file

@ -1,4 +1,4 @@
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <toolbox/compress.h>

View file

@ -1,5 +1,5 @@
#include <furi.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <datetime/datetime.h>

View file

@ -1,6 +1,6 @@
#include <dialogs/dialogs.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
MU_TEST(test_dialog_file_browser_set_basic_options_should_init_all_fields) {
mu_assert(

View file

@ -1,4 +1,4 @@
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <furi.h>
#include <m-dict.h>
#include <toolbox/dir_walk.h>

View file

@ -1,4 +1,4 @@
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <furi.h>
#include <furi_hal_random.h>

View file

@ -2,7 +2,7 @@
#include <flipper_format/flipper_format.h>
#include <flipper_format/flipper_format_i.h>
#include <toolbox/stream/stream.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#define TEST_DIR TEST_DIR_NAME "/"
#define TEST_DIR_NAME EXT_PATH("unit_tests_tmp")

View file

@ -3,7 +3,7 @@
#include <flipper_format/flipper_format_i.h>
#include <toolbox/stream/stream.h>
#include <storage/storage.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
static const char* test_filetype = "Flipper Format test";
static const uint32_t test_version = 666;

View file

@ -1,7 +1,7 @@
#include <float.h>
#include <float_tools.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
MU_TEST(float_tools_equal_test) {
mu_check(float_is_equal(FLT_MAX, FLT_MAX));

View file

@ -1,4 +1,4 @@
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>

View file

@ -1,7 +1,7 @@
#include <stdio.h>
#include <string.h>
#include <furi.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
const uint32_t context_value = 0xdeadbeef;
const uint32_t notify_value_0 = 0x12345678;

View file

@ -1,7 +1,5 @@
#include <stdio.h>
#include <string.h>
#include <furi.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#define TEST_RECORD_NAME "test/holding"

View file

@ -1,7 +1,6 @@
#include <stdio.h>
#include <furi.h>
#include <furi_hal.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
// v2 tests
void test_furi_create_open(void);

View file

@ -1,11 +1,9 @@
#include "furi_hal_rtc.h"
#include <stdint.h>
#include <stdio.h>
#include <furi.h>
#include <furi_hal.h>
#include <lp5562_reg.h>
#include "../test.h"
#include <stdlib.h>
#include "../test.h" // IWYU pragma: keep
#define DATA_SIZE 4
#define EEPROM_ADDRESS 0b10101000

View file

@ -1,7 +1,6 @@
#include <stdio.h>
#include <furi.h>
#include <furi_hal.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
static const uint8_t key_ctr_1[32] = {
0x77, 0x6B, 0xEF, 0xF2, 0x85, 0x1D, 0xB0, 0x6F, 0x4C, 0x8A, 0x05, 0x42, 0xC8, 0x69, 0x6F, 0x6C,

View file

@ -1,5 +1,5 @@
#include <furi.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
static void test_setup(void) {
}

View file

@ -2,7 +2,7 @@
#include <flipper_format.h>
#include <infrared.h>
#include <common/infrared_common_i.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#define IR_TEST_FILES_DIR EXT_PATH("unit_tests/infrared/")
#define IR_TEST_FILE_PREFIX "test_"

View file

@ -1,5 +1,5 @@
#include <furi.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <toolbox/protocols/protocol_dict.h>
#include <lfrfid/protocols/lfrfid_protocols.h>
#include <toolbox/pulse_protocols/pulse_glue.h>

View file

@ -1,5 +1,5 @@
#include <furi.c>
#include "../test.h"
#include <furi.h>
#include "../test.h" // IWYU pragma: keep
#include <update_util/resources/manifest.h>
#define TAG "Manifest"

View file

@ -24,7 +24,7 @@
#include <toolbox/keys_dict.h>
#include <nfc/nfc.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#define TAG "NfcTest"

View file

@ -1,6 +1,6 @@
#include <furi.h>
#include <furi_hal.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
static void power_test_deinit(void) {
// Try to reset to default charge voltage limit
@ -13,46 +13,47 @@ MU_TEST(test_power_charge_voltage_limit_exact) {
//
// This test may need adapted if other charge controllers are used in the future.
for(uint16_t charge_mv = 3840; charge_mv <= 4208; charge_mv += 16) {
float charge_volt = (float)charge_mv / 1000.0f;
float charge_volt = (float)charge_mv / 1000;
furi_hal_power_set_battery_charge_voltage_limit(charge_volt);
mu_assert_double_eq(charge_volt, furi_hal_power_get_battery_charge_voltage_limit());
mu_assert_double_eq(
(double)charge_volt, (double)furi_hal_power_get_battery_charge_voltage_limit());
}
}
MU_TEST(test_power_charge_voltage_limit_floating_imprecision) {
// 4.016f should act as 4.016 V, even with floating point imprecision
furi_hal_power_set_battery_charge_voltage_limit(4.016f);
mu_assert_double_eq(4.016f, furi_hal_power_get_battery_charge_voltage_limit());
mu_assert_double_eq(4.016, (double)furi_hal_power_get_battery_charge_voltage_limit());
}
MU_TEST(test_power_charge_voltage_limit_inexact) {
// Charge voltage limits that are not power of 16mV get truncated down
furi_hal_power_set_battery_charge_voltage_limit(3.841f);
mu_assert_double_eq(3.840, furi_hal_power_get_battery_charge_voltage_limit());
mu_assert_double_eq(3.840, (double)furi_hal_power_get_battery_charge_voltage_limit());
furi_hal_power_set_battery_charge_voltage_limit(3.900f);
mu_assert_double_eq(3.888, furi_hal_power_get_battery_charge_voltage_limit());
mu_assert_double_eq(3.888, (double)furi_hal_power_get_battery_charge_voltage_limit());
furi_hal_power_set_battery_charge_voltage_limit(4.200f);
mu_assert_double_eq(4.192, furi_hal_power_get_battery_charge_voltage_limit());
mu_assert_double_eq(4.192, (double)furi_hal_power_get_battery_charge_voltage_limit());
}
MU_TEST(test_power_charge_voltage_limit_invalid_clamped) {
// Out-of-range charge voltage limits get clamped to 3.840 V and 4.208 V
furi_hal_power_set_battery_charge_voltage_limit(3.808f);
mu_assert_double_eq(3.840, furi_hal_power_get_battery_charge_voltage_limit());
mu_assert_double_eq(3.840, (double)furi_hal_power_get_battery_charge_voltage_limit());
furi_hal_power_set_battery_charge_voltage_limit(1.0f);
mu_assert_double_eq(3.840, furi_hal_power_get_battery_charge_voltage_limit());
mu_assert_double_eq(3.840, (double)furi_hal_power_get_battery_charge_voltage_limit());
// NOTE: Intentionally picking a small increment above 4.208 V to reduce the risk of an
// unhappy battery if this fails.
furi_hal_power_set_battery_charge_voltage_limit(4.240f);
mu_assert_double_eq(4.208, furi_hal_power_get_battery_charge_voltage_limit());
mu_assert_double_eq(4.208, (double)furi_hal_power_get_battery_charge_voltage_limit());
// Likewise, picking a number that the uint8_t wraparound in the driver would result in a
// VREG value under 23 if this test fails.
// E.g. (uint8_t)((8105-3840)/16) -> 10
furi_hal_power_set_battery_charge_voltage_limit(8.105f);
mu_assert_double_eq(4.208, furi_hal_power_get_battery_charge_voltage_limit());
mu_assert_double_eq(4.208, (double)furi_hal_power_get_battery_charge_voltage_limit());
}
MU_TEST_SUITE(test_power_suite) {

View file

@ -1,5 +1,5 @@
#include <furi.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <toolbox/protocols/protocol_dict.h>
typedef enum {

View file

@ -1,11 +1,6 @@
#include <core/check.h>
#include <core/record.h>
#include <furi.h>
#include <stdint.h>
#include <FreeRTOS.h>
#include <semphr.h>
#include <rpc/rpc.h>
#include <rpc/rpc_i.h>
#include <cli/cli.h>
@ -17,7 +12,7 @@
#include <lib/toolbox/path.h>
#include <m-list.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <protobuf_version.h>
#include <pb.h>
@ -40,8 +35,8 @@ static uint32_t command_id = 0;
typedef struct {
RpcSession* session;
FuriStreamBuffer* output_stream;
SemaphoreHandle_t close_session_semaphore;
SemaphoreHandle_t terminate_semaphore;
FuriSemaphore* close_session_semaphore;
FuriSemaphore* terminate_semaphore;
uint32_t timeout;
} RpcSessionContext;
@ -96,8 +91,8 @@ static void test_rpc_setup(void) {
rpc_session[0].output_stream = furi_stream_buffer_alloc(4096, 1);
rpc_session_set_send_bytes_callback(rpc_session[0].session, output_bytes_callback);
rpc_session[0].close_session_semaphore = xSemaphoreCreateBinary();
rpc_session[0].terminate_semaphore = xSemaphoreCreateBinary();
rpc_session[0].close_session_semaphore = furi_semaphore_alloc(1, 0);
rpc_session[0].terminate_semaphore = furi_semaphore_alloc(1, 0);
rpc_session_set_close_callback(rpc_session[0].session, test_rpc_session_close_callback);
rpc_session_set_terminated_callback(
rpc_session[0].session, test_rpc_session_terminated_callback);
@ -116,8 +111,8 @@ static void test_rpc_setup_second_session(void) {
rpc_session[1].output_stream = furi_stream_buffer_alloc(1000, 1);
rpc_session_set_send_bytes_callback(rpc_session[1].session, output_bytes_callback);
rpc_session[1].close_session_semaphore = xSemaphoreCreateBinary();
rpc_session[1].terminate_semaphore = xSemaphoreCreateBinary();
rpc_session[1].close_session_semaphore = furi_semaphore_alloc(1, 0);
rpc_session[1].terminate_semaphore = furi_semaphore_alloc(1, 0);
rpc_session_set_close_callback(rpc_session[1].session, test_rpc_session_close_callback);
rpc_session_set_terminated_callback(
rpc_session[1].session, test_rpc_session_terminated_callback);
@ -126,13 +121,15 @@ static void test_rpc_setup_second_session(void) {
static void test_rpc_teardown(void) {
furi_check(rpc_session[0].close_session_semaphore);
xSemaphoreTake(rpc_session[0].terminate_semaphore, 0);
furi_semaphore_acquire(rpc_session[0].terminate_semaphore, 0);
rpc_session_close(rpc_session[0].session);
furi_check(xSemaphoreTake(rpc_session[0].terminate_semaphore, portMAX_DELAY));
furi_check(
furi_semaphore_acquire(rpc_session[0].terminate_semaphore, FuriWaitForever) ==
FuriStatusOk);
furi_record_close(RECORD_RPC);
furi_stream_buffer_free(rpc_session[0].output_stream);
vSemaphoreDelete(rpc_session[0].close_session_semaphore);
vSemaphoreDelete(rpc_session[0].terminate_semaphore);
furi_semaphore_free(rpc_session[0].close_session_semaphore);
furi_semaphore_free(rpc_session[0].terminate_semaphore);
++command_id;
rpc_session[0].output_stream = NULL;
rpc_session[0].close_session_semaphore = NULL;
@ -142,12 +139,14 @@ static void test_rpc_teardown(void) {
static void test_rpc_teardown_second_session(void) {
furi_check(rpc_session[1].close_session_semaphore);
xSemaphoreTake(rpc_session[1].terminate_semaphore, 0);
furi_semaphore_acquire(rpc_session[1].terminate_semaphore, 0);
rpc_session_close(rpc_session[1].session);
furi_check(xSemaphoreTake(rpc_session[1].terminate_semaphore, portMAX_DELAY));
furi_check(
furi_semaphore_acquire(rpc_session[1].terminate_semaphore, FuriWaitForever) ==
FuriStatusOk);
furi_stream_buffer_free(rpc_session[1].output_stream);
vSemaphoreDelete(rpc_session[1].close_session_semaphore);
vSemaphoreDelete(rpc_session[1].terminate_semaphore);
furi_semaphore_free(rpc_session[1].close_session_semaphore);
furi_semaphore_free(rpc_session[1].terminate_semaphore);
++command_id;
rpc_session[1].output_stream = NULL;
rpc_session[1].close_session_semaphore = NULL;
@ -204,14 +203,14 @@ static void test_rpc_session_close_callback(void* context) {
furi_check(context);
RpcSessionContext* callbacks_context = context;
xSemaphoreGive(callbacks_context->close_session_semaphore);
furi_check(furi_semaphore_release(callbacks_context->close_session_semaphore) == FuriStatusOk);
}
static void test_rpc_session_terminated_callback(void* context) {
furi_check(context);
RpcSessionContext* callbacks_context = context;
xSemaphoreGive(callbacks_context->terminate_semaphore);
furi_check(furi_semaphore_release(callbacks_context->terminate_semaphore) == FuriStatusOk);
}
static void test_rpc_print_message_list(MsgList_t msg_list) {
@ -1645,7 +1644,7 @@ static void test_rpc_feed_rubbish_run(
test_rpc_add_empty_to_list(expected, PB_CommandStatus_ERROR_DECODE, 0);
furi_check(!xSemaphoreTake(rpc_session[0].close_session_semaphore, 0));
furi_check(furi_semaphore_acquire(rpc_session[0].close_session_semaphore, 0) != FuriStatusOk);
test_rpc_encode_and_feed(input_before, 0);
test_send_rubbish(rpc_session[0].session, pattern, pattern_size, size);
test_rpc_encode_and_feed(input_after, 0);

View file

@ -1,4 +1,4 @@
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <furi.h>
#include <storage/storage.h>

View file

@ -4,7 +4,7 @@
#include <toolbox/stream/file_stream.h>
#include <toolbox/stream/buffered_file_stream.h>
#include <storage/storage.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
static const char* stream_test_data = "I write differently from what I speak, "
"I speak differently from what I think, "

View file

@ -1,6 +1,6 @@
#include <furi.h>
#include <furi_hal.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <lib/subghz/receiver.h>
#include <lib/subghz/transmitter.h>
#include <lib/subghz/subghz_keystore.h>

View file

@ -1,7 +1,7 @@
#include <furi.h>
#include <furi_hal.h>
#include "../test.h"
#include "../test.h" // IWYU pragma: keep
#include <toolbox/varint.h>
#include <toolbox/profiler.h>

View file

@ -19,9 +19,9 @@ static constexpr auto unit_tests_api_table = sort(create_array_t<sym_entry>(
API_METHOD(xQueueSemaphoreTake, BaseType_t, (QueueHandle_t, TickType_t)),
API_METHOD(vQueueDelete, void, (QueueHandle_t)),
API_METHOD(
xQueueGenericCreate,
xQueueGenericCreateStatic,
QueueHandle_t,
(const UBaseType_t, const UBaseType_t, const uint8_t)),
(const UBaseType_t, const UBaseType_t, uint8_t*, StaticQueue_t*, const uint8_t)),
API_METHOD(
xQueueGenericSend,
BaseType_t,

View file

@ -1,4 +1,3 @@
#include "archive_files.h"
#include "archive_apps.h"
#include "archive_browser.h"

View file

@ -7,8 +7,6 @@
#include <core/log.h>
#include <gui/modules/file_browser_worker.h>
#include <flipper_application/flipper_application.h>
#include <math.h>
#include <furi_hal.h>
static void
archive_folder_open_cb(void* context, uint32_t item_cnt, int32_t file_idx, bool is_root) {

View file

@ -1,6 +1,5 @@
#include "../archive_i.h"
#include "../helpers/archive_files.h"
#include "../helpers/archive_apps.h"
#include "../helpers/archive_favorites.h"
#include "../helpers/archive_browser.h"
#include "../views/archive_browser_view.h"

View file

@ -1,7 +1,6 @@
#include "assets_icons.h"
#include "toolbox/path.h"
#include <furi.h>
#include "../archive_i.h"
#include "archive_browser_view.h"
#include "../helpers/archive_browser.h"

View file

@ -1,5 +1,4 @@
#include "../bad_usb_app_i.h"
#include "furi_hal_power.h"
enum SubmenuIndex {
ConfigIndexKeyboardLayout,

View file

@ -1,5 +1,4 @@
#include "../bad_usb_app_i.h"
#include "furi_hal_power.h"
#include <storage/storage.h>
static bool bad_usb_layout_select(BadUsbApp* bad_usb) {

View file

@ -1,7 +1,8 @@
#include "gpio_usb_uart.h"
#include "../usb_uart_bridge.h"
#include "../gpio_app_i.h"
#include <furi_hal.h>
#include <gui/elements.h>
#include <assets_icons.h>
struct GpioUsbUart {
View* view;

View file

@ -1,4 +1,4 @@
#include "../infrared_app_i.h"
#include "../infrared_app_i.h" // IWYU pragma: keep
#include "common/infrared_scene_universal_common.h"

View file

@ -167,7 +167,7 @@ bool nfc_scene_read_on_event_mf_ultralight(NfcApp* instance, SceneManagerEvent e
if(event.type == SceneManagerEventTypeCustom) {
if(event.event == NfcCustomEventCardDetected) {
nfc_unlock_helper_card_detected_handler(instance);
} else if((event.event == NfcCustomEventPollerIncomplete)) {
} else if(event.event == NfcCustomEventPollerIncomplete) {
notification_message(instance->notifications, &sequence_semi_success);
scene_manager_next_scene(instance->scene_manager, NfcSceneReadSuccess);
dolphin_deed(DolphinDeedNfcReadSuccess);

View file

@ -7,7 +7,6 @@
#include <bit_lib/bit_lib.h>
#include <nfc/protocols/mf_classic/mf_classic_poller_sync.h>
#include "../../api/mosgortrans/mosgortrans_util.h"
#include "furi_hal_rtc.h"
#define TAG "Troika"

View file

@ -58,7 +58,7 @@ static uint32_t subghz_frequency_analyzer_worker_expRunningAverageAdaptive(
float k;
float newValFloat = newVal;
// the sharpness of the filter depends on the absolute value of the difference
if(fabs(newValFloat - instance->filVal) > 500000)
if(fabsf(newValFloat - instance->filVal) > 500000.f)
k = 0.9;
else
k = 0.03;

View file

@ -1,4 +1,4 @@
#include "subghz_txrx_i.h"
#include "subghz_txrx_i.h" // IWYU pragma: keep
#include <lib/subghz/protocols/protocol_items.h>
#include <applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h>

View file

@ -1,4 +1,4 @@
#include "subghz_txrx_i.h"
#include "subghz_txrx_i.h" // IWYU pragma: keep
#include "subghz_txrx_create_protocol_key.h"
#include <lib/subghz/transmitter.h>
#include <lib/subghz/protocols/protocol_items.h>

View file

@ -1,4 +1,4 @@
#include "../subghz_i.h"
#include "../subghz_i.h" // IWYU pragma: keep
#include "../helpers/subghz_custom_event.h"
void subghz_scene_delete_success_popup_callback(void* context) {

View file

@ -1,4 +1,4 @@
#include "../subghz_i.h"
#include "../subghz_i.h" // IWYU pragma: keep
#include "../views/subghz_frequency_analyzer.h"
#define TAG "SubGhzSceneFrequencyAnalyzer"

View file

@ -2,8 +2,7 @@
#include "../views/subghz_read_raw.h"
#include <dolphin/dolphin.h>
#include <lib/subghz/protocols/raw.h>
#include <lib/toolbox/path.h>
#include <float_tools.h>
#include <toolbox/path.h>
#define RAW_FILE_NAME "RAW_"
#define TAG "SubGhzSceneReadRAW"

View file

@ -1,4 +1,4 @@
#include "../subghz_i.h"
#include "../subghz_i.h" // IWYU pragma: keep
enum SubmenuIndex {
SubmenuIndexEmulate,

View file

@ -1,4 +1,4 @@
#include "../subghz_i.h"
#include "../subghz_i.h" // IWYU pragma: keep
#include "../helpers/subghz_custom_event.h"
static const NotificationSequence subghz_sequence_sd_error = {

View file

@ -1,4 +1,4 @@
#include "../subghz_i.h"
#include "../subghz_i.h" // IWYU pragma: keep
#include "../helpers/subghz_custom_event.h"
void subghz_scene_show_error_sub_popup_callback(void* context) {

View file

@ -2,7 +2,6 @@
#include "assets_icons.h"
#include "subghz/types.h"
#include <math.h>
#include <furi.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>

View file

@ -1,7 +1,7 @@
#include "receiver.h"
#include "../subghz_i.h"
#include <math.h>
#include "types.h"
#include <input/input.h>
#include <gui/elements.h>
#include <assets_icons.h>

View file

@ -1,7 +1,5 @@
#include "subghz_frequency_analyzer.h"
#include "../subghz_i.h"
#include <math.h>
#include <furi.h>
#include <furi_hal.h>
#include <input/input.h>

View file

@ -1,7 +1,6 @@
#include "subghz_read_raw.h"
#include "../subghz_i.h"
#include <math.h>
#include <furi.h>
#include <furi_hal.h>
#include <input/input.h>
@ -74,7 +73,7 @@ void subghz_read_raw_add_data_rssi(SubGhzReadRAW* instance, float rssi, bool tra
if(rssi < SUBGHZ_RAW_THRESHOLD_MIN) {
u_rssi = 0;
} else {
u_rssi = (uint8_t)((rssi - SUBGHZ_RAW_THRESHOLD_MIN) / 2.7);
u_rssi = (uint8_t)((rssi - SUBGHZ_RAW_THRESHOLD_MIN) / 2.7f);
}
with_view_model(
@ -277,7 +276,7 @@ void subghz_read_raw_draw_threshold_rssi(Canvas* canvas, SubGhzReadRAWModel* mod
if(model->raw_threshold_rssi > SUBGHZ_RAW_THRESHOLD_MIN) {
uint8_t x = 118;
y -= (uint8_t)((model->raw_threshold_rssi - SUBGHZ_RAW_THRESHOLD_MIN) / 2.7);
y -= (uint8_t)((model->raw_threshold_rssi - SUBGHZ_RAW_THRESHOLD_MIN) / 2.7f);
uint8_t width = 3;
for(uint8_t i = 0; i < x; i += width * 2) {

View file

@ -1,6 +1,6 @@
#include "transmitter.h"
#include "../subghz_i.h"
#include <assets_icons.h>
#include <input/input.h>
#include <gui/elements.h>

View file

@ -1,5 +1,4 @@
#include "u2f.h"
#include "u2f_hid.h"
#include "u2f_data.h"
#include <furi.h>

View file

@ -460,6 +460,8 @@ int32_t bt_srv(void* p) {
FURI_LOG_W(TAG, "Skipping start in special boot mode");
ble_glue_wait_for_c2_start(FURI_HAL_BT_C2_START_TIMEOUT);
furi_record_create(RECORD_BT, bt);
furi_thread_suspend(furi_thread_get_current_id());
return 0;
}

View file

@ -1,7 +1,7 @@
#include "cli_i.h" // IWYU pragma: keep
#include <furi_hal_usb_cdc.h>
#include <furi_hal.h>
#include <furi.h>
#include "cli_i.h"
#define TAG "CliVcp"

View file

@ -8,7 +8,6 @@
#include "animation_manager.h"
#include "animation_storage.h"
#include "animation_storage_i.h"
#include <assets_dolphin_internal.h>
#include <assets_dolphin_blocking.h>

View file

@ -1,6 +1,5 @@
#include "../animation_manager.h"
#include "../animation_storage.h"
#include "bubble_animation_view.h"
#include <furi_hal.h>

View file

@ -442,6 +442,8 @@ int32_t desktop_srv(void* p) {
if(furi_hal_rtc_get_boot_mode() != FuriHalRtcBootModeNormal) {
FURI_LOG_W(TAG, "Skipping start in special boot mode");
furi_thread_suspend(furi_thread_get_current_id());
return 0;
}

View file

@ -7,8 +7,6 @@
#include <furi_hal.h>
#include <gui/gui.h>
#include "../desktop_i.h"
static const NotificationSequence sequence_pin_fail = {
&message_display_backlight_on,

View file

@ -8,9 +8,7 @@
#include "../desktop_i.h"
#include <desktop/desktop_settings.h>
#include "../views/desktop_view_lock_menu.h"
#include "desktop_scene_i.h"
#include "desktop_scene.h"
#include "../helpers/pin.h"
#define TAG "DesktopSceneLock"

View file

@ -9,7 +9,6 @@
#include "../helpers/pin.h"
#include "../animations/animation_manager.h"
#include "../views/desktop_events.h"
#include "../views/desktop_view_pin_input.h"
#include "../views/desktop_view_locked.h"
#include "desktop_scene.h"
#include "desktop_scene_i.h"

View file

@ -8,7 +8,6 @@
#include "../views/desktop_events.h"
#include "../views/desktop_view_main.h"
#include "desktop_scene.h"
#include "desktop_scene_i.h"
#define TAG "DesktopSrv"

View file

@ -8,12 +8,10 @@
#include "../desktop.h"
#include "../desktop_i.h"
#include "../animations/animation_manager.h"
#include "../views/desktop_events.h"
#include "../views/desktop_view_pin_input.h"
#include "../helpers/pin.h"
#include "desktop_scene.h"
#include "desktop_scene_i.h"
#define WRONG_PIN_HEADER_TIMEOUT 3000
#define INPUT_PIN_VIEW_TIMEOUT 15000

View file

@ -1,11 +1,9 @@
#include <furi.h>
#include <FreeRTOS.h>
#include <gui/scene_manager.h>
#include "../desktop_i.h"
#include "../views/desktop_view_pin_timeout.h"
#include "desktop_scene.h"
#include "desktop_scene_i.h"
static void desktop_scene_pin_timeout_callback(void* context) {
Desktop* desktop = (Desktop*)context;

View file

@ -126,7 +126,7 @@ bool desktop_lock_menu_input_callback(InputEvent* event, void* context) {
update);
if(event->key == InputKeyOk) {
if((idx == DesktopLockMenuIndexLock)) {
if(idx == DesktopLockMenuIndexLock) {
if(event->type == InputTypeShort) {
lock_menu->callback(DesktopLockMenuEventLock, lock_menu->context);
}

View file

@ -6,7 +6,6 @@
#include <input/input.h>
#include <dolphin/dolphin.h>
#include "../desktop_i.h"
#include "desktop_view_main.h"
struct DesktopMainView {

View file

@ -2,7 +2,6 @@
#include <furi.h>
#include <stdint.h>
#include <stdio.h>
#include <FreeRTOS.h>
#include <projdefs.h>
#include <input/input.h>
#include <gui/canvas.h>

View file

@ -3,9 +3,7 @@
#include <gui/elements.h>
#include "desktop_view_slideshow.h"
#include "../desktop_i.h"
#include "../helpers/slideshow.h"
#include "../helpers/slideshow_filename.h"
#define DESKTOP_SLIDESHOW_POWEROFF_SHORT 5000
#define DESKTOP_SLIDESHOW_POWEROFF_LONG (60 * 60 * 1000)

View file

@ -4,6 +4,7 @@
#include "desktop_events.h"
#include "../helpers/slideshow_filename.h"
#include <storage/storage.h>
#define SLIDESHOW_FS_PATH INT_PATH(SLIDESHOW_FILE_NAME)

View file

@ -1,5 +1,4 @@
#include "dialogs/dialogs_message.h"
#include "dialogs_i.h"
#include <toolbox/api_lock.h>
#include "dialogs_module_file_browser.h"
#include "dialogs_module_message.h"

View file

@ -1,5 +1,4 @@
#include "dialogs_message.h"
#include "dialogs_i.h"
#include <toolbox/api_lock.h>
#include <assets_icons.h>
#include <storage/storage.h>

View file

@ -1,5 +1,4 @@
#include "dialogs_i.h"
#include "dialogs_message.h"
#include <gui/modules/file_browser.h>
#include <toolbox/api_lock.h>

View file

@ -1,4 +1,6 @@
#include "dialogs_i.h"
#include "dialogs.h"
#include "dialogs_message.h"
#include <gui/view_holder.h>
#include <toolbox/api_lock.h>
#include <gui/modules/dialog_ex.h>

View file

@ -1,7 +1,6 @@
#include "dolphin/dolphin.h"
#include "dolphin/helpers/dolphin_state.h"
#include "dolphin.h"
#include "helpers/dolphin_state.h"
#include "dolphin_i.h"
#include "projdefs.h"
#include <furi_hal.h>
#include <stdint.h>
#include <furi.h>
@ -149,6 +148,8 @@ int32_t dolphin_srv(void* p) {
if(furi_hal_rtc_get_boot_mode() != FuriHalRtcBootModeNormal) {
FURI_LOG_W(TAG, "Skipping start in special boot mode");
furi_thread_suspend(furi_thread_get_current_id());
return 0;
}

View file

@ -6,7 +6,6 @@
#include <storage/storage.h>
#include <furi.h>
#include <furi_hal.h>
#include <math.h>
#include <toolbox/saved_struct.h>
#define TAG "DolphinState"

View file

@ -9,7 +9,6 @@
#include <gui/icon_animation_i.h>
#include <furi.h>
#include "canvas_i.h"
#include <math.h>
#include <string.h>

View file

@ -1,5 +1,5 @@
#include "icon.h"
#include "icon_i.h"
#include "icon_i.h" // IWYU pragma: keep
#include <furi.h>
#include <furi.h>

View file

@ -1,5 +1,5 @@
#include "icon_animation_i.h"
#include "icon_i.h"
#include "icon_i.h" // IWYU pragma: keep
#include <furi.h>

View file

@ -39,7 +39,7 @@ typedef struct ButtonItem {
void* callback_context;
} ButtonItem;
ARRAY_DEF(ButtonArray, ButtonItem*, M_PTR_OPLIST);
ARRAY_DEF(ButtonArray, ButtonItem*, M_PTR_OPLIST); // NOLINT
#define M_OPL_ButtonArray_t() ARRAY_OPLIST(ButtonArray, M_PTR_OPLIST)
ARRAY_DEF(ButtonMatrix, ButtonArray_t);
#define M_OPL_ButtonMatrix_t() ARRAY_OPLIST(ButtonMatrix, M_OPL_ButtonArray_t())

View file

@ -3,7 +3,7 @@
#include <furi.h>
#include <m-array.h>
ARRAY_DEF(ElementArray, WidgetElement*, M_PTR_OPLIST);
ARRAY_DEF(ElementArray, WidgetElement*, M_PTR_OPLIST); // NOLINT
struct Widget {
View* view;

View file

@ -1,7 +1,6 @@
#include <furi.h>
#include <furi_hal.h>
#include "notification.h"
#include "notification_messages.h"
#include "notification_app.h"
void notification_message(NotificationApp* app, const NotificationSequence* sequence) {

View file

@ -393,6 +393,8 @@ int32_t power_srv(void* p) {
if(furi_hal_rtc_get_boot_mode() != FuriHalRtcBootModeNormal) {
FURI_LOG_W(TAG, "Skipping start in special boot mode");
furi_thread_suspend(furi_thread_get_current_id());
return 0;
}

View file

@ -1,4 +1,3 @@
#include "profiles/serial_profile.h"
#include "rpc_i.h"
#include <pb.h>

View file

@ -1,7 +1,6 @@
#include "flipper.pb.h"
#include "rpc_i.h"
#include <desktop/desktop.h>
#include "desktop.pb.h"
#define TAG "RpcDesktop"

View file

@ -1,7 +1,7 @@
#include <core/log.h>
#include <core/record.h>
#include "storage.h"
#include "storage_i.h"
#include "storage_i.h" // IWYU pragma: keep
#include "storage_message.h"
#include <toolbox/stream/file_stream.h>
#include <toolbox/dir_walk.h>

View file

@ -1,4 +1,3 @@
#include <stdint.h>
#include <core/check.h>
#include <gui/scene_manager.h>
#include <gui/modules/popup.h>

View file

@ -1,7 +1,6 @@
#include <furi.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>
#include <stdint.h>
#include <gui/scene_manager.h>
#include <gui/view_dispatcher.h>

View file

@ -1,6 +1,5 @@
#include <furi.h>
#include <gui/scene_manager.h>
#include <stdint.h>
#include "desktop_settings_scene.h"
#include "../desktop_settings_app.h"

Some files were not shown because too many files have changed in this diff Show more