-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented custom layout page and button editing menu (#4)
* Refactored the codebase, moved common functionality outside the apps * Implemented functionality to load/store buttons for custom layout * Implemented button logic in custom layout * Implemented custom layout edit page * Finished custom layout * Updated exit button behavior on custom page * Updated remote * Updated version and changelog
- Loading branch information
Showing
24 changed files
with
922 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,38 @@ | |
# This source is part of "flipper-xremote" project | ||
# 2023 - Sandro Kalatozishvili ([email protected]) | ||
|
||
# Change it according to the root path of the used firmware | ||
FLIPPER_FIRMWARE="/opt/flipper/firmwares/unleashed-firmware" | ||
#FLIPPER_FIRMWARE="/opt/flipper/firmwares/unleashed-firmware" | ||
#FLIPPER_FIRMWARE="/opt/flipper/firmwares/flipperzero-firmware" | ||
|
||
XCLR_DIM="\x1B[2m" | ||
XCLR_RED="\x1B[31m" | ||
XCLR_RESET="\x1B[0m\n" | ||
|
||
# Parse firmware path from arguments if present | ||
for arg in "$@"; do | ||
if [[ $arg == --firmware=* || $arg == --fw=* ]]; then | ||
FLIPPER_FIRMWARE="${arg#*=}" | ||
fi | ||
done | ||
|
||
# Check if FLIPPER_FIRMWARE variable is set | ||
if [ -z "$FLIPPER_FIRMWARE" ]; then | ||
echo -e "$XCLR_RED""FLIPPER_FIRMWARE variable is not set or is empty. $XCLR_RESET" | ||
echo "You can either export FLIPPER_FIRMWARE variable:" | ||
echo -e "$XCLR_DIM""export FLIPPER_FIRMWARE=/path/to/firmware $XCLR_RESET" | ||
echo "Or pass the firmware path as an argument:" | ||
echo -e "$XCLR_DIM""$0 --fw=/path/to/firmware $XCLR_RESET" | ||
exit 1 | ||
else | ||
echo "Using firmware path: $FLIPPER_FIRMWARE" | ||
fi | ||
|
||
# Check if the path exists and has a applications_user sub directory | ||
if [[ ! -d "$FLIPPER_FIRMWARE" || ! -d "$FLIPPER_FIRMWARE/applications_user" || ! -f "$FLIPPER_FIRMWARE/fbt" ]]; then | ||
echo -e "$XCLR_RED""Firmware path does not exist or does not contain the required flipper context. $XCLR_RESET" | ||
exit 1 | ||
fi | ||
|
||
# Private variables | ||
XREMOTE_PROJ_PATH=$(dirname $(readlink -f "$0")) | ||
XREMOTE_PROJ_NAME=$(basename "$XREMOTE_PROJ_PATH") | ||
|
@@ -28,3 +56,6 @@ for arg in "$@"; do | |
[ $DEPLOY_DONE -eq 1 ] && sudo qflipper | ||
fi | ||
done | ||
|
||
# Return with success | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.