Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-candidate' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes committed Aug 11, 2021
2 parents 0bc3828 + ba399ab commit 073c87f
Show file tree
Hide file tree
Showing 253 changed files with 3,156 additions and 1,464 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ jobs:

- name: 'Decontaminate previous build leftovers'
run: |
git submodule status \
|| git checkout `git rev-list --max-parents=0 HEAD | tail -n 1`
if [ -d .git ]
then
git submodule status \
|| git checkout `git rev-list --max-parents=0 HEAD | tail -n 1`
fi
- name: 'Checkout code'
uses: actions/checkout@v2
Expand Down Expand Up @@ -44,7 +47,7 @@ jobs:

- name: 'Generate branch suffix'
if: startsWith(github.ref, 'refs/tags/') != true
run: echo "SUFFIX=$(date +'%Y-%m-%d')-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
run: echo "SUFFIX=$(git rev-parse --abbrev-ref HEAD)-$(date +'%d%m%Y')-$(git rev-parse --short HEAD)" >> $GITHUB_ENV

- name: 'Build bootloader in docker'
uses: ./.github/actions/docker
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/lint_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@ jobs:
- name: 'Cleanup workspace'
uses: AutoModality/action-clean@v1

- 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
- name: 'Checkout code'
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: 'Checkout submodules: update'
run: git submodule update --init --recursive

- name: 'Checkout submodules: sync'
run: git submodule sync
submodules: true

- name: 'Docker cache'
uses: satackey/action-docker-layer-caching@v0.0.11
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@ jobs:
lint_python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@20.8b1
- name: 'Cleanup workspace'
uses: AutoModality/action-clean@v1

- 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
- name: 'Checkout code'
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: 'Setup python'
uses: actions/setup-python@v2

- name: 'Check python code with black'
uses: psf/black@20.8b1
9 changes: 7 additions & 2 deletions applications/applications.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ int32_t lfrfid_debug_app(void* p);
int32_t storage_app(void* p);
int32_t storage_app_test(void* p);
int32_t dialogs_app(void* p);
int32_t power_observer(void* p);

