Skip to content

Commit

Permalink
Merge branch 'dev' into i2cTools-newUI
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Nov 23, 2022
2 parents fae17d2 + 37159c7 commit 063b13d
Show file tree
Hide file tree
Showing 41 changed files with 1,153 additions and 133 deletions.
185 changes: 163 additions & 22 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kind: pipeline
type: docker
name: "Build firmware"
name: "Release firmware"

steps:
- name: "Update submodules"
Expand All @@ -11,19 +11,19 @@ steps:
- git submodule foreach git config --local gc.auto 0
- git log -1 --format='%H'

- name: "Build default FW"
- name: "Build firmware"
image: hfdj/fztools
pull: never
commands:
- export DIST_SUFFIX=${DRONE_TAG}
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
- export WORKFLOW_BRANCH_OR_TAG=release-cfw
- ./fbt COMPACT=1 DEBUG=0 updater_package
- mkdir artifacts-default
- mv dist/f7-C/* artifacts-default/
- ls -laS artifacts-default
- ls -laS artifacts-default/f7-update-${DRONE_TAG}
- sed -i 's/(version)/'${DRONE_TAG}'/g' CHANGELOG.md
- echo '# [Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-'${DRONE_TAG}'.tgz&channel=dev-cfw&version='${DRONE_TAG}')' >> CHANGELOG.md
- echo '# [Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/fw/${DRONE_TAG}/flipper-z-f7-update-'${DRONE_TAG}'.tgz&channel=release-cfw&version='${DRONE_TAG}')' >> CHANGELOG.md
environment:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link
Expand All @@ -34,31 +34,33 @@ steps:
commands:
- rm -f assets/dolphin/external/manifest.txt
- cp .ci_files/anims_ofw.txt assets/dolphin/external/manifest.txt
- export DIST_SUFFIX=${DRONE_TAG}
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
- export DIST_SUFFIX=${DRONE_TAG}n
- export WORKFLOW_BRANCH_OR_TAG=no-custom-anims
- ./fbt COMPACT=1 DEBUG=0 updater_package
- mkdir artifacts-ofw-anims
- mv dist/f7-C/* artifacts-ofw-anims/
- ls -laS artifacts-ofw-anims
- ls -laS artifacts-ofw-anims/f7-update-${DRONE_TAG}
- ls -laS artifacts-ofw-anims/f7-update-${DRONE_TAG}n
- echo '' >> CHANGELOG.md
- echo '### [Version without custom animations - Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-noanims-'${DRONE_TAG}'.tgz&channel=dev-cfw&version='${DRONE_TAG}')' >> CHANGELOG.md
- echo '### [Version without custom animations - Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/fw_no_anim/flipper-z-f7-update-'${DRONE_TAG}'n.tgz&channel=release-cfw&version='${DRONE_TAG}'n)' >> CHANGELOG.md
environment:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link

- name: "Bundle self-update packages"
image: kramos/alpine-zip
commands:
- mv artifacts-ofw-anims/flipper-z-f7-update-${DRONE_TAG}.tgz artifacts-ofw-anims/flipper-z-f7-update-noanims-${DRONE_TAG}.tgz
- cp artifacts-ofw-anims/flipper-z-f7-update-noanims-${DRONE_TAG}.tgz .
- cp artifacts-ofw-anims/flipper-z-f7-update-${DRONE_TAG}n.tgz .
- cp artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz .
- zip -r artifacts-ofw-anims/flipper-z-f7-update-noanims-${DRONE_TAG}.zip artifacts-ofw-anims/f7-update-${DRONE_TAG}
- zip -r artifacts-ofw-anims/flipper-z-f7-update-${DRONE_TAG}n.zip artifacts-ofw-anims/f7-update-${DRONE_TAG}n
- zip -r artifacts-default/flipper-z-f7-update-${DRONE_TAG}.zip artifacts-default/f7-update-${DRONE_TAG}
- tar czpf artifacts-default/flipper-z-any-scripts-${DRONE_TAG}.tgz scripts debug
- rm -rf artifacts-ofw-anims/f7-update-${DRONE_TAG}
- rm -rf artifacts-default/f7-update-${DRONE_TAG}
- ls -laS artifacts-ofw-anims
- ls -laS artifacts-default
- mv artifacts-default/ ${DRONE_TAG}
- ls -laS ${DRONE_TAG}

- name: "Upload default to updates srv"
image: appleboy/drone-scp
Expand All @@ -72,8 +74,14 @@ steps:
port:
from_secret: dep_port
target:
from_secret: dep_target
source: flipper-z-f7-update-${DRONE_TAG}.tgz
from_secret: dep_target_new
source:
- ${DRONE_TAG}/*.tgz
- ${DRONE_TAG}/*.zip
- ${DRONE_TAG}/*.json
- ${DRONE_TAG}/*.elf
- ${DRONE_TAG}/*.dfu
- ${DRONE_TAG}/*.bin

- name: "Upload no-anims to updates srv"
image: appleboy/drone-scp
Expand All @@ -87,8 +95,19 @@ steps:
port:
from_secret: dep_port
target:
from_secret: dep_target
source: flipper-z-f7-update-noanims-${DRONE_TAG}.tgz
from_secret: dep_target_noanim
source: flipper-z-f7-update-${DRONE_TAG}n.tgz

- name: "Trigger update server reindex"
image: hfdj/fztools
pull: never
environment:
UPD_KEY:
from_secret: git_update_serv_token
UPD_URL:
from_secret: git_update_server_url
commands:
- curl -X POST -F 'key='$UPD_KEY'' $UPD_URL

- name: "Do Github release"
image: ddplugins/github-release
Expand All @@ -100,8 +119,8 @@ steps:
api_key:
from_secret: github_apikey
files:
- artifacts-default/*.tgz
- artifacts-default/*.zip
- ${DRONE_TAG}/*.tgz
- ${DRONE_TAG}/*.zip
- artifacts-ofw-anims/*.tgz
title: ${DRONE_TAG}
note: CHANGELOG.md
Expand Down Expand Up @@ -130,12 +149,12 @@ steps:
[-How to install firmware-](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md)
[-Version without custom animations - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-noanims-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})
[-Version without custom animations - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_no_anim/flipper-z-f7-update-${DRONE_TAG}n.tgz&channel=release-cfw&version=${DRONE_TAG}n)
[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})"
[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/${DRONE_TAG}/flipper-z-f7-update-${DRONE_TAG}.tgz&channel=release-cfw&version=${DRONE_TAG})"
document:
- artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz
- ${DRONE_TAG}/flipper-z-f7-update-${DRONE_TAG}.tgz

- name: "Send discord notification"
image: appleboy/drone-discord
Expand All @@ -156,14 +175,136 @@ steps:
[-How to install firmware-](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md)
[-Version without custom animations - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-noanims-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})
[-Version without custom animations - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_no_anim/flipper-z-f7-update-${DRONE_TAG}n.tgz&channel=release-cfw&version=${DRONE_TAG}n)
[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/builds/flipper-z-f7-update-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})"
[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/${DRONE_TAG}/flipper-z-f7-update-${DRONE_TAG}.tgz&channel=release-cfw&version=${DRONE_TAG})"

trigger:
branch:
- release
event:
- tag

node:
typ: haupt

---
kind: pipeline
type: docker
name: "Dev build"

steps:
- name: "Update submodules"
image: alpine/git
commands:
- git submodule sync
- git -c protocol.version=2 submodule update --init --force --recursive
- git submodule foreach git config --local gc.auto 0
- git log -1 --format='%H'

- name: "Build dev FW"
image: hfdj/fztools
pull: never
commands:
- export DIST_SUFFIX=${DRONE_BUILD_NUMBER}
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw
- ./fbt COMPACT=1 DEBUG=0 updater_package
- mkdir artifacts-default
- mv dist/f7-C/* artifacts-default/
- ls -laS artifacts-default
- ls -laS artifacts-default/f7-update-${DRONE_BUILD_NUMBER}
environment:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link

- name: "Bundle self-update packages"
image: kramos/alpine-zip
commands:
- cp artifacts-default/flipper-z-f7-update-${DRONE_BUILD_NUMBER}.tgz .
- rm -rf artifacts-default/f7-update-${DRONE_BUILD_NUMBER}
- ls -laS artifacts-default
- mv artifacts-default/ dev
- ls -laS dev

- name: "Clean dev folder"
image: appleboy/drone-ssh
settings:
host:
from_secret: dep_host
username:
from_secret: dep_user
password:
from_secret: dep_passwd
port:
from_secret: dep_port
command_timeout: 1m
script:
- cd web/unleashedflip.com/public_html/fw/dev
- ls -laS
- rm -f ./*
- ls -laS

- name: "Upload default to updates srv"
image: appleboy/drone-scp
settings:
host:
from_secret: dep_host
username:
from_secret: dep_user
password:
from_secret: dep_passwd
port:
from_secret: dep_port
target:
from_secret: dep_target_new
source:
- dev/*.tgz
- dev/*.zip
- dev/*.json
- dev/*.elf
- dev/*.dfu
- dev/*.bin

- name: "Trigger update server reindex"
image: hfdj/fztools
pull: never
environment:
UPD_KEY:
from_secret: git_update_serv_token
UPD_URL:
from_secret: git_update_server_url
commands:
- curl -X POST -F 'key='$UPD_KEY'' $UPD_URL

- name: "Send files to telegram"
image: appleboy/drone-telegram
settings:
token:
from_secret: tgtoken
to:
from_secret: tgid_dev
format: markdown
message: "Unleashed firmware dev build successful!
Build: {{build.number}}
SHA: {{commit.sha}}
Commit: {{commit.message}}
[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/dev/flipper-z-f7-update-${DRONE_BUILD_NUMBER}.tgz&channel=dev-cfw&version=${DRONE_BUILD_NUMBER})"
document:
- dev/flipper-z-f7-update-${DRONE_BUILD_NUMBER}.tgz

trigger:
branch:
- dev
event:
- push

node:
typ: haupt
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Also check changelog in releases for latest updates!
- FAAC SLH (Spa) [External seed calculation required (For info contact me in Discord: Nano#8998)]
- BFT Mitto [External seed calculation required (For info contact me in Discord: Nano#8998)]
- Security+ v1 & v2
- Star Line (saving only)
- Star Line

## Support us so we can buy equipment and develop new features
* Boosty: https://boosty.to/mmxdev
Expand Down
15 changes: 14 additions & 1 deletion applications/plugins/dtmf_dolphin/dtmf_dolphin_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ DTMFDolphinSceneData DTMFDolphinSceneDataRedboxUS = {
{"Dollar", 1700.0, 2200.0, {3, 0, 5}, 1, 650, 0},
}};

DTMFDolphinSceneData DTMFDolphinSceneDataRedboxCA = {
.name = "Redbox (CA)",
.block = DTMF_DOLPHIN_TONE_BLOCK_REDBOX_CA,
.tone_count = 3,
.tones = {
{"Nickel", 2200.0, 0.0, {0, 0, 5}, 1, 66, 0},
{"Dime", 2200.0, 0.0, {1, 0, 5}, 2, 66, 66},
{"Quarter", 2200.0, 0.0, {2, 0, 5}, 5, 33, 33},
}};

DTMFDolphinSceneData DTMFDolphinSceneDataRedboxUK = {
.name = "Redbox (UK)",
.block = DTMF_DOLPHIN_TONE_BLOCK_REDBOX_UK,
Expand Down Expand Up @@ -109,6 +119,9 @@ void dtmf_dolphin_data_set_current_section(DTMFDolphinToneSection section) {
case DTMF_DOLPHIN_TONE_BLOCK_REDBOX_US:
current_scene_data = &DTMFDolphinSceneDataRedboxUS;
break;
case DTMF_DOLPHIN_TONE_BLOCK_REDBOX_CA:
current_scene_data = &DTMFDolphinSceneDataRedboxCA;
break;
case DTMF_DOLPHIN_TONE_BLOCK_REDBOX_UK:
current_scene_data = &DTMFDolphinSceneDataRedboxUK;
break;
Expand Down Expand Up @@ -204,4 +217,4 @@ uint8_t dtmf_dolphin_get_tone_span(uint8_t row, uint8_t col) {
}
}
return 0;
}
}
1 change: 1 addition & 0 deletions applications/plugins/dtmf_dolphin/dtmf_dolphin_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ typedef enum {
DTMF_DOLPHIN_TONE_BLOCK_BLUEBOX,
DTMF_DOLPHIN_TONE_BLOCK_REDBOX_US,
DTMF_DOLPHIN_TONE_BLOCK_REDBOX_UK,
DTMF_DOLPHIN_TONE_BLOCK_REDBOX_CA,
DTMF_DOLPHIN_TONE_BLOCK_MISC,
} DTMFDolphinToneSection;

Expand Down
1 change: 1 addition & 0 deletions applications/plugins/dtmf_dolphin/dtmf_dolphin_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ typedef enum {
DTMFDolphinEventStartBluebox,
DTMFDolphinEventStartRedboxUS,
DTMFDolphinEventStartRedboxUK,
DTMFDolphinEventStartRedboxCA,
DTMFDolphinEventStartMisc,
DTMFDolphinEventPlayTones,
DTMFDolphinEventStopTones,
Expand Down
1 change: 1 addition & 0 deletions applications/plugins/dtmf_dolphin/dtmf_dolphin_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enum DTMFDolphinSceneState {
DTMFDolphinSceneStateBluebox,
DTMFDolphinSceneStateRedboxUS,
DTMFDolphinSceneStateRedboxUK,
DTMFDolphinSceneStateRedboxCA,
DTMFDolphinSceneStateMisc,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ void dtmf_dolphin_scene_dialer_on_enter(void* context) {
case DTMFDolphinSceneStateRedboxUK:
dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_REDBOX_UK);
break;
case DTMFDolphinSceneStateRedboxCA:
dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_REDBOX_CA);
break;
case DTMFDolphinSceneStateMisc:
dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_MISC);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ static void dtmf_dolphin_scene_start_main_menu_enter_callback(void* context, uin
cust_event = DTMFDolphinEventStartRedboxUK;
break;
case 4:
cust_event = DTMFDolphinEventStartRedboxCA;
break;
case 5:
cust_event = DTMFDolphinEventStartMisc;
break;
default:
Expand All @@ -38,6 +41,7 @@ void dtmf_dolphin_scene_start_on_enter(void* context) {
variable_item_list_add(var_item_list, "Bluebox", 0, NULL, context);
variable_item_list_add(var_item_list, "Redbox (US)", 0, NULL, context);
variable_item_list_add(var_item_list, "Redbox (UK)", 0, NULL, context);
variable_item_list_add(var_item_list, "Redbox (CA)", 0, NULL, context);
variable_item_list_add(var_item_list, "Misc", 0, NULL, context);

variable_item_list_set_selected_item(
Expand Down Expand Up @@ -67,6 +71,9 @@ bool dtmf_dolphin_scene_start_on_event(void* context, SceneManagerEvent event) {
case DTMFDolphinEventStartRedboxUK:
sc_state = DTMFDolphinSceneStateRedboxUK;
break;
case DTMFDolphinEventStartRedboxCA:
sc_state = DTMFDolphinSceneStateRedboxCA;
break;
case DTMFDolphinEventStartMisc:
sc_state = DTMFDolphinSceneStateMisc;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ bool totp_scene_app_settings_handle_event(
}

SceneState* scene_state = (SceneState*)plugin_state->current_scene_state;
if(event->input.type != InputTypePress) {
if(event->input.type != InputTypePress && event->input.type != InputTypeRepeat) {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ bool totp_scene_generate_token_handle_event(
return true;
}

if(event->input.type != InputTypePress) {
if(event->input.type != InputTypePress && event->input.type != InputTypeRepeat) {
return true;
}

Expand Down
Loading

0 comments on commit 063b13d

Please sign in to comment.