Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
V40 Release Candidate Changes (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clara K authored Jan 25, 2023
2 parents cd557ec + 94dfc4c commit c6a0e3f
Show file tree
Hide file tree
Showing 1,033 changed files with 5,849 additions and 2,021 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/sonarqube.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: SonarCloud
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
env:
SONAR_SCANNER_VERSION: 4.7.0.2747
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: "$HOME/.sonar/build_wrapper_output" # Directory where build-wrapper output will be placed
FBT_NO_SYNC: "true"
TARGETS: f7
DEFAULT_TARGET: f7
steps:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: 'recursive'
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Download and set up sonar-scanner
env:
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
run: |
mkdir -p $HOME/.sonar
curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
- name: Download and set up build-wrapper
env:
BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip
run: |
curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
- name: Run build-wrapper
run: |
mkdir $HOME/.sonar/build_wrapper_output
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ./sonar-build
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ PVS-Studio.log
# Automate files, etc
automate.py
deployments/
assets/dolphin/custom/
assets/resources/dolphin_custom/
fbt_options.py
commitnotes.md
lib/STM32CubeWB
2 changes: 1 addition & 1 deletion .pvsoptions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--rules-config .pvsconfig -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/micro-ecc -e lib/microtar -e lib/mlib -e lib/qrcode -e lib/ST25RFAL002 -e lib/STM32CubeWB -e lib/u8g2 -e lib/nanopb -e */arm-none-eabi/* -e applications/plugins/dap_link/lib/free-dap
--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/micro-ecc -e lib/microtar -e lib/mlib -e lib/qrcode -e lib/ST25RFAL002 -e lib/STM32CubeWB -e lib/u8g2 -e lib/nanopb -e */arm-none-eabi/* -e applications/plugins/dap_link/lib/free-dap
6 changes: 6 additions & 0 deletions .vscode/example/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@
"type": "shell",
"command": "./fbt COMPACT=1 DEBUG=0 FORCE=1 flash_usb_full"
},
{
"label": "[Debug] Create PVS-Studio report",
"group": "build",
"type": "shell",
"command": "./fbt firmware_pvs"
},
{
"label": "[Debug] Build FAPs",
"group": "build",
Expand Down
63 changes: 43 additions & 20 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img src="https://user-images.githubusercontent.com/55334727/210267703-bf9a4181-30a6-4735-a288-431d5d2d66db.png">
</p>

[Intro](https://github.com/ClaraCrazy/Flipper-Xtreme#What-makes-it-special) | [Animations](https://github.com/ClaraCrazy/Flipper-Xtreme#Animations) | [Docs](https://github.com/ClaraCrazy/Flipper-Xtreme/wiki) | [Changelog](https://github.com/ClaraCrazy/Flipper-Xtreme#list-of-changes) | [Known bugs](https://github.com/ClaraCrazy/Flipper-Xtreme#Known-bugs) | [Install](https://github.com/ClaraCrazy/Flipper-Xtreme#Install) | [Build](https://github.com/ClaraCrazy/Flipper-Xtreme#build-it-yourself) | [Discord](https://discord.gg/flipper-xtreme)
[Intro](https://github.com/ClaraCrazy/Flipper-Xtreme#What-makes-it-special) | [Animations](https://github.com/ClaraCrazy/Flipper-Xtreme#Animations--Asset-Packs) | [Docs](https://github.com/ClaraCrazy/Flipper-Xtreme/wiki) | [Changelog](https://github.com/ClaraCrazy/Flipper-Xtreme#list-of-changes) | [Known bugs](https://github.com/ClaraCrazy/Flipper-Xtreme#Known-bugs) | [Install](https://github.com/ClaraCrazy/Flipper-Xtreme#Install) | [Build](https://github.com/ClaraCrazy/Flipper-Xtreme#build-it-yourself) | [Discord](https://discord.gg/flipper-xtreme)
-----

This firmware is a complete overhaul of the [Official Firmware](https://github.com/flipperdevices/flipperzero-firmware), it also features some of the badly implemented ideas from RogueMaster, and lots of awesome code-bits from [Unleashed](https://github.com/DarkFlippers/unleashed-firmware).
Expand All @@ -28,19 +28,41 @@ The goal of this Firmware is to regularly bring out amazing updates based on wha

-----
<br>
<h2 align="center">Animations:</h2>
<h2 align="center">Animations / Asset Packs:</h2>

This firmware contains NSFW animations and uses these in stock (NSFW) mode.
We created our own, new & improved Animation / Asset system, that we can finally reveal. It lets you to create and cycle through your own `Asset Packs` with only a few button presses, allowing you to easily load custom Animations and Icons like never before.

The animations are tied to the level system. Each level you reach, unlocks a new animation. The higher your level, the more lewd it will become. Rumors have it, I'm to be found in at least one of those too
<img src="https://user-images.githubusercontent.com/55334727/214010675-9eddb8f5-1dd6-4cf4-a0ee-e37af8b6c933.PNG" align="left" width="200px"/>
You can easily create your own pack, or find some user made ones in the discord channel. Check <a href="https://github.com/ClaraCrazy/Flipper-Xtreme/wiki/1.-File-Formats">here</a> for a tutorial on creating your own. Essentially, we got our own <code>Anims</code> & <code>Icons</code> folders, inside each <code>Asset Pack</code>.

<br clear="left"/>

<img src="https://user-images.githubusercontent.com/55334727/214016338-95a619c7-88d2-4db5-bb7a-75282d9082b8.png" align="left" width="200px"/>
Once you have some packs, upload them to your Flipper in <code>SD/dolphin_custom</code> (if you did this right you should see <code>SD/dolphin_custom/PackName/Anims</code> and/or <code>SD/dolphin_custom/PackName/Icons</code>).


<br clear="left"/>

<img src="https://user-images.githubusercontent.com/55334727/214013624-25dad48e-72ea-4a90-9060-66e137e0d61a.png" align="left" width="200px"/>
After installing the packs to Flipper, hit the <code>Arrow UP</code> button on the main menu and go to <code>Xtreme Settings</code>. Here choose which pack you want and tweak the other settings how you prefer, then press back to reboot and enjoy your new assets & animations!

<br clear="left"/>

-----
<br>
<h2 align="center">Levels:</h2>

This firmware contains some NSFW animations to bring a twist to the boring community, and added a fun leveling-system around them, that you can easily add to your own `Asset Packs`.

The idle_animations are tied to the level system. Each level you reach, unlocks a new animation. The higher your level, the more lewd it will become. Rumors have it, I'm to be found in at least one of those too

| Level | Animations |
| ------------- | ------------- |
| 1-10 | Try harder. Just sexy clothes |
| 11-20 | Some tits, maybe an ass |
| 21-30 | Fully NSFW, graphic scenes |

If you dont like that, we added an SFW mode to the Firmware. From the main menu, hit `Arrow UP` and select SFW mode and now all assets will be stock.
By default, SFW mode is selected, but if you want to enable all of the above simply hit `Arrow UP` from the main menu, select `Xtreme Settings` and change to NSFW graphics.

-----
<br>
Expand All @@ -51,30 +73,31 @@ Note: This repo is always updated with OFW & Unleashed. No need to mention all t
```txt
[Added]
- SFW Mode
- Xtreme App
- Asset Packs
- More UI options
- A new battery display-type
- Scrolling view for long file names in browser
- NSFW Animations tied to the level system. Read more above
- Folder handling for empty ones (Now indicate they are empty)
- Jamming Files
- Custom subghz presets
- Added new Battery display-type
- Multiple NFC protocols
- Subghz and IR signal replication via gpio | Credits to @ankris812
- Honda Keys (CVE-2022-27254) & Ford blockers
- NSFW Animations tied to the level system. Read more above
- New API Routes for Locale settings
- Scrolling view for long file names in browser
- Tamagotchi rom
```
```txt
[Updated]
- All graphics
- All Assets
- Tons of apps
- Massive compiler re-do
- About 1k files to speed things up a lot
- Folder handling for empty ones (Now indicate they are empty)
- Applications now use the new Locale setting
- Compiler now handles all non-compiled faps during build
- Compiler now accepts WIP SDK
- Compiler just stfu about non-fatal problems
- Some further NFC stuff
- Weather App
- Applications now use above mentioned API Routes
- Applications to now use the new Locale setting
```
```txt
[Fixed]
Expand All @@ -89,7 +112,7 @@ Note: This repo is always updated with OFW & Unleashed. No need to mention all t
- Unused Dummy Mode
- Broken apps (bad apple, chess, etc.)
- Unused code from FAPs and system calls
- Tons of unused code from FAPs and system calls
```

----
Expand Down
9 changes: 6 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,12 @@ fap_dist = [
for app_artifact in firmware_env["FW_EXTAPPS"].applications.values()
),
),
distenv.Install(
f"#/dist/{dist_dir}/apps",
"#/assets/resources/apps",
*(
distenv.Install(
f"#/dist/{dist_dir}/apps/{app_artifact.app.fap_category}",
app_artifact.compact[0],
)
for app_artifact in firmware_env["FW_EXTAPPS"].applications.values()
),
]
Depends(
Expand Down
3 changes: 2 additions & 1 deletion applications/debug/accessor/accessor_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ void AccessorApp::run(void) {
onewire_host_stop(onewire_host);
}

AccessorApp::AccessorApp() {
AccessorApp::AccessorApp()
: text_store{0} {
notification = static_cast<NotificationApp*>(furi_record_open(RECORD_NOTIFICATION));
onewire_host = onewire_host_alloc();
furi_hal_power_enable_otg();
Expand Down
3 changes: 0 additions & 3 deletions applications/debug/accessor/helpers/wiegand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ bool WIEGAND::DoWiegandConversion() {
return true;
} else {
_lastWiegand = sysTick;
_bitCount = 0;
_cardTemp = 0;
_cardTempHigh = 0;
return false;
}

Expand Down
11 changes: 7 additions & 4 deletions applications/debug/bt_debug_app/views/bt_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

#include <gui/canvas.h>
#include <gui/elements.h>

#include <lib/toolbox/float_tools.h>
#include <m-array.h>
#include <furi.h>
#include <inttypes.h>
#include <stdint.h>

struct BtTestParam {
Expand Down Expand Up @@ -98,16 +101,16 @@ static void bt_test_draw_callback(Canvas* canvas, void* _model) {
elements_scrollbar(canvas, model->position, BtTestParamArray_size(model->params));
canvas_draw_str(canvas, 6, 60, model->message);
if(model->state == BtTestStateStarted) {
if(model->rssi != 0.0f) {
if(!float_is_equal(model->rssi, 0.0f)) {
snprintf(info_str, sizeof(info_str), "RSSI:%3.1f dB", (double)model->rssi);
canvas_draw_str_aligned(canvas, 124, 60, AlignRight, AlignBottom, info_str);
}
} else if(model->state == BtTestStateStopped) {
if(model->packets_num_rx) {
snprintf(info_str, sizeof(info_str), "%ld pack rcv", model->packets_num_rx);
snprintf(info_str, sizeof(info_str), "%" PRIu32 " pack rcv", model->packets_num_rx);
canvas_draw_str_aligned(canvas, 124, 60, AlignRight, AlignBottom, info_str);
} else if(model->packets_num_tx) {
snprintf(info_str, sizeof(info_str), "%ld pack sent", model->packets_num_tx);
snprintf(info_str, sizeof(info_str), "%" PRIu32 " pack sent", model->packets_num_tx);
canvas_draw_str_aligned(canvas, 124, 60, AlignRight, AlignBottom, info_str);
}
}
Expand Down Expand Up @@ -153,7 +156,7 @@ static bool bt_test_input_callback(InputEvent* event, void* context) {
}

void bt_test_process_up(BtTest* bt_test) {
with_view_model(
with_view_model( // -V658
bt_test->view,
BtTestModel * model,
{
Expand Down
2 changes: 1 addition & 1 deletion applications/debug/file_browser_test/file_browser_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ FileBrowserApp* file_browser_app_alloc(char* arg) {

app->file_path = furi_string_alloc();
app->file_browser = file_browser_alloc(app->file_path);
file_browser_configure(app->file_browser, "*", NULL, true, &I_badusb_10px, true);
file_browser_configure(app->file_browser, "*", NULL, true, false, &I_badusb_10px, true);

view_dispatcher_add_view(
app->view_dispatcher, FileBrowserAppViewStart, widget_get_view(app->widget));
Expand Down
4 changes: 2 additions & 2 deletions applications/examples/application.fam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
App(
appid="sample_apps",
name="Sample apps bundle",
appid="example_apps",
name="Example apps bundle",
apptype=FlipperAppType.METAPACKAGE,
)
15 changes: 6 additions & 9 deletions applications/main/bad_usb/scenes/bad_usb_scene_error.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../bad_usb_app_i.h"
#include "../../../settings/desktop_settings/desktop_settings_app.h"
#include "../../../settings/xtreme_settings/xtreme_settings.h"

typedef enum {
BadUsbCustomEventErrorBack,
Expand All @@ -17,8 +17,6 @@ static void

void bad_usb_scene_error_on_enter(void* context) {
BadUsbApp* app = context;
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
DESKTOP_SETTINGS_LOAD(settings);

if(app->error == BadUsbAppErrorNoFiles) {
widget_add_icon_element(app->widget, 0, 0, &I_SDQuestion_35x43);
Expand All @@ -34,33 +32,32 @@ void bad_usb_scene_error_on_enter(void* context) {
app->widget, GuiButtonTypeLeft, "Back", bad_usb_scene_error_event_callback, app);
} else if(app->error == BadUsbAppErrorCloseRpc) {
widget_add_icon_element(app->widget, 78, 0, &I_ActiveConnection_50x64);
if(settings->sfw_mode) {
if(XTREME_SETTINGS()->nsfw_mode) {
widget_add_string_multiline_element(
app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "Connection\nis active!");
app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "I am not\na whore!");
widget_add_string_multiline_element(
app->widget,
3,
30,
AlignLeft,
AlignTop,
FontSecondary,
"Disconnect from\nPC or phone to\nuse this function.");
"Pull out from\nPC or phone to\nuse me like this.");
} else {
widget_add_string_multiline_element(
app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "I am not\na whore!");
app->widget, 3, 2, AlignLeft, AlignTop, FontPrimary, "Connection\nis active!");
widget_add_string_multiline_element(
app->widget,
3,
30,
AlignLeft,
AlignTop,
FontSecondary,
"Pull out from\nPC or phone to\nuse me like this.");
"Disconnect from\nPC or phone to\nuse this function.");
}
}

view_dispatcher_switch_to_view(app->view_dispatcher, BadUsbAppViewError);
free(settings);
}

bool bad_usb_scene_error_on_event(void* context, SceneManagerEvent event) {
Expand Down
Loading

0 comments on commit c6a0e3f

Please sign in to comment.