mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
cleanup of various warnings from clangd (#3682)
* cleanup of various warnings from clangs * lfrfid_debug: cast fixes * subghz: binraw: round->roundf * furi: thread: updated internal stack size variable to size_t * github: fail faster on unsuccessful build * unit_tests: double trouble
This commit is contained in:
parent
0d4ead8fbd
commit
03196fa110
136 changed files with 127 additions and 196 deletions
4
.clangd
4
.clangd
|
@ -5,6 +5,10 @@ CompileFlags:
|
||||||
Remove:
|
Remove:
|
||||||
- -mword-relocations
|
- -mword-relocations
|
||||||
|
|
||||||
|
Diagnostics:
|
||||||
|
ClangTidy:
|
||||||
|
FastCheckFilter: None
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
If:
|
If:
|
||||||
|
|
2
.github/workflows/unit_tests.yml
vendored
2
.github/workflows/unit_tests.yml
vendored
|
@ -64,6 +64,6 @@ jobs:
|
||||||
python3 scripts/testing/units.py ${{steps.device.outputs.flipper}}
|
python3 scripts/testing/units.py ${{steps.device.outputs.flipper}}
|
||||||
|
|
||||||
- name: 'Check GDB output'
|
- name: 'Check GDB output'
|
||||||
if: failure()
|
if: failure() && steps.flashing.outcome == 'success'
|
||||||
run: |
|
run: |
|
||||||
./fbt gdb_trace_all SWD_TRANSPORT_SERIAL=2A0906016415303030303032 LIB_DEBUG=1 FIRMWARE_APP_SET=unit_tests FORCE=1
|
./fbt gdb_trace_all SWD_TRANSPORT_SERIAL=2A0906016415303030303032 LIB_DEBUG=1 FIRMWARE_APP_SET=unit_tests FORCE=1
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "../accessor_app.h"
|
#include "../accessor_app.h"
|
||||||
#include "../accessor_view_manager.h"
|
#include "../accessor_view_manager.h"
|
||||||
#include "../accessor_event.h"
|
#include "../accessor_event.h"
|
||||||
#include "callback_connector.h"
|
|
||||||
#include "accessor_scene_start.h"
|
#include "accessor_scene_start.h"
|
||||||
|
|
||||||
void AccessorSceneStart::on_enter(AccessorApp* app) {
|
void AccessorSceneStart::on_enter(AccessorApp* app) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ static void draw_battery(Canvas* canvas, BatteryInfoModel* data, int x, int y) {
|
||||||
drain_current > HIGH_DRAIN_CURRENT_THRESHOLD ? "mA!" : "mA");
|
drain_current > HIGH_DRAIN_CURRENT_THRESHOLD ? "mA!" : "mA");
|
||||||
} else if(drain_current != 0) {
|
} else if(drain_current != 0) {
|
||||||
snprintf(header, 20, "...");
|
snprintf(header, 20, "...");
|
||||||
} else if(data->charging_voltage < 4.2) {
|
} else if(data->charging_voltage < 4.2f) {
|
||||||
// Non-default battery charging limit, mention it
|
// Non-default battery charging limit, mention it
|
||||||
snprintf(emote, sizeof(emote), "Charged!");
|
snprintf(emote, sizeof(emote), "Charged!");
|
||||||
snprintf(header, sizeof(header), "Limited to");
|
snprintf(header, sizeof(header), "Limited to");
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#include "display_test.h"
|
|
||||||
|
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
#pragma once
|
|
|
@ -34,8 +34,8 @@ static void lfrfid_debug_view_tune_draw_callback(Canvas* canvas, void* _model) {
|
||||||
canvas_set_color(canvas, ColorBlack);
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
|
||||||
char buffer[TEMP_STR_LEN + 1];
|
char buffer[TEMP_STR_LEN + 1];
|
||||||
double freq = ((float)SystemCoreClock / ((float)model->ARR + 1));
|
double freq = ((double)SystemCoreClock / (model->ARR + 1));
|
||||||
double duty = ((float)model->CCR + 1) / ((float)model->ARR + 1) * 100.0f;
|
double duty = (double)((model->CCR + 1) * 100) / (model->ARR + 1);
|
||||||
snprintf(
|
snprintf(
|
||||||
buffer,
|
buffer,
|
||||||
TEMP_STR_LEN,
|
TEMP_STR_LEN,
|
||||||
|
|
|
@ -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
|
// Generate scene on_enter handlers array
|
||||||
#define ADD_SCENE(prefix, name, id) prefix##_scene_##name##_on_enter,
|
#define ADD_SCENE(prefix, name, id) prefix##_scene_##name##_on_enter,
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#include "subghz_test_app_i.h"
|
|
||||||
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
|
|
||||||
#define TAG "SubGhzTest"
|
#define TAG "SubGhzTest"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "subghz_test_carrier.h"
|
#include "subghz_test_carrier.h"
|
||||||
#include "../subghz_test_app_i.h"
|
|
||||||
#include "../helpers/subghz_test_frequency.h"
|
#include "../helpers/subghz_test_frequency.h"
|
||||||
#include <lib/subghz/devices/cc1101_configs.h>
|
#include <lib/subghz/devices/cc1101_configs.h>
|
||||||
|
|
||||||
|
@ -74,7 +73,7 @@ void subghz_test_carrier_draw(Canvas* canvas, SubGhzTestCarrierModel* model) {
|
||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
"RSSI: %ld.%ld dBm",
|
"RSSI: %ld.%ld dBm",
|
||||||
(int32_t)(model->rssi),
|
(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);
|
canvas_draw_str(canvas, 0, 42, buffer);
|
||||||
} else {
|
} else {
|
||||||
canvas_draw_str(canvas, 0, 42, "TX");
|
canvas_draw_str(canvas, 0, 42, "TX");
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "subghz_test_packet.h"
|
#include "subghz_test_packet.h"
|
||||||
#include "../subghz_test_app_i.h"
|
|
||||||
#include "../helpers/subghz_test_frequency.h"
|
#include "../helpers/subghz_test_frequency.h"
|
||||||
#include <lib/subghz/devices/cc1101_configs.h>
|
#include <lib/subghz/devices/cc1101_configs.h>
|
||||||
|
|
||||||
|
@ -123,7 +122,7 @@ static void subghz_test_packet_draw(Canvas* canvas, SubGhzTestPacketModel* model
|
||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
"RSSI: %ld.%ld dBm",
|
"RSSI: %ld.%ld dBm",
|
||||||
(int32_t)(model->rssi),
|
(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);
|
canvas_draw_str(canvas, 0, 53, buffer);
|
||||||
} else {
|
} else {
|
||||||
canvas_draw_str(canvas, 0, 53, "TX");
|
canvas_draw_str(canvas, 0, 53, "TX");
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#include "subghz_test_static.h"
|
#include "subghz_test_static.h"
|
||||||
#include "../subghz_test_app_i.h"
|
|
||||||
#include "../helpers/subghz_test_frequency.h"
|
#include "../helpers/subghz_test_frequency.h"
|
||||||
#include <lib/subghz/devices/cc1101_configs.h>
|
#include <lib/subghz/devices/cc1101_configs.h>
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <input/input.h>
|
#include <input/input.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
#include <bit_lib/bit_lib.h>
|
#include <bit_lib/bit_lib.h>
|
||||||
|
|
||||||
MU_TEST(test_bit_lib_increment_index) {
|
MU_TEST(test_bit_lib_increment_index) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#include <bt/bt_service/bt_keys_storage.h>
|
#include <bt/bt_service/bt_keys_storage.h>
|
||||||
#include <storage/storage.h>
|
#include <storage/storage.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#include <toolbox/compress.h>
|
#include <toolbox/compress.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#include <datetime/datetime.h>
|
#include <datetime/datetime.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <dialogs/dialogs.h>
|
#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_TEST(test_dialog_file_browser_set_basic_options_should_init_all_fields) {
|
||||||
mu_assert(
|
mu_assert(
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <m-dict.h>
|
#include <m-dict.h>
|
||||||
#include <toolbox/dir_walk.h>
|
#include <toolbox/dir_walk.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal_random.h>
|
#include <furi_hal_random.h>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <flipper_format/flipper_format.h>
|
#include <flipper_format/flipper_format.h>
|
||||||
#include <flipper_format/flipper_format_i.h>
|
#include <flipper_format/flipper_format_i.h>
|
||||||
#include <toolbox/stream/stream.h>
|
#include <toolbox/stream/stream.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#define TEST_DIR TEST_DIR_NAME "/"
|
#define TEST_DIR TEST_DIR_NAME "/"
|
||||||
#define TEST_DIR_NAME EXT_PATH("unit_tests_tmp")
|
#define TEST_DIR_NAME EXT_PATH("unit_tests_tmp")
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <flipper_format/flipper_format_i.h>
|
#include <flipper_format/flipper_format_i.h>
|
||||||
#include <toolbox/stream/stream.h>
|
#include <toolbox/stream/stream.h>
|
||||||
#include <storage/storage.h>
|
#include <storage/storage.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
static const char* test_filetype = "Flipper Format test";
|
static const char* test_filetype = "Flipper Format test";
|
||||||
static const uint32_t test_version = 666;
|
static const uint32_t test_version = 666;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <float_tools.h>
|
#include <float_tools.h>
|
||||||
|
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
MU_TEST(float_tools_equal_test) {
|
MU_TEST(float_tools_equal_test) {
|
||||||
mu_check(float_is_equal(FLT_MAX, FLT_MAX));
|
mu_check(float_is_equal(FLT_MAX, FLT_MAX));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
const uint32_t context_value = 0xdeadbeef;
|
const uint32_t context_value = 0xdeadbeef;
|
||||||
const uint32_t notify_value_0 = 0x12345678;
|
const uint32_t notify_value_0 = 0x12345678;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#define TEST_RECORD_NAME "test/holding"
|
#define TEST_RECORD_NAME "test/holding"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include <stdio.h>
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
// v2 tests
|
// v2 tests
|
||||||
void test_furi_create_open(void);
|
void test_furi_create_open(void);
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
#include "furi_hal_rtc.h"
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <lp5562_reg.h>
|
#include <lp5562_reg.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#define DATA_SIZE 4
|
#define DATA_SIZE 4
|
||||||
#define EEPROM_ADDRESS 0b10101000
|
#define EEPROM_ADDRESS 0b10101000
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include <stdio.h>
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
static const uint8_t key_ctr_1[32] = {
|
static const uint8_t key_ctr_1[32] = {
|
||||||
0x77, 0x6B, 0xEF, 0xF2, 0x85, 0x1D, 0xB0, 0x6F, 0x4C, 0x8A, 0x05, 0x42, 0xC8, 0x69, 0x6F, 0x6C,
|
0x77, 0x6B, 0xEF, 0xF2, 0x85, 0x1D, 0xB0, 0x6F, 0x4C, 0x8A, 0x05, 0x42, 0xC8, 0x69, 0x6F, 0x6C,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
static void test_setup(void) {
|
static void test_setup(void) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <flipper_format.h>
|
#include <flipper_format.h>
|
||||||
#include <infrared.h>
|
#include <infrared.h>
|
||||||
#include <common/infrared_common_i.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_FILES_DIR EXT_PATH("unit_tests/infrared/")
|
||||||
#define IR_TEST_FILE_PREFIX "test_"
|
#define IR_TEST_FILE_PREFIX "test_"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
#include <toolbox/protocols/protocol_dict.h>
|
#include <toolbox/protocols/protocol_dict.h>
|
||||||
#include <lfrfid/protocols/lfrfid_protocols.h>
|
#include <lfrfid/protocols/lfrfid_protocols.h>
|
||||||
#include <toolbox/pulse_protocols/pulse_glue.h>
|
#include <toolbox/pulse_protocols/pulse_glue.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <furi.c>
|
#include <furi.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
#include <update_util/resources/manifest.h>
|
#include <update_util/resources/manifest.h>
|
||||||
|
|
||||||
#define TAG "Manifest"
|
#define TAG "Manifest"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <toolbox/keys_dict.h>
|
#include <toolbox/keys_dict.h>
|
||||||
#include <nfc/nfc.h>
|
#include <nfc/nfc.h>
|
||||||
|
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#define TAG "NfcTest"
|
#define TAG "NfcTest"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
static void power_test_deinit(void) {
|
static void power_test_deinit(void) {
|
||||||
// Try to reset to default charge voltage limit
|
// 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.
|
// 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) {
|
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);
|
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) {
|
MU_TEST(test_power_charge_voltage_limit_floating_imprecision) {
|
||||||
// 4.016f should act as 4.016 V, even with floating point imprecision
|
// 4.016f should act as 4.016 V, even with floating point imprecision
|
||||||
furi_hal_power_set_battery_charge_voltage_limit(4.016f);
|
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) {
|
MU_TEST(test_power_charge_voltage_limit_inexact) {
|
||||||
// Charge voltage limits that are not power of 16mV get truncated down
|
// Charge voltage limits that are not power of 16mV get truncated down
|
||||||
furi_hal_power_set_battery_charge_voltage_limit(3.841f);
|
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);
|
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);
|
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) {
|
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
|
// 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);
|
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);
|
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
|
// NOTE: Intentionally picking a small increment above 4.208 V to reduce the risk of an
|
||||||
// unhappy battery if this fails.
|
// unhappy battery if this fails.
|
||||||
furi_hal_power_set_battery_charge_voltage_limit(4.240f);
|
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
|
// Likewise, picking a number that the uint8_t wraparound in the driver would result in a
|
||||||
// VREG value under 23 if this test fails.
|
// VREG value under 23 if this test fails.
|
||||||
// E.g. (uint8_t)((8105-3840)/16) -> 10
|
// E.g. (uint8_t)((8105-3840)/16) -> 10
|
||||||
furi_hal_power_set_battery_charge_voltage_limit(8.105f);
|
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) {
|
MU_TEST_SUITE(test_power_suite) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
#include <toolbox/protocols/protocol_dict.h>
|
#include <toolbox/protocols/protocol_dict.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <lib/toolbox/path.h>
|
#include <lib/toolbox/path.h>
|
||||||
|
|
||||||
#include <m-list.h>
|
#include <m-list.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#include <protobuf_version.h>
|
#include <protobuf_version.h>
|
||||||
#include <pb.h>
|
#include <pb.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <storage/storage.h>
|
#include <storage/storage.h>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <toolbox/stream/file_stream.h>
|
#include <toolbox/stream/file_stream.h>
|
||||||
#include <toolbox/stream/buffered_file_stream.h>
|
#include <toolbox/stream/buffered_file_stream.h>
|
||||||
#include <storage/storage.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, "
|
static const char* stream_test_data = "I write differently from what I speak, "
|
||||||
"I speak differently from what I think, "
|
"I speak differently from what I think, "
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
#include <lib/subghz/receiver.h>
|
#include <lib/subghz/receiver.h>
|
||||||
#include <lib/subghz/transmitter.h>
|
#include <lib/subghz/transmitter.h>
|
||||||
#include <lib/subghz/subghz_keystore.h>
|
#include <lib/subghz/subghz_keystore.h>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
|
|
||||||
#include "../test.h"
|
#include "../test.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#include <toolbox/varint.h>
|
#include <toolbox/varint.h>
|
||||||
#include <toolbox/profiler.h>
|
#include <toolbox/profiler.h>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#include "archive_files.h"
|
|
||||||
#include "archive_apps.h"
|
#include "archive_apps.h"
|
||||||
#include "archive_browser.h"
|
#include "archive_browser.h"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include <core/log.h>
|
#include <core/log.h>
|
||||||
#include <gui/modules/file_browser_worker.h>
|
#include <gui/modules/file_browser_worker.h>
|
||||||
#include <flipper_application/flipper_application.h>
|
#include <flipper_application/flipper_application.h>
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
archive_folder_open_cb(void* context, uint32_t item_cnt, int32_t file_idx, bool is_root) {
|
archive_folder_open_cb(void* context, uint32_t item_cnt, int32_t file_idx, bool is_root) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "../archive_i.h"
|
#include "../archive_i.h"
|
||||||
#include "../helpers/archive_files.h"
|
#include "../helpers/archive_files.h"
|
||||||
#include "../helpers/archive_apps.h"
|
|
||||||
#include "../helpers/archive_favorites.h"
|
#include "../helpers/archive_favorites.h"
|
||||||
#include "../helpers/archive_browser.h"
|
#include "../helpers/archive_browser.h"
|
||||||
#include "../views/archive_browser_view.h"
|
#include "../views/archive_browser_view.h"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "../archive_i.h"
|
#include "../archive_i.h"
|
||||||
#include "../helpers/archive_favorites.h"
|
|
||||||
#include "../helpers/archive_files.h"
|
#include "../helpers/archive_files.h"
|
||||||
#include "../helpers/archive_apps.h"
|
#include "../helpers/archive_apps.h"
|
||||||
#include "../helpers/archive_browser.h"
|
#include "../helpers/archive_browser.h"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "assets_icons.h"
|
#include "assets_icons.h"
|
||||||
#include "toolbox/path.h"
|
#include "toolbox/path.h"
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "../archive_i.h"
|
|
||||||
#include "archive_browser_view.h"
|
#include "archive_browser_view.h"
|
||||||
#include "../helpers/archive_browser.h"
|
#include "../helpers/archive_browser.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "../bad_usb_app_i.h"
|
#include "../bad_usb_app_i.h"
|
||||||
#include "furi_hal_power.h"
|
|
||||||
|
|
||||||
enum SubmenuIndex {
|
enum SubmenuIndex {
|
||||||
ConfigIndexKeyboardLayout,
|
ConfigIndexKeyboardLayout,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "../bad_usb_app_i.h"
|
#include "../bad_usb_app_i.h"
|
||||||
#include "furi_hal_power.h"
|
|
||||||
#include <storage/storage.h>
|
#include <storage/storage.h>
|
||||||
|
|
||||||
static bool bad_usb_layout_select(BadUsbApp* bad_usb) {
|
static bool bad_usb_layout_select(BadUsbApp* bad_usb) {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
#include "gpio_usb_uart.h"
|
||||||
#include "../usb_uart_bridge.h"
|
#include "../usb_uart_bridge.h"
|
||||||
#include "../gpio_app_i.h"
|
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <gui/elements.h>
|
#include <gui/elements.h>
|
||||||
|
#include <assets_icons.h>
|
||||||
|
|
||||||
struct GpioUsbUart {
|
struct GpioUsbUart {
|
||||||
View* view;
|
View* view;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../infrared_app_i.h"
|
#include "../infrared_app_i.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#include "common/infrared_scene_universal_common.h"
|
#include "common/infrared_scene_universal_common.h"
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ bool nfc_scene_read_on_event_mf_ultralight(NfcApp* instance, SceneManagerEvent e
|
||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
if(event.event == NfcCustomEventCardDetected) {
|
if(event.event == NfcCustomEventCardDetected) {
|
||||||
nfc_unlock_helper_card_detected_handler(instance);
|
nfc_unlock_helper_card_detected_handler(instance);
|
||||||
} else if((event.event == NfcCustomEventPollerIncomplete)) {
|
} else if(event.event == NfcCustomEventPollerIncomplete) {
|
||||||
notification_message(instance->notifications, &sequence_semi_success);
|
notification_message(instance->notifications, &sequence_semi_success);
|
||||||
scene_manager_next_scene(instance->scene_manager, NfcSceneReadSuccess);
|
scene_manager_next_scene(instance->scene_manager, NfcSceneReadSuccess);
|
||||||
dolphin_deed(DolphinDeedNfcReadSuccess);
|
dolphin_deed(DolphinDeedNfcReadSuccess);
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include <bit_lib/bit_lib.h>
|
#include <bit_lib/bit_lib.h>
|
||||||
#include <nfc/protocols/mf_classic/mf_classic_poller_sync.h>
|
#include <nfc/protocols/mf_classic/mf_classic_poller_sync.h>
|
||||||
#include "../../api/mosgortrans/mosgortrans_util.h"
|
#include "../../api/mosgortrans/mosgortrans_util.h"
|
||||||
#include "furi_hal_rtc.h"
|
|
||||||
|
|
||||||
#define TAG "Troika"
|
#define TAG "Troika"
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ static uint32_t subghz_frequency_analyzer_worker_expRunningAverageAdaptive(
|
||||||
float k;
|
float k;
|
||||||
float newValFloat = newVal;
|
float newValFloat = newVal;
|
||||||
// the sharpness of the filter depends on the absolute value of the difference
|
// 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;
|
k = 0.9;
|
||||||
else
|
else
|
||||||
k = 0.03;
|
k = 0.03;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "subghz_threshold_rssi.h"
|
#include "subghz_threshold_rssi.h"
|
||||||
|
#include "../views/subghz_read_raw.h"
|
||||||
#include <float_tools.h>
|
#include <float_tools.h>
|
||||||
#include "../subghz_i.h"
|
|
||||||
|
|
||||||
#define TAG "SubGhzThresholdRssi"
|
#define TAG "SubGhzThresholdRssi"
|
||||||
#define THRESHOLD_RSSI_LOW_COUNT 10
|
#define THRESHOLD_RSSI_LOW_COUNT 10
|
||||||
|
|
|
@ -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 <lib/subghz/protocols/protocol_items.h>
|
||||||
#include <applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h>
|
#include <applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h>
|
||||||
|
|
|
@ -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 "subghz_txrx_create_protocol_key.h"
|
||||||
#include <lib/subghz/transmitter.h>
|
#include <lib/subghz/transmitter.h>
|
||||||
#include <lib/subghz/protocols/protocol_items.h>
|
#include <lib/subghz/protocols/protocol_items.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../subghz_i.h"
|
#include "../subghz_i.h" // IWYU pragma: keep
|
||||||
#include "../helpers/subghz_custom_event.h"
|
#include "../helpers/subghz_custom_event.h"
|
||||||
|
|
||||||
void subghz_scene_delete_success_popup_callback(void* context) {
|
void subghz_scene_delete_success_popup_callback(void* context) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../subghz_i.h"
|
#include "../subghz_i.h" // IWYU pragma: keep
|
||||||
#include "../views/subghz_frequency_analyzer.h"
|
#include "../views/subghz_frequency_analyzer.h"
|
||||||
|
|
||||||
void subghz_scene_frequency_analyzer_callback(SubGhzCustomEvent event, void* context) {
|
void subghz_scene_frequency_analyzer_callback(SubGhzCustomEvent event, void* context) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../subghz_i.h"
|
#include "../subghz_i.h" // IWYU pragma: keep
|
||||||
#include <lib/toolbox/value_index.h>
|
#include <lib/toolbox/value_index.h>
|
||||||
#include <applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h>
|
#include <applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h>
|
||||||
#include <lib/subghz/devices/cc1101_int/cc1101_int_interconnect.h>
|
#include <lib/subghz/devices/cc1101_int/cc1101_int_interconnect.h>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include "../views/subghz_read_raw.h"
|
#include "../views/subghz_read_raw.h"
|
||||||
#include <dolphin/dolphin.h>
|
#include <dolphin/dolphin.h>
|
||||||
#include <lib/subghz/protocols/raw.h>
|
#include <lib/subghz/protocols/raw.h>
|
||||||
#include <lib/toolbox/path.h>
|
#include <toolbox/path.h>
|
||||||
|
|
||||||
#define RAW_FILE_NAME "Raw_signal_"
|
#define RAW_FILE_NAME "Raw_signal_"
|
||||||
#define TAG "SubGhzSceneReadRaw"
|
#define TAG "SubGhzSceneReadRaw"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../subghz_i.h"
|
#include "../subghz_i.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#include <furi_hal_region.h>
|
#include <furi_hal_region.h>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../subghz_i.h"
|
#include "../subghz_i.h" // IWYU pragma: keep
|
||||||
|
|
||||||
enum SubmenuIndex {
|
enum SubmenuIndex {
|
||||||
SubmenuIndexEmulate,
|
SubmenuIndexEmulate,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../subghz_i.h"
|
#include "../subghz_i.h" // IWYU pragma: keep
|
||||||
#include "../helpers/subghz_custom_event.h"
|
#include "../helpers/subghz_custom_event.h"
|
||||||
|
|
||||||
static const NotificationSequence subghs_sequence_sd_error = {
|
static const NotificationSequence subghs_sequence_sd_error = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../subghz_i.h"
|
#include "../subghz_i.h" // IWYU pragma: keep
|
||||||
#include "../helpers/subghz_custom_event.h"
|
#include "../helpers/subghz_custom_event.h"
|
||||||
|
|
||||||
void subghz_scene_show_error_sub_popup_callback(void* context) {
|
void subghz_scene_show_error_sub_popup_callback(void* context) {
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include "assets_icons.h"
|
#include "assets_icons.h"
|
||||||
#include "subghz/types.h"
|
#include "subghz/types.h"
|
||||||
#include <math.h>
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <input/input.h>
|
#include <input/input.h>
|
||||||
|
@ -10,7 +9,6 @@
|
||||||
#include <notification/notification.h>
|
#include <notification/notification.h>
|
||||||
#include <notification/notification_messages.h>
|
#include <notification/notification_messages.h>
|
||||||
#include <flipper_format/flipper_format.h>
|
#include <flipper_format/flipper_format.h>
|
||||||
#include "views/receiver.h"
|
|
||||||
|
|
||||||
#include <flipper_format/flipper_format_i.h>
|
#include <flipper_format/flipper_format_i.h>
|
||||||
#include <lib/toolbox/stream/stream.h>
|
#include <lib/toolbox/stream/stream.h>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "receiver.h"
|
#include "receiver.h"
|
||||||
#include "../subghz_i.h"
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
#include <input/input.h>
|
#include <input/input.h>
|
||||||
#include <gui/elements.h>
|
#include <gui/elements.h>
|
||||||
#include <assets_icons.h>
|
#include <assets_icons.h>
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "subghz_frequency_analyzer.h"
|
#include "subghz_frequency_analyzer.h"
|
||||||
#include "../subghz_i.h"
|
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <input/input.h>
|
#include <input/input.h>
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "subghz_read_raw.h"
|
#include "subghz_read_raw.h"
|
||||||
#include "../subghz_i.h"
|
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <input/input.h>
|
#include <input/input.h>
|
||||||
|
@ -72,7 +70,7 @@ void subghz_read_raw_add_data_rssi(SubGhzReadRAW* instance, float rssi, bool tra
|
||||||
if(rssi < SUBGHZ_RAW_THRESHOLD_MIN) {
|
if(rssi < SUBGHZ_RAW_THRESHOLD_MIN) {
|
||||||
u_rssi = 0;
|
u_rssi = 0;
|
||||||
} else {
|
} 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(
|
with_view_model(
|
||||||
|
@ -272,7 +270,7 @@ void subghz_read_raw_draw_threshold_rssi(Canvas* canvas, SubGhzReadRAWModel* mod
|
||||||
|
|
||||||
if(model->raw_threshold_rssi > SUBGHZ_RAW_THRESHOLD_MIN) {
|
if(model->raw_threshold_rssi > SUBGHZ_RAW_THRESHOLD_MIN) {
|
||||||
uint8_t x = 118;
|
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;
|
uint8_t width = 3;
|
||||||
for(uint8_t i = 0; i < x; i += width * 2) {
|
for(uint8_t i = 0; i < x; i += width * 2) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "transmitter.h"
|
#include "transmitter.h"
|
||||||
#include "../subghz_i.h"
|
|
||||||
|
|
||||||
|
#include <assets_icons.h>
|
||||||
#include <input/input.h>
|
#include <input/input.h>
|
||||||
#include <gui/elements.h>
|
#include <gui/elements.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "u2f.h"
|
#include "u2f.h"
|
||||||
#include "u2f_hid.h"
|
|
||||||
#include "u2f_data.h"
|
#include "u2f_data.h"
|
||||||
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
#include "cli_i.h" // IWYU pragma: keep
|
||||||
#include <furi_hal_usb_cdc.h>
|
#include <furi_hal_usb_cdc.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "cli_i.h"
|
|
||||||
|
|
||||||
#define TAG "CliVcp"
|
#define TAG "CliVcp"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include "animation_manager.h"
|
#include "animation_manager.h"
|
||||||
#include "animation_storage.h"
|
#include "animation_storage.h"
|
||||||
#include "animation_storage_i.h"
|
|
||||||
#include <assets_dolphin_internal.h>
|
#include <assets_dolphin_internal.h>
|
||||||
#include <assets_dolphin_blocking.h>
|
#include <assets_dolphin_blocking.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
#include "../animation_manager.h"
|
#include "../animation_manager.h"
|
||||||
#include "../animation_storage.h"
|
|
||||||
#include "bubble_animation_view.h"
|
#include "bubble_animation_view.h"
|
||||||
|
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <gui/gui.h>
|
#include <gui/gui.h>
|
||||||
|
|
||||||
#include "../desktop_i.h"
|
|
||||||
|
|
||||||
static const NotificationSequence sequence_pin_fail = {
|
static const NotificationSequence sequence_pin_fail = {
|
||||||
&message_display_backlight_on,
|
&message_display_backlight_on,
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
#include "../desktop_i.h"
|
#include "../desktop_i.h"
|
||||||
#include <desktop/desktop_settings.h>
|
#include <desktop/desktop_settings.h>
|
||||||
#include "../views/desktop_view_lock_menu.h"
|
#include "../views/desktop_view_lock_menu.h"
|
||||||
#include "desktop_scene_i.h"
|
|
||||||
#include "desktop_scene.h"
|
#include "desktop_scene.h"
|
||||||
#include "../helpers/pin.h"
|
|
||||||
|
|
||||||
#define TAG "DesktopSceneLock"
|
#define TAG "DesktopSceneLock"
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include "../helpers/pin.h"
|
#include "../helpers/pin.h"
|
||||||
#include "../animations/animation_manager.h"
|
#include "../animations/animation_manager.h"
|
||||||
#include "../views/desktop_events.h"
|
#include "../views/desktop_events.h"
|
||||||
#include "../views/desktop_view_pin_input.h"
|
|
||||||
#include "../views/desktop_view_locked.h"
|
#include "../views/desktop_view_locked.h"
|
||||||
#include "desktop_scene.h"
|
#include "desktop_scene.h"
|
||||||
#include "desktop_scene_i.h"
|
#include "desktop_scene_i.h"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "../views/desktop_events.h"
|
#include "../views/desktop_events.h"
|
||||||
#include "../views/desktop_view_main.h"
|
#include "../views/desktop_view_main.h"
|
||||||
#include "desktop_scene.h"
|
#include "desktop_scene.h"
|
||||||
#include "desktop_scene_i.h"
|
|
||||||
|
|
||||||
#define TAG "DesktopSrv"
|
#define TAG "DesktopSrv"
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,10 @@
|
||||||
|
|
||||||
#include "../desktop.h"
|
#include "../desktop.h"
|
||||||
#include "../desktop_i.h"
|
#include "../desktop_i.h"
|
||||||
#include "../animations/animation_manager.h"
|
|
||||||
#include "../views/desktop_events.h"
|
#include "../views/desktop_events.h"
|
||||||
#include "../views/desktop_view_pin_input.h"
|
#include "../views/desktop_view_pin_input.h"
|
||||||
#include "../helpers/pin.h"
|
#include "../helpers/pin.h"
|
||||||
#include "desktop_scene.h"
|
#include "desktop_scene.h"
|
||||||
#include "desktop_scene_i.h"
|
|
||||||
|
|
||||||
#define WRONG_PIN_HEADER_TIMEOUT 3000
|
#define WRONG_PIN_HEADER_TIMEOUT 3000
|
||||||
#define INPUT_PIN_VIEW_TIMEOUT 15000
|
#define INPUT_PIN_VIEW_TIMEOUT 15000
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include "../desktop_i.h"
|
#include "../desktop_i.h"
|
||||||
#include "../views/desktop_view_pin_timeout.h"
|
#include "../views/desktop_view_pin_timeout.h"
|
||||||
#include "desktop_scene.h"
|
#include "desktop_scene.h"
|
||||||
#include "desktop_scene_i.h"
|
|
||||||
|
|
||||||
static void desktop_scene_pin_timeout_callback(void* context) {
|
static void desktop_scene_pin_timeout_callback(void* context) {
|
||||||
Desktop* desktop = (Desktop*)context;
|
Desktop* desktop = (Desktop*)context;
|
||||||
|
|
|
@ -126,8 +126,8 @@ bool desktop_lock_menu_input_callback(InputEvent* event, void* context) {
|
||||||
update);
|
update);
|
||||||
|
|
||||||
if(event->key == InputKeyOk) {
|
if(event->key == InputKeyOk) {
|
||||||
if((idx == DesktopLockMenuIndexLock)) {
|
if(idx == DesktopLockMenuIndexLock) {
|
||||||
if((event->type == InputTypeShort)) {
|
if(event->type == InputTypeShort) {
|
||||||
lock_menu->callback(DesktopLockMenuEventLock, lock_menu->context);
|
lock_menu->callback(DesktopLockMenuEventLock, lock_menu->context);
|
||||||
}
|
}
|
||||||
} else if(idx == DesktopLockMenuIndexStealth) {
|
} else if(idx == DesktopLockMenuIndexStealth) {
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include <input/input.h>
|
#include <input/input.h>
|
||||||
#include <dolphin/dolphin.h>
|
#include <dolphin/dolphin.h>
|
||||||
|
|
||||||
#include "../desktop_i.h"
|
|
||||||
#include "desktop_view_main.h"
|
#include "desktop_view_main.h"
|
||||||
|
|
||||||
struct DesktopMainView {
|
struct DesktopMainView {
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
#include <gui/elements.h>
|
#include <gui/elements.h>
|
||||||
|
|
||||||
#include "desktop_view_slideshow.h"
|
#include "desktop_view_slideshow.h"
|
||||||
#include "../desktop_i.h"
|
|
||||||
#include "../helpers/slideshow.h"
|
#include "../helpers/slideshow.h"
|
||||||
#include "../helpers/slideshow_filename.h"
|
|
||||||
|
|
||||||
#define DESKTOP_SLIDESHOW_POWEROFF_SHORT 5000
|
#define DESKTOP_SLIDESHOW_POWEROFF_SHORT 5000
|
||||||
#define DESKTOP_SLIDESHOW_POWEROFF_LONG (60 * 60 * 1000)
|
#define DESKTOP_SLIDESHOW_POWEROFF_LONG (60 * 60 * 1000)
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "desktop_events.h"
|
#include "desktop_events.h"
|
||||||
#include "../helpers/slideshow_filename.h"
|
#include "../helpers/slideshow_filename.h"
|
||||||
|
#include <storage/storage.h>
|
||||||
|
|
||||||
#define SLIDESHOW_FS_PATH INT_PATH(SLIDESHOW_FILE_NAME)
|
#define SLIDESHOW_FS_PATH INT_PATH(SLIDESHOW_FILE_NAME)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "dialogs/dialogs_message.h"
|
#include "dialogs/dialogs_message.h"
|
||||||
#include "dialogs_i.h"
|
|
||||||
#include <toolbox/api_lock.h>
|
#include <toolbox/api_lock.h>
|
||||||
#include "dialogs_module_file_browser.h"
|
#include "dialogs_module_file_browser.h"
|
||||||
#include "dialogs_module_message.h"
|
#include "dialogs_module_message.h"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "dialogs_message.h"
|
#include "dialogs_message.h"
|
||||||
#include "dialogs_i.h"
|
|
||||||
#include <toolbox/api_lock.h>
|
#include <toolbox/api_lock.h>
|
||||||
#include <assets_icons.h>
|
#include <assets_icons.h>
|
||||||
#include <storage/storage.h>
|
#include <storage/storage.h>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "dialogs_i.h"
|
#include "dialogs_message.h"
|
||||||
|
|
||||||
#include <gui/modules/file_browser.h>
|
#include <gui/modules/file_browser.h>
|
||||||
#include <toolbox/api_lock.h>
|
#include <toolbox/api_lock.h>
|
||||||
|
|
||||||
|
|
|
@ -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 <toolbox/api_lock.h>
|
||||||
#include <gui/modules/dialog_ex.h>
|
#include <gui/modules/dialog_ex.h>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "dolphin/dolphin.h"
|
#include "dolphin.h"
|
||||||
#include "dolphin/helpers/dolphin_state.h"
|
#include "helpers/dolphin_state.h"
|
||||||
#include "dolphin_i.h"
|
#include "dolphin_i.h"
|
||||||
#include "projdefs.h"
|
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include <storage/storage.h>
|
#include <storage/storage.h>
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include <math.h>
|
|
||||||
#include <toolbox/saved_struct.h>
|
#include <toolbox/saved_struct.h>
|
||||||
|
|
||||||
#define TAG "DolphinState"
|
#define TAG "DolphinState"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include <gui/icon_animation_i.h>
|
#include <gui/icon_animation_i.h>
|
||||||
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include "canvas_i.h"
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "icon.h"
|
#include "icon.h"
|
||||||
#include "icon_i.h"
|
#include "icon_i.h" // IWYU pragma: keep
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "icon_animation_i.h"
|
#include "icon_animation_i.h"
|
||||||
#include "icon_i.h"
|
#include "icon_i.h" // IWYU pragma: keep
|
||||||
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ typedef struct ButtonItem {
|
||||||
void* callback_context;
|
void* callback_context;
|
||||||
} ButtonItem;
|
} 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)
|
#define M_OPL_ButtonArray_t() ARRAY_OPLIST(ButtonArray, M_PTR_OPLIST)
|
||||||
ARRAY_DEF(ButtonMatrix, ButtonArray_t);
|
ARRAY_DEF(ButtonMatrix, ButtonArray_t);
|
||||||
#define M_OPL_ButtonMatrix_t() ARRAY_OPLIST(ButtonMatrix, M_OPL_ButtonArray_t())
|
#define M_OPL_ButtonMatrix_t() ARRAY_OPLIST(ButtonMatrix, M_OPL_ButtonArray_t())
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <m-array.h>
|
#include <m-array.h>
|
||||||
|
|
||||||
ARRAY_DEF(ElementArray, WidgetElement*, M_PTR_OPLIST);
|
ARRAY_DEF(ElementArray, WidgetElement*, M_PTR_OPLIST); // NOLINT
|
||||||
|
|
||||||
struct Widget {
|
struct Widget {
|
||||||
View* view;
|
View* view;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
#include "notification.h"
|
#include "notification.h"
|
||||||
#include "notification_messages.h"
|
|
||||||
#include "notification_app.h"
|
#include "notification_app.h"
|
||||||
|
|
||||||
void notification_message(NotificationApp* app, const NotificationSequence* sequence) {
|
void notification_message(NotificationApp* app, const NotificationSequence* sequence) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ void power_draw_battery_callback(Canvas* canvas, void* context) {
|
||||||
|
|
||||||
if(power->info.gauge_is_ok) {
|
if(power->info.gauge_is_ok) {
|
||||||
canvas_draw_box(canvas, 2, 2, (power->info.charge + 4) / 5, 4);
|
canvas_draw_box(canvas, 2, 2, (power->info.charge + 4) / 5, 4);
|
||||||
if(power->info.voltage_battery_charge_limit < 4.2) {
|
if(power->info.voltage_battery_charge_limit < 4.2f) {
|
||||||
// Battery charge voltage limit is modified, indicate with cross pattern
|
// Battery charge voltage limit is modified, indicate with cross pattern
|
||||||
canvas_invert_color(canvas);
|
canvas_invert_color(canvas);
|
||||||
uint8_t battery_bar_width = (power->info.charge + 4) / 5;
|
uint8_t battery_bar_width = (power->info.charge + 4) / 5;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#include "profiles/serial_profile.h"
|
|
||||||
#include "rpc_i.h"
|
#include "rpc_i.h"
|
||||||
|
|
||||||
#include <pb.h>
|
#include <pb.h>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "flipper.pb.h"
|
#include "flipper.pb.h"
|
||||||
#include "rpc_i.h"
|
#include "rpc_i.h"
|
||||||
#include <desktop/desktop.h>
|
#include <desktop/desktop.h>
|
||||||
#include "desktop.pb.h"
|
|
||||||
|
|
||||||
#define TAG "RpcDesktop"
|
#define TAG "RpcDesktop"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <core/log.h>
|
#include <core/log.h>
|
||||||
#include <core/record.h>
|
#include <core/record.h>
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
#include "storage_i.h"
|
#include "storage_i.h" // IWYU pragma: keep
|
||||||
#include "storage_message.h"
|
#include "storage_message.h"
|
||||||
#include <toolbox/stream/file_stream.h>
|
#include <toolbox/stream/file_stream.h>
|
||||||
#include <toolbox/dir_walk.h>
|
#include <toolbox/dir_walk.h>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#include <stdint.h>
|
|
||||||
#include <core/check.h>
|
#include <core/check.h>
|
||||||
#include <gui/scene_manager.h>
|
#include <gui/scene_manager.h>
|
||||||
#include <gui/modules/popup.h>
|
#include <gui/modules/popup.h>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <notification/notification.h>
|
#include <notification/notification.h>
|
||||||
#include <notification/notification_messages.h>
|
#include <notification/notification_messages.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <gui/scene_manager.h>
|
#include <gui/scene_manager.h>
|
||||||
#include <gui/view_dispatcher.h>
|
#include <gui/view_dispatcher.h>
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue