Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dev
  • Loading branch information
Willy-JL committed Mar 7, 2024
2 parents 337486d + 423ff03 commit 440ccf7
Show file tree
Hide file tree
Showing 112 changed files with 3,126 additions and 1,344 deletions.
2 changes: 1 addition & 1 deletion .github/workflow_data/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
)
desc = f"[**{change}**]({event['compare']}) | [{branch}]({event['repository']['html_url']}/tree/{branch})\n"
for i, commit in enumerate(event["commits"]):
msg = commit['message'].splitlines()[0].replace("`", "")
msg = commit['message'].splitlines()[0].replace("`", "").replace("_", "\_")
msg = msg[:50] + ("..." if len(msg) > 50 else "")
desc += f"\n[`{commit['id'][:7]}`]({commit['url']}): {msg} - [__{commit['author'].get('username')}__](https://github.com/{commit['author'].get('username')})"
if len(desc) > 2020:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: 'Generate documentation with Doxygen'

on:
push:
branches:
- dev

env:
TARGETS: f7
DEFAULT_TARGET: f7

jobs:
doxygen:
if: ${{ !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
steps:
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Get commit details'
id: names
run: |
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
TYPE="pull"
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
TYPE="tag"
else
TYPE="other"
fi
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
- name: 'Generate documentation'
uses: mattnotmitt/[email protected]
with:
working-directory: 'documentation/'
doxyfile-path: './doxygen/Doxyfile-awesome.cfg'

- name: 'Upload documentation'
uses: jakejarvis/[email protected]
env:
AWS_S3_BUCKET: "${{ secrets.FW_DOCS_AWS_BUCKET }}"
AWS_ACCESS_KEY_ID: "${{ secrets.FW_DOCS_AWS_ACCESS_KEY }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.FW_DOCS_AWS_SECRET_KEY }}"
AWS_REGION: "${{ secrets.FW_DOCS_AWS_REGION }}"
SOURCE_DIR: "./documentation/doxygen/build/html"
DEST_DIR: "${{steps.names.outputs.branch_name}}"
with:
args: "--delete"

5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@
url = https://github.com/STMicroelectronics/stm32wbxx_hal_driver
[submodule "lib/stm32wb_copro"]
path = lib/stm32wb_copro
url = https://github.com/flipperdevices/stm32wb_copro.git
url = https://github.com/flipperdevices/stm32wb_copro.git
[submodule "documentation/doxygen/doxygen-awesome-css"]
path = documentation/doxygen/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
2 changes: 1 addition & 1 deletion .vscode/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Visual Studio Code workspace for Flipper Zero
# Visual Studio Code workspace for Flipper Zero {#vscode}

## Setup

Expand Down
4 changes: 2 additions & 2 deletions applications/drivers/subghz/cc1101_ext/cc1101_ext.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file furi_hal_subghz.h
* SubGhz HAL API
* @file cc1101_ext.h
* @brief External CC1101 transceiver access API.
*/

#pragma once
Expand Down
6 changes: 5 additions & 1 deletion applications/examples/example_apps_assets/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Apps Assets folder Example
# Apps Assets folder Example {#example_app_assets}

This example shows how to use the Apps Assets folder to store data that is not part of the application itself, but is required for its operation, and that data is provided with the application.

## Source code

Source code for this example can be found [here](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/examples/example_apps_assets).

## What is the Apps Assets Folder?

The **Apps Assets** folder is a folder where external applications unpack their assets.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @file example_apps_assets.c
* @brief Application assets example.
*/
#include <furi.h>
#include <storage/storage.h>
#include <toolbox/stream/stream.h>
Expand Down
6 changes: 5 additions & 1 deletion applications/examples/example_apps_data/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Apps Data folder Example
# Apps Data folder Example {#example_app_data}

This example demonstrates how to utilize the Apps Data folder to store data that is not part of the app itself, such as user data, configuration files, and so forth.

## Source code

Source code for this example can be found [here](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/examples/example_apps_data).

## What is the Apps Data Folder?

The **Apps Data** folder is a folder used to store data for external apps that are not part of the main firmware.
Expand Down
4 changes: 4 additions & 0 deletions applications/examples/example_apps_data/example_apps_data.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @file example_apps_data.c
* @brief Application data example.
*/
#include <furi.h>
#include <storage/storage.h>

Expand Down
4 changes: 4 additions & 0 deletions applications/examples/example_ble_beacon/ble_beacon_app.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @file ble_beacon_app.h
* @brief BLE beacon example.
*/
#pragma once

#include "extra_beacon.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @file example_custom_font.c
* @brief Custom font example.
*/
#include <furi.h>
#include <furi_hal.h>

Expand Down
19 changes: 15 additions & 4 deletions applications/examples/example_images/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# Application icons
# Application icons {#example_app_images}

## Source code

Source code for this example can be found [here](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/examples/example_images).

## General principle

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

* 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",
Expand All @@ -17,6 +27,7 @@ App(
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"
```
Expand Down
4 changes: 4 additions & 0 deletions applications/examples/example_images/example_images.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @file example_images.c
* @brief Custom images example.
*/
#include <furi.h>
#include <furi_hal.h>

Expand Down
6 changes: 4 additions & 2 deletions applications/examples/example_plugins/example_plugins.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*
* An example of a plugin host application.
/**
* @file example_plugins.c
* @brief Plugin host application example.
*
* Loads a single plugin and calls its methods.
*/

Expand Down
6 changes: 4 additions & 2 deletions applications/examples/example_plugins/example_plugins_multi.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*
* An example of an advanced plugin host application.
/**
* @file example_plugins_multi.c
* @brief Advanced plugin host application example.
*
* It uses PluginManager to load all plugins from a directory
*/

Expand Down
7 changes: 6 additions & 1 deletion applications/examples/example_plugins/plugin1.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/* A simple plugin implementing example_plugins application's plugin interface */
/**
* @file plugin1.c
* @brief Plugin example 1.
*
* A simple plugin implementing example_plugins application's plugin interface
*/

#include "plugin_interface.h"

Expand Down
7 changes: 6 additions & 1 deletion applications/examples/example_plugins/plugin2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/* Second plugin implementing example_plugins application's plugin interface */
/**
* @file plugin2.c
* @brief Plugin example 2.
*
* Second plugin implementing example_plugins application's plugin interface
*/

#include "plugin_interface.h"

Expand Down
8 changes: 6 additions & 2 deletions applications/examples/example_plugins/plugin_interface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/**
* @file plugin_interface.h
* @brief Example plugin interface.
*
* Common interface between a plugin and host application
*/
#pragma once

/* Common interface between a plugin and host application */

#define PLUGIN_APP_ID "example_plugins"
#define PLUGIN_API_VERSION 1

Expand Down
9 changes: 6 additions & 3 deletions applications/examples/example_plugins_advanced/app_api.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#pragma once

/*
/**
* @file app_api.h
* @brief Application API example.
*
* This file contains an API that is internally implemented by the application
* It is also exposed to plugins to allow them to use the application's API.
*/
#pragma once

#include <stdint.h>

#ifdef __cplusplus
Expand Down
5 changes: 4 additions & 1 deletion applications/examples/example_plugins_advanced/plugin1.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/*
/**
* @file plugin1.c
* @brief Plugin example 1.
*
* This plugin uses both firmware's API interface and private application headers.
* It can be loaded by a plugin manager that uses CompoundApiInterface,
* which combines both interfaces.
Expand Down
5 changes: 4 additions & 1 deletion applications/examples/example_plugins_advanced/plugin2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/*
/**
* @file plugin2.c
* @brief Plugin example 2.
*
* This plugin uses both firmware's API interface and private application headers.
* It can be loaded by a plugin manager that uses CompoundApiInterface,
* which combines both interfaces.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/**
* @file plugin_interface.h
* @brief Example plugin interface.
*
* Common interface between a plugin and host application
*/
#pragma once

/* Common interface between a plugin and host application */

#define PLUGIN_APP_ID "example_plugins_advanced"
#define PLUGIN_API_VERSION 1

Expand Down
10 changes: 9 additions & 1 deletion applications/examples/example_thermo/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# 1-Wire Thermometer
# 1-Wire Thermometer {#example_thermo}

This example application demonstrates the use of the 1-Wire library with a DS18B20 thermometer.
It also covers basic GUI, input handling, threads and localisation.

## Source code

Source code for this example can be found [here](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/examples/example_thermo).

## Electrical connections

Before launching the application, connect the sensor to Flipper's external GPIO according to the table below:
| DS18B20 | Flipper |
| :-----: | :-----: |
Expand All @@ -15,12 +21,14 @@ Before launching the application, connect the sensor to Flipper's external GPIO
*NOTE 2*: For any other pin than 17, connect an external 4.7k pull-up resistor to pin 9.

## Launching the application

In order to launch this demo, follow the steps below:
1. Make sure your Flipper has an SD card installed.
2. Connect your Flipper to the computer via a USB cable.
3. Run `./fbt launch APPSRC=example_thermo` in your terminal emulator of choice.

## Changing the data pin

It is possible to use other GPIO pin as a 1-Wire data pin. In order to change it, set the `THERMO_GPIO_PIN` macro to any of the options listed below:

```c
Expand Down
5 changes: 4 additions & 1 deletion applications/examples/example_thermo/example_thermo.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/*
/**
* @file example_thermo.c
* @brief 1-Wire thermometer example.
*
* This file contains an example application that reads and displays
* the temperature from a DS18B20 1-wire thermometer.
*
Expand Down
2 changes: 1 addition & 1 deletion applications/external
Submodule external updated 71 files
+1 −0 .gitignore
+32 −10 .utils/subtree-subdir-helper.sh
+1 −1 .utils/update-subtree.sh
+2 −1 air_arkanoid/application.fam
+2 −0 air_labyrinth/.catalog/CHANGELOG.md
+17 −0 air_labyrinth/.catalog/README.md
+ air_labyrinth/.catalog/screenshots/1.png
+1 −0 air_labyrinth/.gitignore
+1 −0 air_labyrinth/.gitsubtree
+674 −0 air_labyrinth/LICENSE
+19 −0 air_labyrinth/README.md
+21 −0 air_labyrinth/application.fam
+ air_labyrinth/assets/sprites/player.fxbm
+1 −0 air_labyrinth/engine/.gitsubtree
+674 −0 air_labyrinth/engine/LICENSE
+13 −0 air_labyrinth/engine/README.md
+63 −0 air_labyrinth/engine/canvas.c
+72 −0 air_labyrinth/engine/canvas.h
+53 −0 air_labyrinth/engine/clock_timer.c
+15 −0 air_labyrinth/engine/clock_timer.h
+25 −0 air_labyrinth/engine/engine.h
+216 −0 air_labyrinth/engine/entity.c
+65 −0 air_labyrinth/engine/entity.h
+58 −0 air_labyrinth/engine/entity_i.h
+221 −0 air_labyrinth/engine/game_engine.c
+88 −0 air_labyrinth/engine/game_engine.h
+174 −0 air_labyrinth/engine/game_manager.c
+59 −0 air_labyrinth/engine/game_manager.h
+24 −0 air_labyrinth/engine/game_manager_i.h
+309 −0 air_labyrinth/engine/level.c
+103 −0 air_labyrinth/engine/level.h
+26 −0 air_labyrinth/engine/level_i.h
+54 −0 air_labyrinth/engine/main.c
+90 −0 air_labyrinth/engine/scripts/sprite_builder.py
+297 −0 air_labyrinth/engine/sensors/ICM42688P/ICM42688P.c
+127 −0 air_labyrinth/engine/sensors/ICM42688P/ICM42688P.h
+176 −0 air_labyrinth/engine/sensors/ICM42688P/ICM42688P_regs.h
+328 −0 air_labyrinth/engine/sensors/imu.c
+15 −0 air_labyrinth/engine/sensors/imu.h
+69 −0 air_labyrinth/engine/sprite.c
+44 −0 air_labyrinth/engine/sprite.h
+62 −0 air_labyrinth/engine/vector.c
+56 −0 air_labyrinth/engine/vector.h
+371 −0 air_labyrinth/game.c
+9 −0 air_labyrinth/game.h
+ air_labyrinth/icon.png
+0 −0 air_labyrinth/sprites/.gitkeep
+ air_labyrinth/sprites/player.png
+28 −0 air_labyrinth/walls.h
+6 −0 avr_isp/.catalog/changelog.md
+2 −2 avr_isp/application.fam
+ avr_isp/avr_app_icon_10px.png
+ avr_isp/avr_app_icon_10x10.png
+1 −1 avr_isp/helpers/avr_isp_types.h
+1 −1 ble_spam/application.fam
+14 −1 ble_spam/ble_spam.c
+1 −0 ble_spam/protocols/_protocols.c
+2 −0 ble_spam/protocols/_protocols.h
+1 −0 ble_spam/protocols/_scenes.h
+5 −0 ble_spam/protocols/fastpair.c
+142 −0 ble_spam/protocols/nameflood.c
+10 −0 ble_spam/protocols/nameflood.h
+1 −0 ble_spam/protocols/nameflood_scenes.h
+1 −1 esp_flasher/.gitsubtree
+7 −3 esp_flasher/esp_flasher_worker.c
+1 −1 nrf24channelscanner/.gitsubtree
+1 −1 spi_mem_manager/scenes/spi_mem_scene_about.c
+59 −59 totp/assets/cli/cli_help.txt
+2 −0 vgm_air_mouse/.catalog/CHANGELOG.md
+1 −1 vgm_air_mouse/.gitsubtree
+1 −1 vgm_air_mouse/application.fam
6 changes: 6 additions & 0 deletions applications/main/archive/scenes/archive_scene_delete.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ void archive_scene_delete_on_enter(void* context) {
filename = furi_string_alloc();

ArchiveFile_t* current = archive_get_current_file(app->browser);

FuriString* filename_no_ext = furi_string_alloc();
path_extract_filename(current->path, filename_no_ext, true);
strlcpy(app->text_store, furi_string_get_cstr(filename_no_ext), MAX_NAME_LEN);
furi_string_free(filename_no_ext);

path_extract_filename(current->path, filename, false);

char delete_str[64];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@ static void momentum_app_scene_protocols_gpio_nmea_channel_changed(VariableItem*
app->save_settings = true;
}

static void momentum_app_scene_protocols_gpio_general_channel_changed(VariableItem* item) {
MomentumApp* app = variable_item_get_context(item);
momentum_settings.uart_general_channel = variable_item_get_current_value_index(item) == 0 ?
FuriHalSerialIdUsart :
FuriHalSerialIdLpuart;
variable_item_set_current_value_text(
item,
momentum_settings.uart_general_channel == FuriHalSerialIdUsart ? UART_DEFAULT :
UART_EXTRA);
app->save_settings = true;
}

void momentum_app_scene_protocols_gpio_on_enter(void* context) {
MomentumApp* app = context;
VariableItemList* var_item_list = app->var_item_list;
Expand Down Expand Up @@ -113,18 +101,6 @@ void momentum_app_scene_protocols_gpio_on_enter(void* context) {
item,
momentum_settings.uart_nmea_channel == FuriHalSerialIdUsart ? UART_DEFAULT : UART_EXTRA);

item = variable_item_list_add(
var_item_list,
"General UART",
2,
momentum_app_scene_protocols_gpio_general_channel_changed,
app);
variable_item_set_current_value_index(item, momentum_settings.uart_general_channel);
variable_item_set_current_value_text(
item,
momentum_settings.uart_general_channel == FuriHalSerialIdUsart ? UART_DEFAULT :
UART_EXTRA);

variable_item_list_set_enter_callback(
var_item_list, momentum_app_scene_protocols_gpio_var_item_list_callback, app);

Expand Down
Loading

0 comments on commit 440ccf7

Please sign in to comment.