// On system start hooks declaration
void irda_cli_init();
Expand Down Expand Up @@ -91,6 +92,10 @@ const FlipperApplication FLIPPER_SERVICES[] = {
{.app = power_task, .name = "power_task", .stack_size = 1024, .icon = &A_Plugins_14},
#endif

#ifdef SRV_POWER_OBSERVER
{.app = power_observer, .name = "power_observer", .stack_size = 1024, .icon = &A_Plugins_14},
#endif

#ifdef SRV_BT
{.app = bt_task, .name = "bt_task", .stack_size = 1024, .icon = &A_Plugins_14},
#endif
Expand Down Expand Up @@ -139,7 +144,7 @@ const FlipperApplication FLIPPER_SERVICES[] = {
#endif

#ifdef SRV_KEYPAD_TEST
{.app = keypad_test, .name = "keypad_test", .icon = &A_Plugins_14},
{.app = keypad_test, .name = "keypad_test", .stack_size = 1024, .icon = &A_Plugins_14},
#endif

#ifdef SRV_ACCESSOR
Expand Down Expand Up @@ -268,7 +273,7 @@ const FlipperApplication FLIPPER_DEBUG_APPS[] = {
#endif

#ifdef APP_KEYPAD_TEST
{.app = keypad_test, .name = "keypad_test", .icon = &A_Plugins_14},
{.app = keypad_test, .name = "keypad_test", .stack_size = 1024, .icon = &A_Plugins_14},
#endif

#ifdef APP_ACCESSOR
Expand Down
7 changes: 7 additions & 0 deletions applications/applications.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SRV_DOLPHIN = 1
SRV_NOTIFICATION = 1
SRV_STORAGE = 1
SRV_DIALOGS = 1
SRV_POWER_OBSERVER = 1

# Main Apps
APP_IRDA = 1
Expand Down Expand Up @@ -59,6 +60,12 @@ SRV_CLI = 1
CFLAGS += -DSRV_POWER
endif

SRV_POWER_OBSERVER ?= 0
ifeq ($(SRV_POWER_OBSERVER), 1)
SRV_POWER = 1
CFLAGS += -DSRV_POWER_OBSERVER
endif

SRV_BT ?= 0
ifeq ($(SRV_BT), 1)
SRV_CLI = 1
Expand Down
3 changes: 2 additions & 1 deletion applications/archive/archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ static void archive_enter_text_input(ArchiveApp* archive) {
archive_text_input_callback,
archive,
archive->browser.text_input_buffer,
MAX_NAME_LEN);
MAX_NAME_LEN,
false);

view_dispatcher_switch_to_view(archive->view_dispatcher, ArchiveViewTextInput);
}
Expand Down
1 change: 0 additions & 1 deletion applications/cli/cli.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "cli_i.h"
#include "cli_commands.h"

#include <version.h>
#include <api-hal-version.h>
#include <loader/loader.h>

Expand Down
37 changes: 22 additions & 15 deletions applications/cli/cli_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,30 @@ void cli_command_help(Cli* cli, string_t args, void* context) {
(void)args;
printf("Commands we have:");

// Get the middle element
CliCommandTree_it_t it_mid;
uint8_t cmd_num = CliCommandTree_size(cli->commands);
uint8_t i = cmd_num / 2 + cmd_num % 2;
for(CliCommandTree_it(it_mid, cli->commands); i; --i, CliCommandTree_next(it_mid))
;
// Command count
const size_t commands_count = CliCommandTree_size(cli->commands);
const size_t commands_count_mid = commands_count / 2 + commands_count % 2;

// Use 2 iterators from start and middle to show 2 columns
CliCommandTree_it_t it_i;
CliCommandTree_it_t it_j;
for(CliCommandTree_it(it_i, cli->commands), CliCommandTree_it_set(it_j, it_mid);
!CliCommandTree_it_equal_p(it_i, it_mid);
CliCommandTree_next(it_i), CliCommandTree_next(it_j)) {
CliCommandTree_itref_t* ref = CliCommandTree_ref(it_i);
CliCommandTree_it_t it_left;
CliCommandTree_it(it_left, cli->commands);
CliCommandTree_it_t it_right;
CliCommandTree_it(it_right, cli->commands);
for(size_t i = 0; i < commands_count_mid; i++) CliCommandTree_next(it_right);

// Iterate throw tree
for(size_t i = 0; i < commands_count_mid; i++) {
printf("\r\n");
printf("%-30s", string_get_cstr(ref->key_ptr[0]));
ref = CliCommandTree_ref(it_j);
printf(string_get_cstr(ref->key_ptr[0]));
// Left Column
if(!CliCommandTree_end_p(it_left)) {
printf("%-30s", string_get_cstr(*CliCommandTree_ref(it_left)->key_ptr));
CliCommandTree_next(it_left);
}
// Right Column
if(!CliCommandTree_end_p(it_right)) {
printf(string_get_cstr(*CliCommandTree_ref(it_right)->key_ptr));
CliCommandTree_next(it_right);
}
};

if(string_size(args) > 0) {
Expand Down
3 changes: 1 addition & 2 deletions applications/dolphin/dolphin_views.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <gui/gui.h>
#include <gui/elements.h>
#include <api-hal.h>
#include <version.h>
#include <api-hal-version.h>

static char* Lockmenu_Items[3] = {"Lock", "Set PIN", "DUMB mode"};
Expand Down Expand Up @@ -40,7 +39,7 @@ void dolphin_view_first_start_draw(Canvas* canvas, void* model) {
"I am",
my_name ? my_name : "Unknown",
",\ncyberdolphin\nliving in your\npocket >");
canvas_draw_icon(canvas, 0, height - 48, &I_DolphinFirstStart5_45x53);
canvas_draw_icon(canvas, 0, height - 48, &I_DolphinFirstStart5_54x49);
elements_multiline_text_framed(canvas, 60, 17, buf);
} else if(m->page == 6) {
canvas_draw_icon(canvas, 0, height - 48, &I_DolphinFirstStart6_58x54);
Expand Down
21 changes: 9 additions & 12 deletions applications/dolphin/scenes/assets/emotes.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#pragma once

static const char* emotes_list[] = {
"(O_o)", "(!_?)", "(^_^)", "(*__*)", "(@_@)", "(X_x)", "(>_<)", "(^ ^)", "(^_^)",
"(-_-)", "(~_~)", "(#^.^#)", "(^ ^)", "(^.^)", "(-.-)", "zZzZ", "(^_-)", "(^_-)",
"(+_+)", "(+o+)", "(' ')", "('-')", "('.')", "('_')", "(* > *)", "(o o)", "(^_^)",
"(^O^)", "(^o^)", "(^o^)", "(._.)", "(_^_)", "('_')", "('_;)", "(T_T)", "(;_;)",
"(ー_ー)", "(-.-)", "(^o^)", "(-_-)", "(=_=)", "(=^ ^=)", "(. .)", "(._.)", "( ^m^)",
"(?_?)", "(*^_^*)", "(^<^)", "(^.^)", "(^·^)", "(^.^)", "(^_^.)", "(^_^)", "(^^)",
"(^J^)", "(*^.^*)", "(#^.^#)", "(~o~)", "(^o^)", "(-o-)", "(^. ^)", "(^o^)", "(*^0^*)",
"(*_*)", "(~ o ~)", "(~_~)", "(p_-)", "d[-_-]b", "(^0_0^)", "- ^ -"};

static const char* dialogues_list[] = {
"Let's hack!\n\nbla bla bla\nbla bla..",
// temp
const char* console_emotes[] = {
"Run it, m8",
"Lets GOOOO",
"Click it, buddy",
"I wanna play",
"Wtf is this?",
"Just do it",
"JUST DO IT!",
};
Loading

0 comments on commit 073c87f

Please sign in to comment.