This commit is contained in:
Willy-JL
2023-05-14 19:52:54 +01:00
6 changed files with 16 additions and 6 deletions
+1
View File
@@ -155,6 +155,7 @@ void desktop_unlock(Desktop* desktop) {
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock)) {
furi_hal_rtc_reset_flag(FuriHalRtcFlagLock);
furi_hal_rtc_set_pin_fails(0);
Cli* cli = furi_record_open(RECORD_CLI);
cli_session_open(cli, &cli_vcp);
furi_record_close(RECORD_CLI);
@@ -56,7 +56,6 @@ static void desktop_scene_pin_input_back_callback(void* context) {
static void desktop_scene_pin_input_done_callback(const PinCode* pin_code, void* context) {
Desktop* desktop = (Desktop*)context;
if(desktop_pin_compare(&desktop->settings.pin_code, pin_code)) {
furi_hal_rtc_set_pin_fails(0);
view_dispatcher_send_custom_event(desktop->view_dispatcher, DesktopPinInputEventUnlocked);
} else {
uint32_t pin_fails = furi_hal_rtc_get_pin_fails() + 1;
+2 -2
View File
@@ -16,11 +16,11 @@ struct Version {
const char* git_hash;
const char* git_branch;
const char* build_date;
const char* custom_flipper_name;
const char* version;
// Payload bits and pieces
const uint8_t target;
const bool build_is_dirty;
const char* custom_flipper_name;
};
/* version of current running firmware (bootloader/flipper) */
@@ -31,7 +31,6 @@ static Version version = {
.git_hash = GIT_COMMIT,
.git_branch = GIT_BRANCH,
.build_date = BUILD_DATE,
.custom_flipper_name = NULL,
.version = VERSION
#ifdef FURI_RAM_EXEC
" (RAM)"
@@ -39,6 +38,7 @@ static Version version = {
,
.target = TARGET,
.build_is_dirty = BUILD_DIRTY,
.custom_flipper_name = NULL,
};
const Version* version_get(void) {
+4 -1
View File
@@ -196,7 +196,10 @@ class FlipperAppStateHelper:
self.set_debug_mode(False)
def set_debug_mode(self, mode: bool) -> None:
gdb.execute(f"set variable furi_hal_debug_gdb_session_active = {int(mode)}")
try:
gdb.execute(f"set variable furi_hal_debug_gdb_session_active = {int(mode)}")
except gdb.error as e:
print(f"Failed to set debug mode: {e}")
# Init additional 'fap-set-debug-elf-root' command and set up hooks
+8 -1
View File
@@ -57,7 +57,7 @@ class FlipperApplication:
# .fap-specific
sources: List[str] = field(default_factory=lambda: ["*.c*"])
fap_version: Tuple[int] = field(default_factory=lambda: (0, 1))
fap_version: str | Tuple[int] = "0.1"
fap_icon: Optional[str] = None
fap_libs: List[str] = field(default_factory=list)
fap_category: str = ""
@@ -85,6 +85,13 @@ class FlipperApplication:
def __post_init__(self):
if self.apptype == FlipperAppType.PLUGIN:
self.stack_size = 0
if isinstance(self.fap_version, str):
try:
self.fap_version = tuple(int(v) for v in self.fap_version.split("."))
except ValueError:
raise FlipperManifestException(
f"Invalid version string '{self.fap_version}'. Must be in the form 'major.minor'"
)
class AppManager:
@@ -8,7 +8,7 @@ App(
stack_size=2 * 1024,
fap_category="Examples",
# Optional values
# fap_version=(0, 1), # (major, minor)
# fap_version="0.1",
fap_icon="@FBT_APPID@.png", # 10x10 1-bit PNG
# fap_description="A simple app",
# fap_author="J. Doe",