forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
views/trade: Cease my abuse of View model
After converting select_pokemon, it only makes sense to clean up trade as well. There were a number of globals vars passed in the main PokemonFap struct that are only used by trade and have been moved to the View model data. There are also currently still some globals vars in the trade code that could either be relocated to specific functions or moved in to the trade View model. This also adds a periodic timer to the trade view. The functions that get called through the lifetime of the trade process are mostly in an interrupt context. This means we cannot request a View update via with_view_model(). In order to handle regular drawing, a timer is used to call a function out of an interrupt context that does a null with_view_model() to simply trigger a redraw.
- Loading branch information
1 parent
5ce0ed1
commit 5884a74
Showing
2 changed files
with
102 additions
and
49 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