Merge branch 'ofwdev' into 420

This commit is contained in:
RogueMaster
2022-10-28 10:39:44 -04:00
79 changed files with 331 additions and 207 deletions
+56
View File
@@ -0,0 +1,56 @@
name: 'Unit tests'
on:
pull_request:
env:
TARGETS: f7
DEFAULT_TARGET: f7
jobs:
main:
runs-on: [self-hosted, FlipperZeroTest]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Get flipper from device manager (mock)'
id: device
run: |
echo "flipper=/dev/ttyACM0" >> $GITHUB_OUTPUT
- name: 'Compile unit tests firmware'
id: compile
continue-on-error: true
run: |
FBT_TOOLCHAIN_PATH=/opt ./fbt flash OPENOCD_ADAPTER_SERIAL=2A0906016415303030303032 FIRMWARE_APP_SET=unit_tests FORCE=1
- name: 'Wait for flipper to finish updating'
id: connect
if: steps.compile.outcome == 'success'
continue-on-error: true
run: |
python3 ./scripts/testing/await_flipper.py ${{steps.device.outputs.flipper}}
- name: 'Format flipper SD card'
id: format
if: steps.connect.outcome == 'success'
continue-on-error: true
run: |
./scripts/storage.py -p ${{steps.device.outputs.flipper}} format_ext
- name: 'Copy unit tests to flipper'
id: copy
if: steps.format.outcome == 'success'
continue-on-error: true
run: |
./scripts/storage.py -p ${{steps.device.outputs.flipper}} send assets/unit_tests /ext/unit_tests
- name: 'Run units and validate results'
if: steps.copy.outcome == 'success'
continue-on-error: true
run: |
python3 ./scripts/testing/units.py ${{steps.device.outputs.flipper}}
@@ -8,4 +8,5 @@ App(
stack_size=2 * 1024,
order=150,
fap_category="Debug",
fap_icon_assets="icons",
)
@@ -1,4 +1,4 @@
#include "assets_icons.h"
#include <file_browser_test_icons.h>
#include "file_browser_app_i.h"
#include "gui/modules/file_browser.h"
#include <furi.h>
Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

