Skip to content

Commit

Permalink
Squashed 'applications/external/' changes from 1f6ef7e4d68..54870d87b75
Browse files Browse the repository at this point in the history
54870d87b75 UHF RFID: Consistent app naming outside GPIO folder
fa59ab9a99e GPIO Flashlight: Add pins diagram by @Kuronons
dfd6c1585d1 XRemote: Fix vertical submenu
e13097f3e01 SubGHz Remote: Fix firmware import
5f8541068b2 Format
d772d45edfb Add text_viewer from https://github.com/xMasterX/all-the-plugins
5de15386816 SubGHz Remote: Port changes from firmware
87b3ffb966c Add subghz_remote from https://github.com/DarkFlippers/SubGHz_Remote
bae8713488a SubGHz Playlist: Port changes from firmware
868ae9b789b Add subghz_playlist from https://github.com/xMasterX/all-the-plugins
2a0ca6305e3 Simpler timestamp code
9ca1e85a2f1 Fix merge
277476f3510 Add nightstand_clock from https://github.com/nymda/FlipperNightStand
cf6359a7071 Second remote for nightstand_clock
c7115e1b396 Add nightstand_clock from https://github.com/xMasterX/all-the-plugins
a0ede19e455 Mass Storage: Port changes from firmware
c33d6b403e7 Add mass_storage from https://github.com/flipperdevices/flipperzero-good-faps
56a85b1a55a Second remote for mass_storage
8f56fb7ba63 Add mass_storage from https://github.com/xMasterX/all-the-plugins
e030e184de8 Add ir_remote from https://github.com/xMasterX/all-the-plugins
7630b45810b Hex Viewer: Open file from argument, fix mem leaks
ae3f0e36689 Add hex_viewer from https://github.com/xMasterX/all-the-plugins
f82ff3c1a33 Second remote for hex_viewer
4af5f3d5a7d Add hex_viewer from https://github.com/QtRoS/flipper-zero-hex-viewer
9ac0d425ed9 Merge unitemp from https://github.com/xMasterX/all-the-plugins
48d2918da1a Merge magspoof from https://github.com/zacharyweiss/magspoof_flipper
46702d7cf27 Merge magspoof from https://github.com/xMasterX/all-the-plugins
2bf612eb7bd upd magspoof
19f451e6945 update unitemp
40433b8 Forgot to save!
536e07fddaa fix missing frees
b9a505f2ce7 ir apps add support for new settings
73ca3f2 voids just in case
a26c865 Update README.md
84befd4 Update README.md
21b2c18 Custom modulations load
b8ac01b49ef datetime fixes
9dd4b230cfd add missing furi_string_free
2ea0fac format
639b298a3a0 upd hex viewer
b735fdb9809 add some missing frees for subghz playlist
7da47eaf571 add some missing frees for subghz playlist
0586b18 fixes #5: stream_free added
fd59b7dd6d0 upd hex viewer
9857fee docs: Manifest URL to README
b98e1e1 fix: Disabled github actions (I hope) by renaming
0bb751f feat: setting font once before drawing
fe702fd fix: "percent" -> "percentage"
b181693 Create README.md
868d254 feat: added few fields to manifest
bf8aac7 feat: added two screenshots
8b710c2069b base pack apps sort
e31c716 feat: png -> bmp
ae598c3 Merge pull request #4 from hedger/master
941d01c Manifest cleanup
c4a9ff4 fixes for ufbt
b982fa5 feat: Removed unused icons
730d5c5c702 upd hex viewer
6b43606 refactor: Massive rename and cleanup
3d7a721 refactor: scene 3 deleted
3b797e0 refactor: comments removed
9c54e6b852b upd hex viewer
a4e1e64 Merge pull request #2 from QtRoS/new-app-structure
dfa00d3 feat: "Show info ..." implemented
01a4e38 feat: Minor naming changes
d5d6a62 fix: Go to works
9b5894b feat: Need to show TextInput
4496f44 feat: Dirty way of doing go to
72465ac Oops
1060f59 fix: Major bugs fixe
1fba658 fix: Minor fixes
b6c3ee6 fix: Few minor improvements. Lost events - to go
c827137 fix: Icon fixed
96c74de feat: Works but with major input lag
025d25a feat: Basically working
142973c feat: Maybe working?..
2f6b16a fix: Ongoing transition...
8f15b70 fix: Wrong rename fixes
473ce0a WIP Transition to new structure
1f8ee2d40bc fix catalog versions
fb508ea New remote design by @Svaarich
ac9a4863e3e fixing some big bugs
a905d70 Remove unused call
2081344 fix naming var for last fw
64a21d9 Merge branch 'dev' into ufw_main_app
a503df5 App manifest: fap_weburl
79a7601 Catalog: fix readme
3346c92 App manifest: UFW menuexternal
bca3518 SubGHz Remote: separate repository
444f977 Update LICENSE
9389ba4 Initial commit
96c813a1b49 add new apps and replace text viewer
0ec15e05d13 combine 1
22ed36ff7a1 combine 1
187531a1157 move base pack here
beb3ec4ae5a move base pack here
31d756eb46b move base pack here
a3f82247405 fix plugins, remove dupe
cf386461af6 move apps
7969cf50a18 move apps
1d70f57 Merge branch 'main' of https://github.com/nymda/FlipperNightStand
a0ff83c Update clock_app.c
58d89cc Update README.md
b956162 Update README.md
dfcecab Create README.md
ee76baa Uploaded files
d394dc5 Initial commit
6a2a301 Update README.md
5b8588c Update README.md
f75f44b docs: just for rebuild
7b9a7db feat: quick scrolling on press + version update
1aebc09 refactor: few renames and bugfixes
4c3a383 refactor: line -> file_offset
3c25f0c feat: Version and file size in HEX
8e00550 docs: Nightly build link fixed
f6c9cbf docs: Fixed Image in README 2
0f09900 docs: Fixed Image in README
7473822 feat: Initial commit to the new structure
2fd9131 Initial commit

