Release Candidate Bug Fixes and Improvements (#1121)
* Notification: use all input for backlight, otherwise it is causing issues on repeat. Dolphin: rework debug tools. * Notification: remove unused variable * Applications: fix incorrect count in system apps list * SubGhz: fix memory leak in settings * SubGhz: fix incorrect frequency in newly created keys * Loader: make cli command parallel safe
This commit is contained in:
@@ -52,7 +52,10 @@ typedef enum {
|
||||
|
||||
DolphinDeedU2fAuthorized,
|
||||
|
||||
DolphinDeedMAX
|
||||
DolphinDeedMAX,
|
||||
|
||||
DolphinDeedTestLeft,
|
||||
DolphinDeedTestRight,
|
||||
} DolphinDeed;
|
||||
|
||||
typedef struct {
|
||||
|
@@ -126,6 +126,23 @@ uint32_t dolphin_state_xp_to_levelup(uint32_t icounter) {
|
||||
}
|
||||
|
||||
void dolphin_state_on_deed(DolphinState* dolphin_state, DolphinDeed deed) {
|
||||
// Special case for testing
|
||||
if(deed > DolphinDeedMAX) {
|
||||
if(deed == DolphinDeedTestLeft) {
|
||||
dolphin_state->data.butthurt =
|
||||
CLAMP(dolphin_state->data.butthurt + 1, BUTTHURT_MAX, BUTTHURT_MIN);
|
||||
if(dolphin_state->data.icounter > 0) dolphin_state->data.icounter--;
|
||||
dolphin_state->data.timestamp = dolphin_state_timestamp();
|
||||
dolphin_state->dirty = true;
|
||||
} else if(deed == DolphinDeedTestRight) {
|
||||
dolphin_state->data.butthurt = BUTTHURT_MIN;
|
||||
if(dolphin_state->data.icounter < UINT32_MAX) dolphin_state->data.icounter++;
|
||||
dolphin_state->data.timestamp = dolphin_state_timestamp();
|
||||
dolphin_state->dirty = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
DolphinApp app = dolphin_deed_get_app(deed);
|
||||
int8_t weight_limit =
|
||||
dolphin_deed_get_app_limit(app) - dolphin_state->data.icounter_daily_limit[app];
|
||||
|
Reference in New Issue
Block a user