[FL-2188] Fix Desktop crush: stub dolphin stats (#950)

* Fix Desktop crush: stub dolphin stats

Fix Desktop crash on butthurt > 11, so hardcoded animations
are always available. Stub good dolphin stats till
correct deeds management implemented.

* Update ReadMe to match real project structure.

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Albert Kharisov
2022-01-10 23:46:20 +04:00
committed by GitHub
parent 990a065bd0
commit 9ade2349ad
5 changed files with 94 additions and 68 deletions

40
applications/ReadMe.md Normal file
View File

@@ -0,0 +1,40 @@
# Structure
- `about` - Small About application that shows flipper info
- `accessor` - Wiegand server
- `archive` - Archive and file manager
- `bad_usb` - Bad USB application
- `bt` - BLE service and application
- `cli` - Console service and API
- `crypto` - Crypto cli tools
- `debug_tools` - Different tools that we use for debug
- `desktop` - Desktop service
- `dialogs` - Dialogs service: GUI Dialogs for your app
- `dolphin` - Dolphin service and supplementary apps
- `gpio` - GPIO application: includes USART bridge and GPIO control
- `gui` - GUI service and API
- `ibutton` - iButton application, onewire keys and more
- `input` - Input service
- `irda` - Irda application, controls your IR devices
- `irda_monitor` - Irda debug tool
- `lfrfid` - LF RFID application
- `lfrfid_debug` - LF RFID debug tool
- `loader` - Application loader service
- `music_player` - Music player app (demo)
- `nfc` - NFC application, HF rfid, EMV and etc
- `notification` - Notification service
- `power` - Power service
- `power_observer` - Power debug tool
- `rpc` - RPC service and API
- `scened_app_example` - C++ application example
- `snake_game` - Snake game application
- `storage` - Storage service, internal + sdcard
- `storage_settings` - Storage settings app
- `subghz` - Subghz application, 433 fobs and etc
- `system` - System settings, tools and API
- `tests` - Unit tests and etc
- `u2f` - U2F Application
- `application.c` - Firmware application list source
- `application.h` - Firmware application list header
- `application.mk` - Makefile helper

View File

@@ -111,13 +111,16 @@ int32_t dolphin_srv(void* p) {
furi_pubsub_publish(dolphin->pubsub, &event);
}
} else if(event.type == DolphinEventTypeStats) {
event.stats->icounter = dolphin->state->data.icounter;
event.stats->butthurt = dolphin->state->data.butthurt;
// TODO: correct icounter/butthurt changing, stub till then
event.stats->icounter = 0;
event.stats->butthurt = 0;
event.stats->timestamp = dolphin->state->data.timestamp;
event.stats->level = dolphin_get_level(dolphin->state->data.icounter);
event.stats->level_up_is_pending =
!dolphin_state_xp_to_levelup(dolphin->state->data.icounter);
event.stats->level = 1;
event.stats->level_up_is_pending = 0;
} else if(event.type == DolphinEventTypeFlush) {
// TODO: correct icounter/butthurt changing, stub till then
dolphin->state->data.butthurt = 0;
dolphin->state->data.icounter = 0;
dolphin_state_save(dolphin->state);
}
dolphin_event_release(dolphin, &event);