[FL-2627] Flipper applications: SDK, build and debug system (#1387)
* Added support for running applications from SD card (FAPs - Flipper Application Packages) * Added plugin_dist target for fbt to build FAPs * All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default * Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them * Added debugging support for FAPs with fbt debug & VSCode * Added public firmware API with automated versioning Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: SG <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
* @tparam TApp application class
|
||||
* @tparam TViewModules variadic list of ViewModules
|
||||
*/
|
||||
template <typename TApp, typename... TViewModules> class ViewController {
|
||||
template <typename TApp, typename... TViewModules>
|
||||
class ViewController {
|
||||
public:
|
||||
ViewController() {
|
||||
event_queue = furi_message_queue_alloc(10, sizeof(typename TApp::Event));
|
||||
@@ -44,7 +45,8 @@ public:
|
||||
* @tparam T Concrete ViewModule class
|
||||
* @return T* ViewModule pointer
|
||||
*/
|
||||
template <typename T> T* get() {
|
||||
template <typename T>
|
||||
T* get() {
|
||||
uint32_t view_index = ext::make_type_index<T>().hash_code();
|
||||
furi_check(holder.count(view_index) != 0);
|
||||
return static_cast<T*>(holder[view_index]);
|
||||
@@ -56,7 +58,8 @@ public:
|
||||
* @tparam T Concrete ViewModule class
|
||||
* @return T* ViewModule pointer
|
||||
*/
|
||||
template <typename T> operator T*() {
|
||||
template <typename T>
|
||||
operator T*() {
|
||||
uint32_t view_index = ext::make_type_index<T>().hash_code();
|
||||
furi_check(holder.count(view_index) != 0);
|
||||
return static_cast<T*>(holder[view_index]);
|
||||
@@ -68,7 +71,8 @@ public:
|
||||
* @tparam T Concrete ViewModule class
|
||||
* @return T* ViewModule pointer
|
||||
*/
|
||||
template <typename T> void switch_to() {
|
||||
template <typename T>
|
||||
void switch_to() {
|
||||
uint32_t view_index = ext::make_type_index<T>().hash_code();
|
||||
furi_check(holder.count(view_index) != 0);
|
||||
view_dispatcher_switch_to_view(view_dispatcher, view_index);
|
||||
|
Reference in New Issue
Block a user