@@ -0,0 +1,24 @@
# Application icons
To use icons, do the following:
* add a line to the application manifest: `fap_icon_assets="folder"`, where `folder` points to the folder where your icons are located
* add `#include "application_id_icons.h"` to the application code, where `application_id` is the appid from the manifest
* every icon in the folder will be available as a `I_icon_name` variable, where `icon_name` is the name of the icon file without the extension
## Example
We have an application with the following manifest:
```
App(
appid="example_images",
...
fap_icon_assets="images",
)
```
So the icons are in the `images` folder and will be available in the generated `example_images_icons.h` file.
The example code is located in `example_images_main.c` and contains the following line:
```
#include "example_images_icons.h"
```
Image `dolphin_71x25.png` is available as `I_dolphin_71x25`.
@@ -5,6 +5,7 @@
#include "bad_usb_script.h"
#include <gui/gui.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/submenu.h>
@@ -2,6 +2,7 @@
#include "../bad_usb_script.h"
#include <toolbox/path.h>
#include <gui/elements.h>
#include <assets_icons.h>
#define MAX_NAME_LEN 64
@@ -1,5 +1,6 @@
#include <furi.h>
#include <gui/gui.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <storage/storage.h>
#include <gui/modules/loading.h>
+1
View File
@@ -15,6 +15,7 @@
#include <gui/modules/widget.h>
#include "views/gpio_test.h"
#include "views/gpio_usb_uart.h"
#include <assets_icons.h>
struct GpioApp {
Gui* gui;
+1
View File
@@ -4,6 +4,7 @@
#include <gui/gui.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <notification/notification_messages.h>
+1
View File
@@ -2,6 +2,7 @@
#include <gui/gui.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <gui/view_stack.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
+1
View File
@@ -5,6 +5,7 @@
#include <gui/gui.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <cli/cli.h>
@@ -1,5 +1,6 @@
#include "lfrfid_view_read.h"
#include <gui/elements.h>
#include <assets_icons.h>
#define TEMP_STR_LEN 128
+1
View File
@@ -7,6 +7,7 @@
#include <gui/gui.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <cli/cli.h>
+1 -1
View File
@@ -1,5 +1,5 @@
#include "detect_reader.h"
#include <assets_icons.h>
#include <gui/elements.h>
struct DetectReader {
+1
View File
@@ -14,6 +14,7 @@
#include "views/subghz_test_packet.h"
#endif
#include <gui/gui.h>
#include <assets_icons.h>
#include <dialogs/dialogs.h>
#include <gui/scene_manager.h>
#include <notification/notification_messages.h>
+1
View File
@@ -4,6 +4,7 @@
#include "scenes/u2f_scene.h"
#include <gui/gui.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/submenu.h>
+1
View File
@@ -1,5 +1,6 @@
#include "u2f_view.h"
#include <gui/elements.h>
#include <assets_icons.h>
struct U2fView {
View* view;
Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@@ -11,8 +11,9 @@ App(
provides=["music_player_start"],
stack_size=2 * 1024,
order=45,
fap_icon="../../../assets/icons/Archive/music_10px.png",
fap_icon="icons/music_10px.png",
fap_category="Music",
fap_icon_assets="icons",
)
App(
Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

@@ -3,7 +3,7 @@
#include <furi.h>
#include <furi_hal.h>
#include <assets_icons.h>
#include <music_player_icons.h>
#include <gui/gui.h>
#include <dialogs/dialogs.h>
#include <storage/storage.h>
@@ -17,4 +17,5 @@ App(
name="loclass",
),
],
fap_icon_assets="icons",
)
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -2,6 +2,7 @@
#include <toolbox/path.h>
#include <flipper_format/flipper_format.h>
#include <picopass_icons.h>
#define TAG "PicopassDevice"
@@ -24,6 +24,7 @@
#include <storage/storage.h>
#include <lib/toolbox/path.h>
#include <picopass_icons.h>
#define PICOPASS_TEXT_STORE_SIZE 128
@@ -9,4 +9,5 @@ App(
order=50,
fap_icon="signal_gen_10px.png",
fap_category="GPIO",
fap_icon_assets="icons",
)
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

@@ -1,6 +1,7 @@
#include "../signal_gen_app_i.h"
#include "furi_hal.h"
#include <gui/elements.h>
#include <signal_generator_icons.h>
typedef enum {
LineIndexChannel,
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -29,6 +29,40 @@ static const SubGhzBlockConst ws_oregon2_const = {
// bit indicating the low battery
#define OREGON2_FLAG_BAT_LOW 0x4
/// Documentation for Oregon Scientific protocols can be found here:
/// http://wmrx00.sourceforge.net/Arduino/OregonScientific-RF-Protocols.pdf
// Sensors ID
#define ID_THGR122N 0x1d20
#define ID_THGR968 0x1d30
#define ID_BTHR918 0x5d50
#define ID_BHTR968 0x5d60
#define ID_RGR968 0x2d10
#define ID_THR228N 0xec40
#define ID_THN132N 0xec40 // same as THR228N but different packet size
#define ID_RTGN318 0x0cc3 // warning: id is from 0x0cc3 and 0xfcc3
#define ID_RTGN129 0x0cc3 // same as RTGN318 but different packet size
#define ID_THGR810 0xf824 // This might be ID_THGR81, but what's true is lost in (git) history
#define ID_THGR810a 0xf8b4 // unconfirmed version
#define ID_THN802 0xc844
#define ID_PCR800 0x2914
#define ID_PCR800a 0x2d14 // Different PCR800 ID - AU version I think
#define ID_WGR800 0x1984
#define ID_WGR800a 0x1994 // unconfirmed version
#define ID_WGR968 0x3d00
#define ID_UV800 0xd874
#define ID_THN129 0xcc43 // THN129 Temp only
#define ID_RTHN129 0x0cd3 // RTHN129 Temp, clock sensors
#define ID_BTHGN129 0x5d53 // Baro, Temp, Hygro sensor
#define ID_UVR128 0xec70
#define ID_THGR328N 0xcc23 // Temp & Hygro sensor similar to THR228N with 5 channel instead of 3
#define ID_RTGR328N_1 0xdcc3 // RTGR328N_[1-5] RFclock(date &time)&Temp&Hygro sensor
#define ID_RTGR328N_2 0xccc3
#define ID_RTGR328N_3 0xbcc3
#define ID_RTGR328N_4 0xacc3
#define ID_RTGR328N_5 0x9cc3
#define ID_RTGR328N_6 0x8ce3 // RTGR328N_6&7 RFclock(date &time)&Temp&Hygro sensor like THGR328N
#define ID_RTGR328N_7 0x8ae3
struct WSProtocolDecoderOregon2 {
SubGhzProtocolDecoderBase base;
@@ -101,9 +135,12 @@ static ManchesterEvent level_and_duration_to_event(bool level, uint32_t duration
}
// From sensor id code return amount of bits in variable section
// https://temofeev.ru/info/articles/o-dekodirovanii-protokola-pogodnykh-datchikov-oregon-scientific
static uint8_t oregon2_sensor_id_var_bits(uint16_t sensor_id) {
if(sensor_id == 0xEC40) return 16;
if(sensor_id == 0x1D20) return 24;
if(sensor_id == ID_THR228N) return 16;
if(sensor_id == ID_THGR122N) return 24;
return 0;
}
@@ -134,15 +171,16 @@ static float ws_oregon2_decode_temp(uint32_t data) {
}
static void ws_oregon2_decode_var_data(WSBlockGeneric* ws_b, uint16_t sensor_id, uint32_t data) {
switch(sensor_id) {
case 0xEC40:
if(sensor_id == ID_THR228N) {
ws_b->temp = ws_oregon2_decode_temp(data);
ws_b->humidity = WS_NO_HUMIDITY;
break;
case 0x1D20:
return;
}
if(sensor_id == ID_THGR122N) {
ws_b->humidity = bcd_decode_short(data);
ws_b->temp = ws_oregon2_decode_temp(data >> 8);
break;
return;
}
}
@@ -1,11 +1,10 @@
#include "weather_station_receiver.h"
#include "../weather_station_app_i.h"
#include "weather_station_icons.h"
#include <weather_station_icons.h>
#include <math.h>
#include <input/input.h>
#include <gui/elements.h>
#include <assets_icons.h>
#include <m-array.h>
#define FRAME_HEIGHT 12
+1
View File
@@ -4,6 +4,7 @@
#include <notification/notification_messages.h>
#include <gui/elements.h>
#include <assets_icons.h>
#define TAG "BtSrv"
@@ -1,6 +1,7 @@
#include <furi.h>
#include <gui/elements.h>
#include <dolphin/dolphin.h>
#include <assets_icons.h>
#include "../desktop_i.h"
#include "desktop_view_lock_menu.h"
@@ -4,6 +4,7 @@
#include <gui/elements.h>
#include <gui/icon.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <portmacro.h>
#include <desktop/desktop_settings.h>
@@ -2,6 +2,7 @@
#include <furi.h>
#include <gui/view.h>
#include <gui/elements.h>
#include <assets_icons.h>
#include <stdint.h>
#include <portmacro.h>
@@ -1,6 +1,7 @@
#include "dialogs/dialogs_message.h"
#include "dialogs_i.h"
#include "dialogs_api_lock.h"
#include <assets_icons.h>
/****************** File browser ******************/
+1 -1
View File
@@ -7,7 +7,7 @@
#include <stdint.h>
#include <gui/icon_animation.h>
#include <assets_icons.h>
#include <gui/icon.h>
#ifdef __cplusplus
extern "C" {
+1
View File
@@ -1,5 +1,6 @@
#include "gui/canvas.h"
#include "gui_i.h"
#include <assets_icons.h>
#define TAG "GuiSrv"
+1 -1
View File
@@ -7,7 +7,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <assets_icons.h>
#include <gui/icon.h>
#ifdef __cplusplus
extern "C" {
@@ -5,6 +5,7 @@
#include <m-array.h>
#include <furi.h>
#include <stdint.h>
#include <assets_icons.h>
#define ITEM_FIRST_OFFSET 17
#define ITEM_NEXT_OFFSET 4
@@ -1,6 +1,7 @@
#include "byte_input.h"
#include <gui/elements.h>
#include <furi.h>
#include <gui/elements.h>
#include <assets_icons.h>
#include "byte_input.h"
struct ByteInput {
View* view;
+1
View File
@@ -2,6 +2,7 @@
#include <m-array.h>
#include <gui/elements.h>
#include <assets_icons.h>
#include <furi.h>
struct Menu {
@@ -1,5 +1,6 @@
#include "text_input.h"
#include <gui/elements.h>
#include <assets_icons.h>
#include <furi.h>
struct TextInput {
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <gui/view_dispatcher.h>
#include <gui/gui.h>
#include <assets_icons.h>
#include <gui/modules/popup.h>
#include "views/power_off.h"
@@ -1,6 +1,7 @@
#include "power_off.h"
#include <furi.h>
#include <gui/elements.h>
#include <assets_icons.h>
struct PowerOff {
View* view;
@@ -1,6 +1,7 @@
#include "power_unplug_usb.h"
#include <furi.h>
#include <gui/elements.h>
#include <assets_icons.h>
struct PowerUnplugUsb {
View* view;
+1
View File
@@ -5,6 +5,7 @@
#include "storage/storage_glue.h"
#include "storages/storage_int.h"
#include "storages/storage_ext.h"
#include <assets_icons.h>
#define STORAGE_TICK 1000
+1
View File
@@ -3,6 +3,7 @@
#include <gui/gui.h>
#include <gui/view_dispatcher.h>
#include <gui/modules/empty_screen.h>
#include <assets_icons.h>
#include <furi_hal_version.h>
#include <furi_hal_region.h>
#include <furi_hal_bt.h>
@@ -6,6 +6,7 @@
#include <gui/view.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <assets_icons.h>
#include <gui/modules/variable_item_list.h>
#include <gui/modules/dialog_ex.h>
@@ -7,6 +7,7 @@
#include <gui/modules/submenu.h>
#include <gui/modules/variable_item_list.h>
#include <dialogs/dialogs.h>
#include <assets_icons.h>
#include <desktop/desktop_settings.h>
#include <desktop/views/desktop_view_pin_input.h>
@@ -6,6 +6,7 @@
#include <gui/view.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <assets_icons.h>
#include "views/battery_info.h"
#include <gui/modules/submenu.h>
@@ -1,6 +1,7 @@
#include "battery_info.h"
#include <furi.h>
#include <gui/elements.h>
#include <assets_icons.h>
struct BatteryInfo {
View* view;
@@ -4,6 +4,7 @@
#include <gui/view.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <assets_icons.h>
#include <notification/notification_messages.h>
#include <gui/modules/submenu.h>
@@ -2,6 +2,7 @@
#include <gui/view.h>
#include <gui/elements.h>
#include <gui/canvas.h>
#include <assets_icons.h>
#include <furi.h>
#include <input/input.h>
+1 -190
View File
@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,6.1,,
Version,+,7.1,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@@ -4219,196 +4219,7 @@ Function,-,yn,double,"int, double"
Function,-,ynf,float,"int, float"
Variable,-,AHBPrescTable,const uint32_t[16],
Variable,-,APBPrescTable,const uint32_t[8],
Variable,+,A_125khz_14,const Icon,
Variable,+,A_BadUsb_14,const Icon,
Variable,+,A_Clock_14,const Icon,
Variable,+,A_Debug_14,const Icon,
Variable,+,A_FileManager_14,const Icon,
Variable,+,A_GPIO_14,const Icon,
Variable,+,A_Infrared_14,const Icon,
Variable,+,A_Levelup1_128x64,const Icon,
Variable,+,A_Levelup2_128x64,const Icon,
Variable,+,A_Loading_24,const Icon,
Variable,+,A_NFC_14,const Icon,
Variable,+,A_Plugins_14,const Icon,
Variable,+,A_Round_loader_8x8,const Icon,
Variable,+,A_Settings_14,const Icon,
Variable,+,A_Sub1ghz_14,const Icon,
Variable,+,A_U2F_14,const Icon,
Variable,+,A_UniRFRemix_14,const Icon,
Variable,+,A_iButton_14,const Icon,
Variable,-,ITM_RxBuffer,volatile int32_t,
Variable,+,I_125_10px,const Icon,
Variable,+,I_ActiveConnection_50x64,const Icon,
Variable,+,I_Apps_10px,const Icon,
Variable,+,I_Alert_9x8,const Icon,
Variable,+,I_ArrowC_1_36x36,const Icon,
Variable,+,I_ArrowDownEmpty_14x15,const Icon,
Variable,+,I_ArrowDownFilled_14x15,const Icon,
Variable,+,I_ArrowUpEmpty_14x15,const Icon,
Variable,+,I_ArrowUpFilled_14x15,const Icon,
Variable,+,I_Attention_5x8,const Icon,
Variable,+,I_Auth_62x31,const Icon,
Variable,+,I_BLE_Pairing_128x64,const Icon,
Variable,+,I_Background_128x11,const Icon,
Variable,+,I_BatteryBody_52x28,const Icon,
Variable,+,I_Battery_16x16,const Icon,
Variable,+,I_Battery_26x8,const Icon,
Variable,+,I_Ble_connected_15x15,const Icon,
Variable,+,I_Ble_disconnected_15x15,const Icon,
Variable,+,I_Bluetooth_Connected_16x8,const Icon,
Variable,+,I_Bluetooth_Idle_5x8,const Icon,
Variable,+,I_ButtonCenter_7x7,const Icon,
Variable,+,I_ButtonDown_7x4,const Icon,
Variable,+,I_ButtonLeftSmall_3x5,const Icon,
Variable,+,I_ButtonLeft_4x7,const Icon,
Variable,+,I_ButtonRightSmall_3x5,const Icon,
Variable,+,I_ButtonRight_4x7,const Icon,
Variable,+,I_ButtonUp_7x4,const Icon,
Variable,+,I_Button_18x18,const Icon,
Variable,+,I_Certification1_103x56,const Icon,
Variable,+,I_Certification2_98x33,const Icon,
Variable,+,I_Charging_lightning_9x10,const Icon,
Variable,+,I_Charging_lightning_mask_9x10,const Icon,
Variable,+,I_Circles_47x47,const Icon,
Variable,+,I_Clock_18x18,const Icon,
Variable,+,I_Connect_me_62x31,const Icon,
Variable,+,I_Connected_62x31,const Icon,
Variable,+,I_Cry_dolph_55x52,const Icon,
Variable,+,I_DFU_128x50,const Icon,
Variable,+,I_Detailed_chip_17x13,const Icon,
Variable,+,I_DolphinCommon_56x48,const Icon,
Variable,+,I_DolphinMafia_115x62,const Icon,
Variable,+,I_DolphinNice_96x59,const Icon,
Variable,+,I_DolphinReadingSuccess_59x63,const Icon,
Variable,+,I_DolphinWait_61x59,const Icon,
Variable,+,I_DoorLeft_70x55,const Icon,
Variable,+,I_DoorRight_70x55,const Icon,
Variable,+,I_Down_25x27,const Icon,
Variable,+,I_Down_hvr_25x27,const Icon,
Variable,+,I_Drive_112x35,const Icon,
Variable,+,I_Error_18x18,const Icon,
Variable,+,I_Error_62x31,const Icon,
Variable,+,I_EviSmile1_18x21,const Icon,
Variable,+,I_EviSmile2_18x21,const Icon,
Variable,+,I_EviWaiting1_18x21,const Icon,
Variable,+,I_EviWaiting2_18x21,const Icon,
Variable,+,I_FaceCharging_29x14,const Icon,
Variable,+,I_FaceConfused_29x14,const Icon,
Variable,+,I_FaceNopower_29x14,const Icon,
Variable,+,I_FaceNormal_29x14,const Icon,
Variable,+,I_G0ku,const Icon,
Variable,+,I_GameMode_11x8,const Icon,
Variable,+,I_Health_16x16,const Icon,
Variable,+,I_Hidden_window_9x8,const Icon,
Variable,+,I_InfraredArrowDown_4x8,const Icon,
Variable,+,I_InfraredArrowUp_4x8,const Icon,
Variable,+,I_InfraredLearnShort_128x31,const Icon,
Variable,+,I_KeyBackspaceSelected_16x9,const Icon,
Variable,+,I_KeyBackspace_16x9,const Icon,
Variable,+,I_KeySaveSelected_24x11,const Icon,
Variable,+,I_KeySave_24x11,const Icon,
Variable,+,I_Keychain_39x36,const Icon,
Variable,+,I_Left_mouse_icon_9x9,const Icon,
Variable,+,I_Lock_7x8,const Icon,
Variable,+,I_Lock_8x8,const Icon,
Variable,+,I_MHz_25x11,const Icon,
Variable,+,I_Medium_chip_22x21,const Icon,
Variable,+,I_Mode_25x27,const Icon,
Variable,+,I_Mode_hvr_25x27,const Icon,
Variable,+,I_Modern_reader_18x34,const Icon,
Variable,+,I_Move_flipper_26x39,const Icon,
Variable,+,I_Mute_25x27,const Icon,
Variable,+,I_Mute_hvr_25x27,const Icon,
Variable,+,I_NFC_manual_60x50,const Icon,
Variable,+,I_Nfc_10px,const Icon,
Variable,+,I_Ok_btn_9x9,const Icon,
Variable,+,I_Ok_btn_pressed_13x13,const Icon,
Variable,+,I_Percent_10x14,const Icon,
Variable,+,I_Pin_arrow_down_7x9,const Icon,
Variable,+,I_Pin_arrow_left_9x7,const Icon,
Variable,+,I_Pin_arrow_right_9x7,const Icon,
Variable,+,I_Pin_arrow_up_7x9,const Icon,
Variable,+,I_Pin_attention_dpad_29x29,const Icon,
Variable,+,I_Pin_back_arrow_10x8,const Icon,
Variable,+,I_Pin_back_full_40x8,const Icon,
Variable,+,I_Pin_cell_13x13,const Icon,
Variable,+,I_Pin_pointer_5x3,const Icon,
Variable,+,I_Pin_star_7x7,const Icon,
Variable,+,I_Power_25x27,const Icon,
Variable,+,I_Power_hvr_25x27,const Icon,
Variable,+,I_Pressed_Button_13x13,const Icon,
Variable,+,I_Quest_7x8,const Icon,
Variable,+,I_RFIDDolphinReceive_97x61,const Icon,
Variable,+,I_RFIDDolphinSend_97x61,const Icon,
Variable,+,I_RFIDDolphinSuccess_108x57,const Icon,
Variable,+,I_RFIDSmallChip_14x14,const Icon,
Variable,+,I_Release_arrow_18x15,const Icon,
Variable,+,I_Restoring_38x32,const Icon,
Variable,+,I_Right_mouse_icon_9x9,const Icon,
Variable,+,I_Rotate_25x27,const Icon,
Variable,+,I_Rotate_hvr_25x27,const Icon,
Variable,+,I_SDQuestion_35x43,const Icon,
Variable,+,I_SDcardFail_11x8,const Icon,
Variable,+,I_SDcardMounted_11x8,const Icon,
Variable,+,I_Scanning_123x52,const Icon,
Variable,+,I_SmallArrowDown_3x5,const Icon,
Variable,+,I_SmallArrowDown_4x7,const Icon,
Variable,+,I_SmallArrowUp_3x5,const Icon,
Variable,+,I_SmallArrowUp_4x7,const Icon,
Variable,+,I_Smile_18x18,const Icon,
Variable,+,I_Space_65x18,const Icon,
Variable,+,I_Swing_25x27,const Icon,
Variable,+,I_Swing_hvr_25x27,const Icon,
Variable,+,I_Tap_reader_36x38,const Icon,
Variable,+,I_Temperature_16x16,const Icon,
Variable,+,I_Timer_25x27,const Icon,
Variable,+,I_Timer_hvr_25x27,const Icon,
Variable,+,I_Unlock_7x8,const Icon,
Variable,+,I_Unplug_bg_bottom_128x10,const Icon,
Variable,+,I_Unplug_bg_top_128x14,const Icon,
Variable,+,I_Up_25x27,const Icon,
Variable,+,I_Up_hvr_25x27,const Icon,
Variable,+,I_Updating_32x40,const Icon,
Variable,+,I_UsbTree_48x22,const Icon,
Variable,+,I_Vol_down_25x27,const Icon,
Variable,+,I_Vol_down_hvr_25x27,const Icon,
Variable,+,I_Vol_up_25x27,const Icon,
Variable,+,I_Vol_up_hvr_25x27,const Icon,
Variable,+,I_Voldwn_6x6,const Icon,
Variable,+,I_Voltage_16x16,const Icon,
Variable,+,I_Volup_8x6,const Icon,
Variable,+,I_WarningDolphin_45x42,const Icon,
Variable,+,I_Warning_30x23,const Icon,
Variable,+,I_back_10px,const Icon,
Variable,+,I_badusb_10px,const Icon,
Variable,+,I_dir_10px,const Icon,
Variable,+,I_g0ku_1,const Icon,
Variable,+,I_g0ku_2,const Icon,
Variable,+,I_g0ku_3,const Icon,
Variable,+,I_iButtonDolphinVerySuccess_108x52,const Icon,
Variable,+,I_iButtonKey_49x44,const Icon,
Variable,+,I_ibutt_10px,const Icon,
Variable,+,I_ir_10px,const Icon,
Variable,+,I_keyboard_10px,const Icon,
Variable,+,I_loading_10px,const Icon,
Variable,+,I_music_10px,const Icon,
Variable,+,I_passport_DB,const Icon,
Variable,+,I_passport_bad1_46x49,const Icon,
Variable,+,I_passport_bad2_46x49,const Icon,
Variable,+,I_passport_bad3_46x49,const Icon,
Variable,+,I_passport_bottom_128x18,const Icon,
Variable,+,I_passport_happy1_46x49,const Icon,
Variable,+,I_passport_happy2_46x49,const Icon,
Variable,+,I_passport_happy3_46x49,const Icon,
Variable,+,I_passport_left_6x46,const Icon,
Variable,+,I_passport_okay1_46x49,const Icon,
Variable,+,I_passport_okay2_46x49,const Icon,
Variable,+,I_passport_okay3_46x49,const Icon,
Variable,+,I_sub1_10px,const Icon,
Variable,+,I_u2f_10px,const Icon,
Variable,+,I_unknown_10px,const Icon,
Variable,+,I_update_10px,const Icon,
Variable,-,MSIRangeTable,const uint32_t[16],
Variable,-,SmpsPrescalerTable,const uint32_t[4][6],
Variable,+,SystemCoreClock,uint32_t,
1 entry status name type params
2 Version + 6.1 7.1
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
4219 Function - ynf float int, float
4220 Variable - AHBPrescTable const uint32_t[16]
4221 Variable - APBPrescTable const uint32_t[8]
Variable + A_125khz_14 const Icon
Variable + A_BadUsb_14 const Icon
Variable + A_Clock_14 const Icon
Variable + A_Debug_14 const Icon
Variable + A_FileManager_14 const Icon
Variable + A_GPIO_14 const Icon
Variable + A_Infrared_14 const Icon
Variable + A_Levelup1_128x64 const Icon
Variable + A_Levelup2_128x64 const Icon
Variable + A_Loading_24 const Icon
Variable + A_NFC_14 const Icon
Variable + A_Plugins_14 const Icon
Variable + A_Round_loader_8x8 const Icon
Variable + A_Settings_14 const Icon
Variable + A_Sub1ghz_14 const Icon
Variable + A_U2F_14 const Icon
Variable + A_UniRFRemix_14 const Icon
Variable + A_iButton_14 const Icon
4222 Variable - ITM_RxBuffer volatile int32_t
Variable + I_125_10px const Icon
Variable + I_ActiveConnection_50x64 const Icon
Variable + I_Apps_10px const Icon
Variable + I_Alert_9x8 const Icon
Variable + I_ArrowC_1_36x36 const Icon
Variable + I_ArrowDownEmpty_14x15 const Icon
Variable + I_ArrowDownFilled_14x15 const Icon
Variable + I_ArrowUpEmpty_14x15 const Icon
Variable + I_ArrowUpFilled_14x15 const Icon
Variable + I_Attention_5x8 const Icon
Variable + I_Auth_62x31 const Icon
Variable + I_BLE_Pairing_128x64 const Icon
Variable + I_Background_128x11 const Icon
Variable + I_BatteryBody_52x28 const Icon
Variable + I_Battery_16x16 const Icon
Variable + I_Battery_26x8 const Icon
Variable + I_Ble_connected_15x15 const Icon
Variable + I_Ble_disconnected_15x15 const Icon
Variable + I_Bluetooth_Connected_16x8 const Icon
Variable + I_Bluetooth_Idle_5x8 const Icon
Variable + I_ButtonCenter_7x7 const Icon
Variable + I_ButtonDown_7x4 const Icon
Variable + I_ButtonLeftSmall_3x5 const Icon
Variable + I_ButtonLeft_4x7 const Icon
Variable + I_ButtonRightSmall_3x5 const Icon
Variable + I_ButtonRight_4x7 const Icon
Variable + I_ButtonUp_7x4 const Icon
Variable + I_Button_18x18 const Icon
Variable + I_Certification1_103x56 const Icon
Variable + I_Certification2_98x33 const Icon
Variable + I_Charging_lightning_9x10 const Icon
Variable + I_Charging_lightning_mask_9x10 const Icon
Variable + I_Circles_47x47 const Icon
Variable + I_Clock_18x18 const Icon
Variable + I_Connect_me_62x31 const Icon
Variable + I_Connected_62x31 const Icon
Variable + I_Cry_dolph_55x52 const Icon
Variable + I_DFU_128x50 const Icon
Variable + I_Detailed_chip_17x13 const Icon
Variable + I_DolphinCommon_56x48 const Icon
Variable + I_DolphinMafia_115x62 const Icon
Variable + I_DolphinNice_96x59 const Icon
Variable + I_DolphinReadingSuccess_59x63 const Icon
Variable + I_DolphinWait_61x59 const Icon
Variable + I_DoorLeft_70x55 const Icon
Variable + I_DoorRight_70x55 const Icon
Variable + I_Down_25x27 const Icon
Variable + I_Down_hvr_25x27 const Icon
Variable + I_Drive_112x35 const Icon
Variable + I_Error_18x18 const Icon
Variable + I_Error_62x31 const Icon
Variable + I_EviSmile1_18x21 const Icon
Variable + I_EviSmile2_18x21 const Icon
Variable + I_EviWaiting1_18x21 const Icon
Variable + I_EviWaiting2_18x21 const Icon
Variable + I_FaceCharging_29x14 const Icon
Variable + I_FaceConfused_29x14 const Icon
Variable + I_FaceNopower_29x14 const Icon
Variable + I_FaceNormal_29x14 const Icon
Variable + I_G0ku const Icon
Variable + I_GameMode_11x8 const Icon
Variable + I_Health_16x16 const Icon
Variable + I_Hidden_window_9x8 const Icon
Variable + I_InfraredArrowDown_4x8 const Icon
Variable + I_InfraredArrowUp_4x8 const Icon
Variable + I_InfraredLearnShort_128x31 const Icon
Variable + I_KeyBackspaceSelected_16x9 const Icon
Variable + I_KeyBackspace_16x9 const Icon
Variable + I_KeySaveSelected_24x11 const Icon
Variable + I_KeySave_24x11 const Icon
Variable + I_Keychain_39x36 const Icon
Variable + I_Left_mouse_icon_9x9 const Icon
Variable + I_Lock_7x8 const Icon
Variable + I_Lock_8x8 const Icon
Variable + I_MHz_25x11 const Icon
Variable + I_Medium_chip_22x21 const Icon
Variable + I_Mode_25x27 const Icon
Variable + I_Mode_hvr_25x27 const Icon
Variable + I_Modern_reader_18x34 const Icon
Variable + I_Move_flipper_26x39 const Icon
Variable + I_Mute_25x27 const Icon
Variable + I_Mute_hvr_25x27 const Icon
Variable + I_NFC_manual_60x50 const Icon
Variable + I_Nfc_10px const Icon
Variable + I_Ok_btn_9x9 const Icon
Variable + I_Ok_btn_pressed_13x13 const Icon
Variable + I_Percent_10x14 const Icon
Variable + I_Pin_arrow_down_7x9 const Icon
Variable + I_Pin_arrow_left_9x7 const Icon
Variable + I_Pin_arrow_right_9x7 const Icon
Variable + I_Pin_arrow_up_7x9 const Icon
Variable + I_Pin_attention_dpad_29x29 const Icon
Variable + I_Pin_back_arrow_10x8 const Icon
Variable + I_Pin_back_full_40x8 const Icon
Variable + I_Pin_cell_13x13 const Icon
Variable + I_Pin_pointer_5x3 const Icon
Variable + I_Pin_star_7x7 const Icon
Variable + I_Power_25x27 const Icon
Variable + I_Power_hvr_25x27 const Icon
Variable + I_Pressed_Button_13x13 const Icon
Variable + I_Quest_7x8 const Icon
Variable + I_RFIDDolphinReceive_97x61 const Icon
Variable + I_RFIDDolphinSend_97x61 const Icon
Variable + I_RFIDDolphinSuccess_108x57 const Icon
Variable + I_RFIDSmallChip_14x14 const Icon
Variable + I_Release_arrow_18x15 const Icon
Variable + I_Restoring_38x32 const Icon
Variable + I_Right_mouse_icon_9x9 const Icon
Variable + I_Rotate_25x27 const Icon
Variable + I_Rotate_hvr_25x27 const Icon
Variable + I_SDQuestion_35x43 const Icon
Variable + I_SDcardFail_11x8 const Icon
Variable + I_SDcardMounted_11x8 const Icon
Variable + I_Scanning_123x52 const Icon
Variable + I_SmallArrowDown_3x5 const Icon
Variable + I_SmallArrowDown_4x7 const Icon
Variable + I_SmallArrowUp_3x5 const Icon
Variable + I_SmallArrowUp_4x7 const Icon
Variable + I_Smile_18x18 const Icon
Variable + I_Space_65x18 const Icon
Variable + I_Swing_25x27 const Icon
Variable + I_Swing_hvr_25x27 const Icon
Variable + I_Tap_reader_36x38 const Icon
Variable + I_Temperature_16x16 const Icon
Variable + I_Timer_25x27 const Icon
Variable + I_Timer_hvr_25x27 const Icon
Variable + I_Unlock_7x8 const Icon
Variable + I_Unplug_bg_bottom_128x10 const Icon
Variable + I_Unplug_bg_top_128x14 const Icon
Variable + I_Up_25x27 const Icon
Variable + I_Up_hvr_25x27 const Icon
Variable + I_Updating_32x40 const Icon
Variable + I_UsbTree_48x22 const Icon
Variable + I_Vol_down_25x27 const Icon
Variable + I_Vol_down_hvr_25x27 const Icon
Variable + I_Vol_up_25x27 const Icon
Variable + I_Vol_up_hvr_25x27 const Icon
Variable + I_Voldwn_6x6 const Icon
Variable + I_Voltage_16x16 const Icon
Variable + I_Volup_8x6 const Icon
Variable + I_WarningDolphin_45x42 const Icon
Variable + I_Warning_30x23 const Icon
Variable + I_back_10px const Icon
Variable + I_badusb_10px const Icon
Variable + I_dir_10px const Icon
Variable + I_g0ku_1 const Icon
Variable + I_g0ku_2 const Icon
Variable + I_g0ku_3 const Icon
Variable + I_iButtonDolphinVerySuccess_108x52 const Icon
Variable + I_iButtonKey_49x44 const Icon
Variable + I_ibutt_10px const Icon
Variable + I_ir_10px const Icon
Variable + I_keyboard_10px const Icon
Variable + I_loading_10px const Icon
Variable + I_music_10px const Icon
Variable + I_passport_DB const Icon
Variable + I_passport_bad1_46x49 const Icon
Variable + I_passport_bad2_46x49 const Icon
Variable + I_passport_bad3_46x49 const Icon
Variable + I_passport_bottom_128x18 const Icon
Variable + I_passport_happy1_46x49 const Icon
Variable + I_passport_happy2_46x49 const Icon
Variable + I_passport_happy3_46x49 const Icon
Variable + I_passport_left_6x46 const Icon
Variable + I_passport_okay1_46x49 const Icon
Variable + I_passport_okay2_46x49 const Icon
Variable + I_passport_okay3_46x49 const Icon
Variable + I_sub1_10px const Icon
Variable + I_u2f_10px const Icon
Variable + I_unknown_10px const Icon
Variable + I_update_10px const Icon
4223 Variable - MSIRangeTable const uint32_t[16]
4224 Variable - SmpsPrescalerTable const uint32_t[4][6]
4225 Variable + SystemCoreClock uint32_t
+13
View File
@@ -340,6 +340,19 @@ class FlipperStorage:
else:
return True
def format_ext(self):
"""Create a directory on Flipper"""
self.send_and_wait_eol("storage format /ext\r")
self.send_and_wait_eol("y\r")
answer = self.read.until(self.CLI_EOL)
self.read.until(self.CLI_PROMPT)
if self.has_error(answer):
self.last_error = self.get_error(answer)
return False
else:
return True
def remove(self, path):
"""Remove file or directory on Flipper"""
self.send_and_wait_eol('storage remove "' + path + '"\r')
+16
View File
@@ -21,6 +21,11 @@ class Main(App):
self.parser_mkdir.add_argument("flipper_path", help="Flipper path")
self.parser_mkdir.set_defaults(func=self.mkdir)
self.parser_format = self.subparsers.add_parser(
"format_ext", help="Format flash card"
)
self.parser_format.set_defaults(func=self.format_ext)
self.parser_remove = self.subparsers.add_parser(
"remove", help="Remove file/directory"
)
@@ -275,6 +280,17 @@ class Main(App):
storage.stop()
return 0
def format_ext(self):
if not (storage := self._get_storage()):
return 1
self.logger.debug("Formatting /ext SD card")
if not storage.format_ext():
self.logger.error(f"Error: {storage.last_error}")
storage.stop()
return 0
def stress(self):
self.logger.error("This test is wearing out flash memory.")
self.logger.error("Never use it with internal storage(/int)")
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env python3
import sys, os, time
def flp_serial_by_name(flp_name):
if sys.platform == "darwin": # MacOS
flp_serial = "/dev/cu.usbmodemflip_" + flp_name + "1"
elif sys.platform == "linux": # Linux
flp_serial = (
"/dev/serial/by-id/usb-Flipper_Devices_Inc._Flipper_"
+ flp_name
+ "_flip_"
+ flp_name
+ "-if00"
)
if os.path.exists(flp_serial):
return flp_serial
else:
if os.path.exists(flp_name):
return flp_name
else:
return ""
UPDATE_TIMEOUT = 30
def main():
flipper_name = sys.argv[1]
elapsed = 0
flipper = flp_serial_by_name(flipper_name)
while flipper == "" and elapsed < UPDATE_TIMEOUT:
elapsed += 1
time.sleep(1)
flipper = flp_serial_by_name(flipper_name)
if flipper == "":
print(f"Cannot find {flipper_name} flipper. Guess your flipper swam away")
sys.exit(1)
sys.exit(0)
if __name__ == "__main__":
main()
+79
View File
@@ -0,0 +1,79 @@
#!/usr/bin/env python3
import sys, os
import serial
import re
from await_flipper import flp_serial_by_name
LEAK_THRESHOLD = 3000 # added until units are fixed
def main():
flp_serial = flp_serial_by_name(sys.argv[1])
if flp_serial == "":
print("Name or serial port is invalid")
sys.exit(1)
with serial.Serial(flp_serial, timeout=1) as flipper:
flipper.baudrate = 230400
flipper.flushOutput()
flipper.flushInput()
flipper.timeout = 300
flipper.read_until(b">: ").decode("utf-8")
flipper.write(b"unit_tests\r")
data = flipper.read_until(b">: ").decode("utf-8")
lines = data.split("\r\n")
tests_re = r"Failed tests: \d{0,}"
time_re = r"Consumed: \d{0,}"
leak_re = r"Leaked: \d{0,}"
status_re = r"Status: \w{3,}"
tests_pattern = re.compile(tests_re)
time_pattern = re.compile(time_re)
leak_pattern = re.compile(leak_re)
status_pattern = re.compile(status_re)
tests, time, leak, status = None, None, None, None
for line in lines:
print(line)
if not tests:
tests = re.match(tests_pattern, line)
if not time:
time = re.match(time_pattern, line)
if not leak:
leak = re.match(leak_pattern, line)
if not status:
status = re.match(status_pattern, line)
if leak is None or time is None or leak is None or status is None:
print("Failed to get data. Or output is corrupt")
sys.exit(1)
leak = int(re.findall(r"[- ]\d+", leak.group(0))[0])
status = re.findall(r"\w+", status.group(0))[1]
tests = int(re.findall(r"\d+", tests.group(0))[0])
time = int(re.findall(r"\d+", time.group(0))[0])
if tests > 0 or leak > LEAK_THRESHOLD or status != "PASSED":
print(f"Got {tests} failed tests.")
print(f"Leaked {leak} bytes.")
print(f"Status by flipper: {status}")
print(f"Time elapsed {time/1000} seconds.")
sys.exit(1)
print(
f"Tests ran successfully! Time elapsed {time/1000} seconds. Passed {tests} tests."
)
sys.exit(0)
if __name__ == "__main__":
main()