git-subtree-dir: applications/external
git-subtree-split: 54870d87b75311795d5e0dce4f2fe4c99fb0bd9a
  • Loading branch information
RogueMaster committed May 4, 2024
1 parent 82b0c93 commit 064d9f7
Show file tree
Hide file tree
Showing 176 changed files with 10,279 additions and 22 deletions.
1 change: 1 addition & 0 deletions flashlight/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ App(
],
stack_size=2 * 1024,
order=20,
fap_icon_assets="icons",
fap_icon="flash10px.png",
fap_category="GPIO",
fap_author="@xMasterX",
Expand Down
12 changes: 8 additions & 4 deletions flashlight/flashlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <stdlib.h>
#include <gui/elements.h>

#include "flashlight_icons.h"

typedef enum {
EventTypeTick,
EventTypeKey,
Expand All @@ -28,17 +30,19 @@ static void render_callback(Canvas* const canvas, void* ctx) {
furi_mutex_acquire(plugin_state->mutex, FuriWaitForever);

canvas_set_font(canvas, FontPrimary);
elements_multiline_text_aligned(canvas, 64, 2, AlignCenter, AlignTop, "Flashlight");
elements_multiline_text_aligned(canvas, 64, 4, AlignCenter, AlignTop, "Flashlight");

canvas_set_font(canvas, FontSecondary);

canvas_draw_icon(canvas, 0, 17, &I_led_connections);

if(!plugin_state->is_on) {
elements_multiline_text_aligned(
canvas, 64, 28, AlignCenter, AlignTop, "Press OK button turn on");
canvas, 64, 44, AlignCenter, AlignTop, "Press OK button turn on");
} else {
elements_multiline_text_aligned(canvas, 64, 28, AlignCenter, AlignTop, "Light is on!");
elements_multiline_text_aligned(canvas, 64, 38, AlignCenter, AlignTop, "Light is on!");
elements_multiline_text_aligned(
canvas, 64, 40, AlignCenter, AlignTop, "Press OK button to off");
canvas, 64, 50, AlignCenter, AlignTop, "Press OK button to off");
}

