Skip to content

Commit ad303c4

Browse files
committed
Merge remote-tracking branch 'origin/dev' into release-candidate
2 parents 628c055 + 21e7c46 commit ad303c4

File tree

779 files changed

+7835
-4884
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

779 files changed

+7835
-4884
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
130130
- name: 'Find previous comment'
131131
if: ${{ !github.event.pull_request.head.repo.fork && matrix.target == env.DEFAULT_TARGET && github.event.pull_request }}
132-
uses: peter-evans/find-comment@v2
132+
uses: peter-evans/find-comment@v3
133133
id: find-comment
134134
with:
135135
issue-number: ${{ github.event.pull_request.number }}
@@ -138,7 +138,7 @@ jobs:
138138

139139
- name: 'Create or update comment'
140140
if: ${{ !github.event.pull_request.head.repo.fork && matrix.target == env.DEFAULT_TARGET && github.event.pull_request }}
141-
uses: peter-evans/create-or-update-comment@v3
141+
uses: peter-evans/create-or-update-comment@v4
142142
with:
143143
comment-id: ${{ steps.find-comment.outputs.comment-id }}
144144
issue-number: ${{ github.event.pull_request.number }}
@@ -147,6 +147,7 @@ jobs:
147147
- [📦 Update package](https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-update-${{steps.names.outputs.suffix}}.tgz)
148148
- [📥 DFU file](https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-full-${{steps.names.outputs.suffix}}.dfu)
149149
- [☁️ Web/App updater](https://lab.flipper.net/?url=https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-update-${{steps.names.outputs.suffix}}.tgz&channel=${{steps.names.outputs.branch_name}}&version=${{steps.names.outputs.commit_sha}})
150+
- [📊 Size report](https://fw-reports.flipp.dev/?branch=${{steps.names.outputs.branch_name}})
150151
edit-mode: replace
151152

152153
- name: 'SDK submission to staging catalog'

.github/workflows/docs.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,33 @@ on:
44
push:
55
branches:
66
- dev
7+
pull_request:
78

89
env:
910
TARGETS: f7
1011
DEFAULT_TARGET: f7
1112

1213
jobs:
14+
check-secret:
15+
if: ${{ github.event.pull_request.head.repo.fork == false }}
16+
runs-on: ubuntu-latest
17+
outputs:
18+
s3-valid-config: ${{ steps.check.outputs.s3-valid-config }}
19+
20+
steps:
21+
- name: 'Check if S3 key exists'
22+
id: check
23+
run: |
24+
if [[ -z "${{ secrets.FW_DOCS_AWS_ACCESS_KEY }}" || -z "${{ secrets.FW_DOCS_AWS_SECRET_KEY }}" || -z "${{ secrets.FW_DOCS_AWS_BUCKET }}" ]]; then
25+
echo "s3-valid-config=false" >> $GITHUB_OUTPUT;
26+
else
27+
echo "s3-valid-config=true" >> $GITHUB_OUTPUT;
28+
fi
29+
1330
doxygen:
14-
if: ${{ !github.event.pull_request.head.repo.fork }}
31+
if: ${{ github.event.pull_request.head.repo.fork == false }}
1532
runs-on: ubuntu-latest
33+
needs: check-secret
1634
steps:
1735
- name: 'Wipe workspace'
1836
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
@@ -37,12 +55,17 @@ jobs:
3755
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
3856
3957
- name: 'Generate documentation'
40-
uses: mattnotmitt/[email protected]
58+
uses: mattnotmitt/doxygen-action@edge
59+
env:
60+
DOXY_SRC_ROOT: "${{ github.workspace }}"
61+
DOXY_CONFIG_DIR: "${{ github.workspace }}/documentation/doxygen"
62+
DOXY_OUTPUT_DIR: "${{ github.workspace }}/documentation/doxygen/build"
4163
with:
4264
working-directory: 'documentation/'
4365
doxyfile-path: './doxygen/Doxyfile-awesome.cfg'
4466

4567
- name: 'Upload documentation'
68+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/dev' && needs.check-secret.outputs.s3-valid-config == 'true' }}
4669
uses: jakejarvis/[email protected]
4770
env:
4871
AWS_S3_BUCKET: "${{ secrets.FW_DOCS_AWS_BUCKET }}"
@@ -53,4 +76,3 @@ jobs:
5376
DEST_DIR: "${{steps.names.outputs.branch_name}}"
5477
with:
5578
args: "--delete"
56-

.github/workflows/pvs_studio.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
WARNINGS=0
4949
./fbt COMPACT=1 PVSNOBROWSER=1 firmware_pvs || WARNINGS=1
5050
echo "warnings=${WARNINGS}" >> $GITHUB_OUTPUT
51+
if [[ $WARNINGS -ne 0 ]]; then
52+
echo "report-url=https://pvs.flipp.dev/${{steps.names.outputs.branch_name}}/${{steps.names.outputs.default_target}}-${{steps.names.outputs.suffix}}/index.html" >> $GITHUB_OUTPUT
53+
fi
5154
5255
- name: 'Upload report'
5356
if: ${{ !github.event.pull_request.head.repo.fork && (steps.pvs-warn.outputs.warnings != 0) }}
@@ -62,7 +65,7 @@ jobs:
6265

6366
- name: 'Find Previous Comment'
6467
if: ${{ !github.event.pull_request.head.repo.fork && github.event.pull_request && (steps.pvs-warn.outputs.warnings != 0) }}
65-
uses: peter-evans/find-comment@v2
68+
uses: peter-evans/find-comment@v3
6669
id: fc
6770
with:
6871
issue-number: ${{ github.event.pull_request.number }}
@@ -71,18 +74,19 @@ jobs:
7174

7275
- name: 'Create or update comment'
7376
if: ${{ !github.event.pull_request.head.repo.fork && github.event.pull_request && (steps.pvs-warn.outputs.warnings != 0) }}
74-
uses: peter-evans/create-or-update-comment@v1
77+
uses: peter-evans/create-or-update-comment@v4
7578
with:
7679
comment-id: ${{ steps.fc.outputs.comment-id }}
7780
issue-number: ${{ github.event.pull_request.number }}
7881
body: |
7982
**PVS-Studio report for commit `${{steps.names.outputs.commit_sha}}`:**
80-
- [Report](https://pvs.flipp.dev/${{steps.names.outputs.branch_name}}/${{steps.names.outputs.default_target}}-${{steps.names.outputs.suffix}}/index.html)
83+
- [Report](${{ steps.pvs-warn.outputs.report-url }})
8184
edit-mode: replace
8285

8386
- name: 'Raise exception'
8487
if: ${{ steps.pvs-warn.outputs.warnings != 0 }}
8588
run: |
8689
echo "Please fix all PVS warnings before merge"
90+
echo "Report: ${{ steps.pvs-warn.outputs.report-url }}"
91+
echo "[PVS report](${{ steps.pvs-warn.outputs.report-url }})" >> $GITHUB_STEP_SUMMARY
8792
exit 1
88-

.pvsconfig

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# MLib macros we can't do much about.
22
//-V:M_LET:1048,1044
33
//-V:M_EACH:1048,1044
4-
//-V:ARRAY_DEF:760,747,568,776,729,712,654
5-
//-V:LIST_DEF:760,747,568,712,729,654,776
4+
//-V:ARRAY_DEF:760,747,568,776,729,712,654,1103
5+
//-V:LIST_DEF:760,747,568,712,729,654,776,1103
66
//-V:BPTREE_DEF2:779,1086,557,773,512
7-
//-V:DICT_DEF2:779,524,776,760,1044,1001,729,590,568,747,685
7+
//-V:DICT_DEF2:779,524,776,760,1044,1001,729,590,568,747,685,1103
88
//-V:ALGO_DEF:1048,747,1044
99
//-V:TUPLE_DEF2:524,590,1001,760
1010

@@ -42,8 +42,5 @@
4242
# Model-related warnings
4343
//-V:with_view_model:1044,1048
4444

45-
# Functions that always return the same error code
46-
//-V:picopass_device_decrypt:1048
47-
4845
# Examples
4946
//V_EXCLUDE_PATH applications/examples/

SConstruct

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# construction of certain targets behind command-line options.
88

99
import os
10-
from fbt.util import path_as_posix
10+
from fbt.util import open_browser_action
1111

1212
DefaultEnvironment(tools=[])
1313

@@ -42,6 +42,7 @@ distenv = coreenv.Clone(
4242
"openocd",
4343
"blackmagic",
4444
"jflash",
45+
"doxygen",
4546
],
4647
ENV=os.environ,
4748
UPDATE_BUNDLE_DIR="dist/${DIST_DIR}/f${TARGET_HW}-update-${DIST_SUFFIX}",
@@ -229,7 +230,6 @@ firmware_debug = distenv.PhonyTarget(
229230
source=firmware_env["FW_ELF"],
230231
GDBOPTS="${GDBOPTS_BASE}",
231232
GDBREMOTE="${OPENOCD_GDB_PIPE}",
232-
FBT_FAP_DEBUG_ELF_ROOT=path_as_posix(firmware_env.subst("$FBT_FAP_DEBUG_ELF_ROOT")),
233233
)
234234
distenv.Depends(firmware_debug, firmware_flash)
235235

@@ -239,7 +239,6 @@ distenv.PhonyTarget(
239239
source=firmware_env["FW_ELF"],
240240
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
241241
GDBREMOTE="${BLACKMAGIC_ADDR}",
242-
FBT_FAP_DEBUG_ELF_ROOT=path_as_posix(firmware_env.subst("$FBT_FAP_DEBUG_ELF_ROOT")),
243242
)
244243

245244
# Debug alien elf
@@ -419,3 +418,18 @@ distenv.PhonyTarget(
419418
"env",
420419
"@echo $( ${FBT_SCRIPT_DIR.abspath}/toolchain/fbtenv.sh $)",
421420
)
421+
422+
doxy_build = distenv.DoxyBuild(
423+
"documentation/doxygen/build/html/index.html",
424+
"documentation/doxygen/Doxyfile-awesome.cfg",
425+
doxy_env_variables={
426+
"DOXY_SRC_ROOT": Dir(".").abspath,
427+
"DOXY_BUILD_DIR": Dir("documentation/doxygen/build").abspath,
428+
"DOXY_CONFIG_DIR": "documentation/doxygen",
429+
},
430+
)
431+
distenv.Alias("doxygen", doxy_build)
432+
distenv.AlwaysBuild(doxy_build)
433+
434+
# Open generated documentation in browser
435+
distenv.PhonyTarget("doxy", open_browser_action, source=doxy_build)

applications/debug/accessor/accessor_app.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@ class AccessorApp {
1111
public:
1212
void run(void);
1313

14-
AccessorApp();
15-
~AccessorApp();
14+
AccessorApp(void);
15+
~AccessorApp(void);
1616

1717
enum class Scene : uint8_t {
1818
Exit,
1919
Start,
2020
};
2121

22-
AccessorAppViewManager* get_view_manager();
22+
AccessorAppViewManager* get_view_manager(void);
2323
void switch_to_next_scene(Scene index);
2424
void search_and_switch_to_previous_scene(std::initializer_list<Scene> scenes_list);
2525
bool switch_to_previous_scene(uint8_t count = 1);
26-
Scene get_previous_scene();
26+
Scene get_previous_scene(void);
2727

28-
void notify_green_blink();
29-
void notify_success();
28+
void notify_green_blink(void);
29+
void notify_success(void);
3030

31-
char* get_text_store();
32-
uint8_t get_text_store_size();
31+
char* get_text_store(void);
32+
uint8_t get_text_store_size(void);
3333
void set_text_store(const char* text...);
3434

35-
WIEGAND* get_wiegand();
36-
OneWireHost* get_one_wire();
35+
WIEGAND* get_wiegand(void);
36+
OneWireHost* get_one_wire(void);
3737

3838
private:
3939
std::list<Scene> previous_scenes_list = {Scene::Exit};

applications/debug/accessor/accessor_view_manager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ class AccessorAppViewManager {
1515

1616
FuriMessageQueue* event_queue;
1717

18-
AccessorAppViewManager();
19-
~AccessorAppViewManager();
18+
AccessorAppViewManager(void);
19+
~AccessorAppViewManager(void);
2020

2121
void switch_to(ViewType type);
2222

2323
void receive_event(AccessorEvent* event);
2424
void send_event(AccessorEvent* event);
2525

26-
Submenu* get_submenu();
27-
Popup* get_popup();
26+
Submenu* get_submenu(void);
27+
Popup* get_popup(void);
2828

2929
private:
3030
ViewDispatcher* view_dispatcher;

applications/debug/accessor/helpers/wiegand.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
class WIEGAND {
44
public:
5-
WIEGAND();
6-
void begin();
7-
void end();
8-
bool available();
9-
unsigned long getCode();
10-
unsigned long getCodeHigh();
11-
int getWiegandType();
5+
WIEGAND(void);
6+
void begin(void);
7+
void end(void);
8+
bool available(void);
9+
unsigned long getCode(void);
10+
unsigned long getCodeHigh(void);
11+
int getWiegandType(void);
1212

13-
static void ReadD0();
14-
static void ReadD1();
13+
static void ReadD0(void);
14+
static void ReadD1(void);
1515

1616
private:
17-
static bool DoWiegandConversion();
17+
static bool DoWiegandConversion(void);
1818
static unsigned long
1919
GetCardId(unsigned long* codehigh, unsigned long* codelow, char bitlength);
2020

applications/debug/battery_test_app/battery_test_app.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static void battery_test_battery_info_update_model(void* context) {
3232
notification_message(app->notifications, &sequence_display_backlight_on);
3333
}
3434

35-
BatteryTestApp* battery_test_alloc() {
35+
BatteryTestApp* battery_test_alloc(void) {
3636
BatteryTestApp* app = malloc(sizeof(BatteryTestApp));
3737

3838
// Records

applications/debug/battery_test_app/views/battery_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static void battery_info_draw_callback(Canvas* canvas, void* context) {
116116
draw_stat(canvas, 104, 42, &I_Health_16x16, health);
117117
}
118118

119-
BatteryInfo* battery_info_alloc() {
119+
BatteryInfo* battery_info_alloc(void) {
120120
BatteryInfo* battery_info = malloc(sizeof(BatteryInfo));
121121
battery_info->view = view_alloc();
122122
view_set_context(battery_info->view, battery_info);

0 commit comments

Comments
 (0)