Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: .sub playlist plugin #62

Merged
merged 32 commits into from
Sep 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1bb1022
feat[brutehelper]: initial commit
darmiel Aug 7, 2022
31e06da
Merge branch 'Eng1n33r:dev' into feat/brute-helper
darmiel Aug 7, 2022
05b6f9a
refactor: rebrand `brute-helper` to `playlist`
darmiel Aug 7, 2022
f6a071e
feat[playlist]: worker thread
darmiel Aug 8, 2022
1a52e55
feat[playlist]: display current .sub
darmiel Aug 8, 2022
c8ad361
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 8, 2022
7c1a48a
refactor[playlist]: remove unused includes
darmiel Aug 8, 2022
9b89acf
feat[playlist]: basic controls
darmiel Aug 8, 2022
b2ba7b5
feat[playlist]: display history
darmiel Aug 8, 2022
ac08c92
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 9, 2022
f0937e9
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 10, 2022
b7922a2
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 10, 2022
91c7441
Update Frequency analyzer by @ClusterM
xMasterX Aug 10, 2022
d13b4e3
feat[playlist]: implementd sending
darmiel Aug 10, 2022
4c2e38b
refactor[playlist]: repetitions
darmiel Aug 10, 2022
b67dfb5
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 10, 2022
d926516
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 11, 2022
5cb074f
fix[playlist]: crash & mass send on pause
darmiel Aug 11, 2022
a8eb53a
fix[playlist]: resending playlist
darmiel Aug 11, 2022
1a60093
feat[playlist]: overview view
darmiel Aug 11, 2022
f84d5e9
refactor[playlist]: made app a plugin
darmiel Aug 11, 2022
2ad9aec
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 12, 2022
7acd814
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 14, 2022
a8895d5
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 15, 2022
365d297
feat[playlist]: repeat (implements #1)
darmiel Aug 17, 2022
7681e9a
Merge branch 'Eng1n33r:dev' into feat/playlist
darmiel Aug 17, 2022
58cc7c1
feat[playlist]: redesign (implements #2)
darmiel Aug 17, 2022
380fe26
Merge remote-tracking branch 'upstream/dev' into feat/playlist
darmiel Aug 24, 2022
fe7d089
Merge remote-tracking branch 'upstream/dev' into feat/playlist
darmiel Aug 24, 2022
b107274
fix: removed converter app (missed that while merging)
darmiel Aug 24, 2022
239eca0
Merge branch 'dev' of github.com:Eng1n33r/flipperzero-firmware into f…
darmiel Sep 10, 2022
e0efb2b
change log type and move power suppress
xMasterX Sep 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions applications/meta/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,6 @@ App(
"multi_converter",
"flipfrid",
"subbrute",
"sub_playlist",
],
)
10 changes: 10 additions & 0 deletions applications/playlist/application.fam
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
App(
appid="sub_playlist",
name=".sub Playlist",
apptype=FlipperAppType.PLUGIN,
entry_point="playlist_app",
cdefines=["APP_PLAYLIST"],
requires=["storage", "gui", "dialogs", "subghz"],
stack_size=2 * 1024,
order=14,
)
81 changes: 81 additions & 0 deletions applications/playlist/canvas_helper.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#include <gui/gui.h>

#define WIDTH 128
#define HEIGHT 64

void draw_centered_boxed_str(Canvas* canvas, int x, int y, int height, int pad, const char* text) {
// get width of text
int w = canvas_string_width(canvas, text);
canvas_draw_rframe(canvas, x, y, w + pad, height, 2);
canvas_draw_str_aligned(canvas, x + pad / 2, y + height / 2, AlignLeft, AlignCenter, text);
}

void draw_corner_aligned(Canvas* canvas, int width, int height, Align horizontal, Align vertical) {
canvas_set_color(canvas, ColorBlack);
switch(horizontal) {
case AlignLeft:
switch(vertical) {
case AlignTop:
canvas_draw_rbox(canvas, 0, 0, width, height, 3);
canvas_draw_box(canvas, 0, 0, width, 3);
canvas_draw_box(canvas, 0, 0, 3, height);
break;
case AlignCenter:
canvas_draw_rbox(canvas, 0, HEIGHT - height / 2, width, height, 3);
canvas_draw_box(canvas, 0, HEIGHT - height / 2, 3, height);
break;
case AlignBottom:
canvas_draw_rbox(canvas, 0, HEIGHT - height, width, height, 3);
canvas_draw_box(canvas, 0, HEIGHT - height, 3, height);
canvas_draw_box(canvas, 0, HEIGHT - 3, width, 3);
break;
default:
break;
}
break;
case AlignRight:
switch(vertical) {
case AlignTop:
canvas_draw_rbox(canvas, WIDTH - width, 0, width, height, 3);
canvas_draw_box(canvas, WIDTH - width, 0, width, 3); // bottom corner
canvas_draw_box(canvas, WIDTH - 3, 0, 3, height); // right corner
break;
case AlignCenter:
canvas_draw_rbox(canvas, WIDTH - width, HEIGHT / 2 - height / 2, width, height, 3);
canvas_draw_box(canvas, WIDTH - 3, HEIGHT / 2 - height / 2, 3, height); // right corner
break;
case AlignBottom:
canvas_draw_rbox(canvas, WIDTH - width, HEIGHT - height, width, height, 3);
canvas_draw_box(canvas, WIDTH - 3, HEIGHT - height, 3, height); // right corner
canvas_draw_box(canvas, WIDTH - width, HEIGHT - 3, width, 3); // bottom corner
break;
default:
break;
}
break;
case AlignCenter:
switch(vertical) {
case AlignTop:
canvas_draw_rbox(canvas, WIDTH / 2 - width / 2, 0, width, height, 3);
canvas_draw_box(canvas, WIDTH / 2 - width / 2, 0, width, 3); // bottom corner
canvas_draw_box(canvas, WIDTH / 2 - 3, 0, 3, height); // right corner
break;
case AlignCenter:
canvas_draw_rbox(
canvas, WIDTH / 2 - width / 2, HEIGHT / 2 - height / 2, width, height, 3);
canvas_draw_box(
canvas, WIDTH / 2 - 3, HEIGHT / 2 - height / 2, 3, height); // right corner
break;
case AlignBottom:
canvas_draw_rbox(canvas, WIDTH / 2 - width / 2, HEIGHT - height, width, height, 3);
canvas_draw_box(canvas, WIDTH / 2 - 3, HEIGHT - height, 3, height); // right corner
canvas_draw_box(canvas, WIDTH / 2 - width / 2, HEIGHT - 3, width, 3); // bottom corner
break;
default:
break;
}
break;
default:
break;
}
}
5 changes: 5 additions & 0 deletions applications/playlist/canvas_helper.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <gui/gui.h>

void draw_centered_boxed_str(Canvas* canvas, int x, int y, int height, int pad, const char* text);

void draw_corner_aligned(Canvas* canvas, int width, int height, Align horizontal, Align vertical);
Loading