furi_mutex_release(plugin_state->mutex);
Expand Down
Binary file added flashlight/icons/led_connections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions hex_viewer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
2 changes: 2 additions & 0 deletions hex_viewer/.gitsubtree
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/xMasterX/all-the-plugins dev base_pack/hex_viewer
https://github.com/QtRoS/flipper-zero-hex-viewer master /
21 changes: 21 additions & 0 deletions hex_viewer/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Roman Shchekin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 16 additions & 0 deletions hex_viewer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# #️⃣ Hex Viewer

Hex Viewer application for Flipper Zero!
The app allows you to view various files as HEX

**Some facts**:
- Written with pure C in a very simple and effective manner
- Tested on files up to 16Mb
- Very effective: calls `canvas_draw_str` 8 times during repaint and that's almost it
- Can also view text representation of bytes (makes it kinda poor man's text viewer)
- Has "Scroll to ..." feature which allows you to jump to any percent of file

Feel free to send PRs!

App URL: https://lab.flipper.net/apps/hex_viewer
Catalog's manifest: [flipper-application-catalog/applications/Tools/hex_viewer/manifest.yml](https://github.com/flipperdevices/flipper-application-catalog/blob/main/applications/Tools/hex_viewer/manifest.yml)
17 changes: 17 additions & 0 deletions hex_viewer/application.fam
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
App(
appid="hex_viewer",
name="HEX Viewer",
apptype=FlipperAppType.EXTERNAL,
entry_point="hex_viewer_app",
requires=[
"gui",
"dialogs",
],
stack_size=2 * 1024,
fap_icon="icons/hex_10px.bmp",
fap_icon_assets="icons",
fap_category="Tools",
fap_author="@QtRoS",
fap_version="2.0",
fap_description="App allows to view various files as HEX",
)
62 changes: 62 additions & 0 deletions hex_viewer/helpers/hex_viewer_custom_event.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#pragma once

typedef enum {
HexViewerCustomEventStartscreenUp,
HexViewerCustomEventStartscreenDown,
HexViewerCustomEventStartscreenLeft,
HexViewerCustomEventStartscreenRight,
HexViewerCustomEventStartscreenOk,
HexViewerCustomEventStartscreenBack,
HexViewerCustomEventScene1Up,
HexViewerCustomEventScene1Down,
HexViewerCustomEventScene1Left,
HexViewerCustomEventScene1Right,
HexViewerCustomEventScene1Ok,
HexViewerCustomEventScene1Back,
HexViewerCustomEventScene2Up,
HexViewerCustomEventScene2Down,
HexViewerCustomEventScene2Left,
HexViewerCustomEventScene2Right,
HexViewerCustomEventScene2Ok,
HexViewerCustomEventScene2Back,
} HexViewerCustomEvent;

enum HexViewerCustomEventType {
// Reserve first 100 events for button types and indexes, starting from 0
HexViewerCustomEventMenuVoid,
HexViewerCustomEventMenuSelected,
HexViewerCustomEventMenuPercentEntered,
};

#pragma pack(push, 1)
typedef union {
uint32_t packed_value;
struct {
uint16_t type;
int16_t value;
} content;
} HexViewerCustomEventMenu;
#pragma pack(pop)

static inline uint32_t hex_viewer_custom_menu_event_pack(uint16_t type, int16_t value) {
HexViewerCustomEventMenu event = {.content = {.type = type, .value = value}};
return event.packed_value;
}
static inline void
hex_viewer_custom_menu_event_unpack(uint32_t packed_value, uint16_t* type, int16_t* value) {
HexViewerCustomEventMenu event = {.packed_value = packed_value};
if(type) *type = event.content.type;
if(value) *value = event.content.value;
}

static inline uint16_t hex_viewer_custom_menu_event_get_type(uint32_t packed_value) {
uint16_t type;
hex_viewer_custom_menu_event_unpack(packed_value, &type, NULL);
return type;
}

static inline int16_t hex_viewer_custom_menu_event_get_value(uint32_t packed_value) {
int16_t value;
hex_viewer_custom_menu_event_unpack(packed_value, NULL, &value);
return value;
}
35 changes: 35 additions & 0 deletions hex_viewer/helpers/hex_viewer_haptic.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include "hex_viewer_haptic.h"
#include "../hex_viewer.h"

void hex_viewer_play_happy_bump(void* context) {
HexViewer* app = context;
if(app->haptic != 1) {
return;
}
notification_message(app->notification, &sequence_set_vibro_on);
furi_thread_flags_wait(0, FuriFlagWaitAny, 20);
notification_message(app->notification, &sequence_reset_vibro);
}

void hex_viewer_play_bad_bump(void* context) {
HexViewer* app = context;
if(app->haptic != 1) {
return;
}
notification_message(app->notification, &sequence_set_vibro_on);
furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
notification_message(app->notification, &sequence_reset_vibro);
}

void hex_viewer_play_long_bump(void* context) {
HexViewer* app = context;
if(app->haptic != 1) {
return;
}
for(int i = 0; i < 4; i++) {
notification_message(app->notification, &sequence_set_vibro_on);
furi_thread_flags_wait(0, FuriFlagWaitAny, 50);
notification_message(app->notification, &sequence_reset_vibro);
furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
}
}
7 changes: 7 additions & 0 deletions hex_viewer/helpers/hex_viewer_haptic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <notification/notification_messages.h>

void hex_viewer_play_happy_bump(void* context);

void hex_viewer_play_bad_bump(void* context);

void hex_viewer_play_long_bump(void* context);
39 changes: 39 additions & 0 deletions hex_viewer/helpers/hex_viewer_led.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#include "hex_viewer_led.h"
#include "../hex_viewer.h"

void hex_viewer_led_set_rgb(void* context, int red, int green, int blue) {
HexViewer* app = context;
if(app->led != 1) {
return;
}
NotificationMessage notification_led_message_1;
notification_led_message_1.type = NotificationMessageTypeLedRed;
NotificationMessage notification_led_message_2;
notification_led_message_2.type = NotificationMessageTypeLedGreen;
NotificationMessage notification_led_message_3;
notification_led_message_3.type = NotificationMessageTypeLedBlue;

notification_led_message_1.data.led.value = red;
notification_led_message_2.data.led.value = green;
notification_led_message_3.data.led.value = blue;
const NotificationSequence notification_sequence = {
&notification_led_message_1,
&notification_led_message_2,
&notification_led_message_3,
&message_do_not_reset,
NULL,
};
notification_message(app->notification, &notification_sequence);
furi_thread_flags_wait(
0, FuriFlagWaitAny, 10); //Delay, prevent removal from RAM before LED value set
}

void hex_viewer_led_reset(void* context) {
HexViewer* app = context;
notification_message(app->notification, &sequence_reset_red);
notification_message(app->notification, &sequence_reset_green);
notification_message(app->notification, &sequence_reset_blue);

furi_thread_flags_wait(
0, FuriFlagWaitAny, 300); //Delay, prevent removal from RAM before LED value set
}
5 changes: 5 additions & 0 deletions hex_viewer/helpers/hex_viewer_led.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


void hex_viewer_led_set_rgb(void* context, int red, int green, int blue);

void hex_viewer_led_reset(void* context);
26 changes: 26 additions & 0 deletions hex_viewer/helpers/hex_viewer_speaker.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "hex_viewer_speaker.h"
#include "../hex_viewer.h"

#define NOTE_INPUT 587.33f

void hex_viewer_play_input_sound(void* context) {
HexViewer* app = context;
if(app->speaker != 1) {
return;
}
float volume = 1.0f;
if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(30)) {
furi_hal_speaker_start(NOTE_INPUT, volume);
}
}

void hex_viewer_stop_all_sound(void* context) {
HexViewer* app = context;
if(app->speaker != 1) {
return;
}
if(furi_hal_speaker_is_mine()) {
furi_hal_speaker_stop();
furi_hal_speaker_release();
}
}
4 changes: 4 additions & 0 deletions hex_viewer/helpers/hex_viewer_speaker.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#define NOTE_INPUT 587.33f

void hex_viewer_play_input_sound(void* context);
void hex_viewer_stop_all_sound(void* context);
Loading

0 comments on commit 064d9f7

Please sign in to comment.