Struan Clark 2 лет назад
Родитель
Сommit
a35dd8c6fe

+ 3 - 3
flipbip.c

@@ -48,8 +48,8 @@ FlipBip* flipbip_app_alloc() {
     view_dispatcher_add_view(app->view_dispatcher, FlipBipViewIdStartscreen, flipbip_startscreen_get_view(app->flipbip_startscreen));
     app->flipbip_scene_1 = flipbip_scene_1_alloc();
     view_dispatcher_add_view(app->view_dispatcher, FlipBipViewIdScene1, flipbip_scene_1_get_view(app->flipbip_scene_1));
-    app->flipbip_scene_2 = flipbip_scene_2_alloc();
-    view_dispatcher_add_view(app->view_dispatcher, FlipBipViewIdScene2, flipbip_scene_2_get_view(app->flipbip_scene_2));
+    // app->flipbip_scene_2 = flipbip_scene_2_alloc();
+    // view_dispatcher_add_view(app->view_dispatcher, FlipBipViewIdScene2, flipbip_scene_2_get_view(app->flipbip_scene_2));
     app->variable_item_list = variable_item_list_alloc();
     view_dispatcher_add_view(app->view_dispatcher, FlipBipViewIdSettings, variable_item_list_get_view(app->variable_item_list));
 
@@ -67,7 +67,7 @@ void flipbip_app_free(FlipBip* app) {
     // View Dispatcher
     view_dispatcher_remove_view(app->view_dispatcher, FlipBipViewIdMenu);
     view_dispatcher_remove_view(app->view_dispatcher, FlipBipViewIdScene1);
-    view_dispatcher_remove_view(app->view_dispatcher, FlipBipViewIdScene2);
+    // view_dispatcher_remove_view(app->view_dispatcher, FlipBipViewIdScene2);
     view_dispatcher_remove_view(app->view_dispatcher, FlipBipViewIdSettings);
     submenu_free(app->submenu);
 

+ 3 - 3
flipbip.h

@@ -13,7 +13,7 @@
 #include "scenes/flipbip_scene.h"
 #include "views/flipbip_startscreen.h"
 #include "views/flipbip_scene_1.h"
-#include "views/flipbip_scene_2.h"
+// #include "views/flipbip_scene_2.h"
 
 typedef struct {
     Gui* gui;
@@ -24,7 +24,7 @@ typedef struct {
     VariableItemList* variable_item_list;
     FlipBipStartscreen* flipbip_startscreen;
     FlipBipScene1* flipbip_scene_1;
-    FlipBipScene2* flipbip_scene_2;
+    // FlipBipScene2* flipbip_scene_2;
     int haptic; 
     int speaker;
     int led;
@@ -35,7 +35,7 @@ typedef enum {
     FlipBipViewIdStartscreen,
     FlipBipViewIdMenu,
     FlipBipViewIdScene1,
-    FlipBipViewIdScene2,
+    // FlipBipViewIdScene2,
     FlipBipViewIdSettings,
 } FlipBipViewId;
 

+ 6 - 6
helpers/flipbip_custom_event.h

@@ -13,10 +13,10 @@ typedef enum {
     FlipBipCustomEventScene1Right,
     FlipBipCustomEventScene1Ok,
     FlipBipCustomEventScene1Back,
-    FlipBipCustomEventScene2Up,
-    FlipBipCustomEventScene2Down,
-    FlipBipCustomEventScene2Left,
-    FlipBipCustomEventScene2Right,
-    FlipBipCustomEventScene2Ok,
-    FlipBipCustomEventScene2Back,
+    // FlipBipCustomEventScene2Up,
+    // FlipBipCustomEventScene2Down,
+    // FlipBipCustomEventScene2Left,
+    // FlipBipCustomEventScene2Right,
+    // FlipBipCustomEventScene2Ok,
+    // FlipBipCustomEventScene2Back,
 } FlipBipCustomEvent;

+ 23 - 23
helpers/flipbip_speaker.c

@@ -1,27 +1,27 @@
-#include "flipbip_speaker.h"
-#include "../flipbip.h"
+// #include "flipbip_speaker.h"
+// #include "../flipbip.h"
 
-#define NOTE_INPUT 587.33f
+// #define NOTE_INPUT 587.33f
 
-void flipbip_play_input_sound(void* context) {
-    FlipBip* app = context;
-    if (app->speaker != 1) {
-        return;
-    }
-    float volume = 1.0f;
-    if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(30)) {
-        furi_hal_speaker_start(NOTE_INPUT, volume);
-    }
+// void flipbip_play_input_sound(void* context) {
+//     FlipBip* app = context;
+//     if (app->speaker != 1) {
+//         return;
+//     }
+//     float volume = 1.0f;
+//     if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(30)) {
+//         furi_hal_speaker_start(NOTE_INPUT, volume);
+//     }
     
-}
+// }
 
-void flipbip_stop_all_sound(void* context) {
-    FlipBip* app = context;
-    if (app->speaker != 1) {
-        return;
-    }
-    if(furi_hal_speaker_is_mine()) {
-        furi_hal_speaker_stop();
-        furi_hal_speaker_release();
-    }
-}
+// void flipbip_stop_all_sound(void* context) {
+//     FlipBip* app = context;
+//     if (app->speaker != 1) {
+//         return;
+//     }
+//     if(furi_hal_speaker_is_mine()) {
+//         furi_hal_speaker_stop();
+//         furi_hal_speaker_release();
+//     }
+// }

+ 3 - 3
helpers/flipbip_speaker.h

@@ -1,4 +1,4 @@
-#define NOTE_INPUT 587.33f
+// #define NOTE_INPUT 587.33f
 
-void flipbip_play_input_sound(void* context);
-void flipbip_stop_all_sound(void* context);
+// void flipbip_play_input_sound(void* context);
+// void flipbip_stop_all_sound(void* context);

+ 1 - 1
scenes/flipbip_scene_config.h

@@ -1,5 +1,5 @@
 ADD_SCENE(flipbip, startscreen, Startscreen)
 ADD_SCENE(flipbip, menu, Menu)
 ADD_SCENE(flipbip, scene_1, Scene_1)
-ADD_SCENE(flipbip, scene_2, Scene_2)
+// ADD_SCENE(flipbip, scene_2, Scene_2)
 ADD_SCENE(flipbip, settings, Settings)

+ 6 - 6
scenes/flipbip_scene_menu.c

@@ -2,7 +2,7 @@
 
 enum SubmenuIndex {
     SubmenuIndexScene1 = 10,
-    SubmenuIndexScene2,
+    // SubmenuIndexScene2,
     SubmenuIndexSettings,
 };
 
@@ -37,11 +37,11 @@ bool flipbip_scene_menu_on_event(void* context, SceneManagerEvent event) {
                 app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1);
             scene_manager_next_scene(app->scene_manager, FlipBipSceneScene_1);
             return true;
-        } else if (event.event == SubmenuIndexScene2) {
-            scene_manager_set_scene_state(
-                app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene2);
-            scene_manager_next_scene(app->scene_manager, FlipBipSceneScene_2);
-            return true;
+        // } else if (event.event == SubmenuIndexScene2) {
+        //     scene_manager_set_scene_state(
+        //         app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene2);
+        //     scene_manager_next_scene(app->scene_manager, FlipBipSceneScene_2);
+        //     return true;
         } else if (event.event == SubmenuIndexSettings) {
             scene_manager_set_scene_state(
                 app->scene_manager, FlipBipSceneMenu, SubmenuIndexSettings);

+ 46 - 46
scenes/flipbip_scene_scene_2.c

@@ -1,53 +1,53 @@
-#include "../flipbip.h"
-#include "../helpers/flipbip_custom_event.h"
-#include "../helpers/flipbip_haptic.h"
-#include "../helpers/flipbip_led.h"
-#include "../views/flipbip_scene_2.h"
+// #include "../flipbip.h"
+// #include "../helpers/flipbip_custom_event.h"
+// #include "../helpers/flipbip_haptic.h"
+// #include "../helpers/flipbip_led.h"
+// #include "../views/flipbip_scene_2.h"
 
-void flipbip_scene_2_callback(FlipBipCustomEvent event, void* context) {
-    furi_assert(context);
-    FlipBip* app = context;
-    view_dispatcher_send_custom_event(app->view_dispatcher, event);
-}
+// void flipbip_scene_2_callback(FlipBipCustomEvent event, void* context) {
+//     furi_assert(context);
+//     FlipBip* app = context;
+//     view_dispatcher_send_custom_event(app->view_dispatcher, event);
+// }
 
-void flipbip_scene_scene_2_on_enter(void* context) {
-    furi_assert(context);
-    FlipBip* app = context;
-    flipbip_scene_2_set_callback(app->flipbip_scene_2, flipbip_scene_2_callback, app);
-    view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdScene2);
-}
+// void flipbip_scene_scene_2_on_enter(void* context) {
+//     furi_assert(context);
+//     FlipBip* app = context;
+//     flipbip_scene_2_set_callback(app->flipbip_scene_2, flipbip_scene_2_callback, app);
+//     view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdScene2);
+// }
 
-bool flipbip_scene_scene_2_on_event(void* context, SceneManagerEvent event) {
-    FlipBip* app = context;
-    bool consumed = false;
+// bool flipbip_scene_scene_2_on_event(void* context, SceneManagerEvent event) {
+//     FlipBip* app = context;
+//     bool consumed = false;
 
-    if(event.type == SceneManagerEventTypeCustom) {
-        switch(event.event) {
-            case FlipBipCustomEventScene2Left:
-            case FlipBipCustomEventScene2Right:
-                break;
-            case FlipBipCustomEventScene2Up:
-            case FlipBipCustomEventScene2Down:
-                break;
-            case FlipBipCustomEventScene2Back:
-                notification_message(app->notification, &sequence_reset_red);
-                notification_message(app->notification, &sequence_reset_green);
-                notification_message(app->notification, &sequence_reset_blue);
-                if(!scene_manager_search_and_switch_to_previous_scene(
-                    app->scene_manager, FlipBipSceneMenu)) {
-                        scene_manager_stop(app->scene_manager);
-                        view_dispatcher_stop(app->view_dispatcher);
-                    }
-                consumed = true;
-                break;
-        }
-    }
+//     if(event.type == SceneManagerEventTypeCustom) {
+//         switch(event.event) {
+//             case FlipBipCustomEventScene2Left:
+//             case FlipBipCustomEventScene2Right:
+//                 break;
+//             case FlipBipCustomEventScene2Up:
+//             case FlipBipCustomEventScene2Down:
+//                 break;
+//             case FlipBipCustomEventScene2Back:
+//                 notification_message(app->notification, &sequence_reset_red);
+//                 notification_message(app->notification, &sequence_reset_green);
+//                 notification_message(app->notification, &sequence_reset_blue);
+//                 if(!scene_manager_search_and_switch_to_previous_scene(
+//                     app->scene_manager, FlipBipSceneMenu)) {
+//                         scene_manager_stop(app->scene_manager);
+//                         view_dispatcher_stop(app->view_dispatcher);
+//                     }
+//                 consumed = true;
+//                 break;
+//         }
+//     }
 
-    return consumed;
-}
+//     return consumed;
+// }
 
-void flipbip_scene_scene_2_on_exit(void* context) {
-    FlipBip* app = context;
-    UNUSED(app);
-}
+// void flipbip_scene_scene_2_on_exit(void* context) {
+//     FlipBip* app = context;
+//     UNUSED(app);
+// }
 

+ 2 - 2
views/flipbip_scene_1.c

@@ -5,7 +5,7 @@
 #include <gui/elements.h>
 #include <dolphin/dolphin.h>
 #include "../helpers/flipbip_haptic.h"
-#include "../helpers/flipbip_speaker.h"
+//#include "../helpers/flipbip_speaker.h"
 #include "../helpers/flipbip_led.h"
 #include "../helpers/flipbip_string.h"
 
@@ -164,8 +164,8 @@ static void flipbip_scene_1_model_init(FlipBipScene1Model* const model, const in
     // constants for Bitcoin
     const uint32_t version_public = 0x0488b21e;
     const uint32_t version_private = 0x0488ade4;
-    
     //const char addr_version = 0x00, wif_version = 0x80;
+    
     const size_t buflen = 128;
     char buf[buflen + 1];
     

+ 245 - 245
views/flipbip_scene_2.c

@@ -1,254 +1,254 @@
-#include "../flipbip.h"
-#include <furi.h>
-#include <furi_hal.h>
-#include <input/input.h>
-#include <gui/elements.h>
-#include <dolphin/dolphin.h>
-#include "../helpers/flipbip_haptic.h"
-#include "../helpers/flipbip_speaker.h"
-#include "../helpers/flipbip_led.h"
-
-struct FlipBipScene2 {
-    View* view;
-    FlipBipScene2Callback callback;
-    void* context;
-};
-
-typedef struct {
-    int screen_text;
-} FlipBipScene2Model;
-
-char buttonText[11][14] = {
-    "",
-    "Press Up",
-    "Press Down",
-    "Press Left",
-    "Press Right",
-    "Press Ok",
-    "Release Up",
-    "Release Down",
-    "Release Left",
-    "Release Right",
-    "Release Ok",
-};
-
-void flipbip_scene_2_set_callback(
-    FlipBipScene2* instance,
-    FlipBipScene2Callback callback,
-    void* context) {
-    furi_assert(instance);
-    furi_assert(callback);
-    instance->callback = callback;
-    instance->context = context;
-}
-
-void flipbip_scene_2_draw(Canvas* canvas, FlipBipScene2Model* model) {
-    canvas_clear(canvas);
-    canvas_set_color(canvas, ColorBlack);
-    canvas_set_font(canvas, FontPrimary);
-    canvas_draw_str_aligned(canvas, 0, 10, AlignLeft, AlignTop, "Scene 2: Input Examples"); 
-    canvas_set_font(canvas, FontSecondary);
-    char *strInput = malloc(15);
-    strcpy(strInput, buttonText[model->screen_text]);
-    canvas_draw_str_aligned(canvas, 0, 22, AlignLeft, AlignTop, strInput); 
-    free(strInput);
-}
-
-static void flipbip_scene_2_model_init(FlipBipScene2Model* const model) {
-    model->screen_text = 0;
-}
-
-bool flipbip_scene_2_input(InputEvent* event, void* context) {
-    furi_assert(context);
-    FlipBipScene2* instance = context;
-    if (event->type == InputTypeRelease) {
-        switch(event->key) {
-            case InputKeyBack:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        UNUSED(model);
-                        flipbip_stop_all_sound(instance->context);
-                        instance->callback(FlipBipCustomEventScene2Back, instance->context);
-                        flipbip_play_long_bump(instance->context);
-                    },
-                    true);
-                break;
-            case InputKeyUp:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 6;
-                        flipbip_play_bad_bump(instance->context);
-                        flipbip_stop_all_sound(instance->context);
-                        flipbip_led_set_rgb(instance->context, 255, 0, 255);
-                    },
-                    true);
-                break;
-            case InputKeyDown:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 7;
-                        flipbip_play_bad_bump(instance->context);
-                        flipbip_stop_all_sound(instance->context);
-                        flipbip_led_set_rgb(instance->context, 255, 255, 0);
-                    },
-                    true);
-                break;
-            case InputKeyLeft:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 8;
-                        flipbip_play_bad_bump(instance->context);
-                        flipbip_stop_all_sound(instance->context);
-                        flipbip_led_set_rgb(instance->context, 0, 255, 255);
-                    },
-                    true);
-                break;
-            case InputKeyRight:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 9;
-                        flipbip_play_bad_bump(instance->context);
-                        flipbip_stop_all_sound(instance->context);
-                        flipbip_led_set_rgb(instance->context, 255, 0, 0);
-                    },
-                    true);
-                break;
-            case InputKeyOk:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 10;
-                        flipbip_play_bad_bump(instance->context);
-                        flipbip_stop_all_sound(instance->context);
-                        flipbip_led_set_rgb(instance->context, 255, 255, 255);
-                    },
-                    true);
-                break;
-            case InputKeyMAX:
-                break;
-        }
-    } else if (event->type == InputTypePress) {
-         switch(event->key) {
-            case InputKeyUp:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 1;
-                        flipbip_play_happy_bump(instance->context);
-                        flipbip_play_input_sound(instance->context);
-                    },
-                    true);
-                break;
-            case InputKeyDown:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 2;
-                        flipbip_play_happy_bump(instance->context);
-                        flipbip_play_input_sound(instance->context);
-                    },
-                    true);
-                break;
-            case InputKeyLeft:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 3;
-                        flipbip_play_happy_bump(instance->context);
-                        flipbip_play_input_sound(instance->context);
-                    },
-                    true);
-                break;
-            case InputKeyRight:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 4;
-                        flipbip_play_happy_bump(instance->context);
-                        flipbip_play_input_sound(instance->context);
-                    },
-                    true);
-                break;
-            case InputKeyOk:
-                with_view_model(
-                    instance->view,
-                    FlipBipScene2Model * model,
-                    {
-                        model->screen_text = 5;
-                        flipbip_play_happy_bump(instance->context);
-                        flipbip_play_input_sound(instance->context);
-                    },
-                    true);
-                break;
-            case InputKeyBack:
-            case InputKeyMAX:
-                break;
-        }
-    }
+// #include "../flipbip.h"
+// #include <furi.h>
+// #include <furi_hal.h>
+// #include <input/input.h>
+// #include <gui/elements.h>
+// #include <dolphin/dolphin.h>
+// #include "../helpers/flipbip_haptic.h"
+// //#include "../helpers/flipbip_speaker.h"
+// #include "../helpers/flipbip_led.h"
+
+// struct FlipBipScene2 {
+//     View* view;
+//     FlipBipScene2Callback callback;
+//     void* context;
+// };
+
+// typedef struct {
+//     int screen_text;
+// } FlipBipScene2Model;
+
+// char buttonText[11][14] = {
+//     "",
+//     "Press Up",
+//     "Press Down",
+//     "Press Left",
+//     "Press Right",
+//     "Press Ok",
+//     "Release Up",
+//     "Release Down",
+//     "Release Left",
+//     "Release Right",
+//     "Release Ok",
+// };
+
+// void flipbip_scene_2_set_callback(
+//     FlipBipScene2* instance,
+//     FlipBipScene2Callback callback,
+//     void* context) {
+//     furi_assert(instance);
+//     furi_assert(callback);
+//     instance->callback = callback;
+//     instance->context = context;
+// }
+
+// void flipbip_scene_2_draw(Canvas* canvas, FlipBipScene2Model* model) {
+//     canvas_clear(canvas);
+//     canvas_set_color(canvas, ColorBlack);
+//     canvas_set_font(canvas, FontPrimary);
+//     canvas_draw_str_aligned(canvas, 0, 10, AlignLeft, AlignTop, "Scene 2: Input Examples"); 
+//     canvas_set_font(canvas, FontSecondary);
+//     char *strInput = malloc(15);
+//     strcpy(strInput, buttonText[model->screen_text]);
+//     canvas_draw_str_aligned(canvas, 0, 22, AlignLeft, AlignTop, strInput); 
+//     free(strInput);
+// }
+
+// static void flipbip_scene_2_model_init(FlipBipScene2Model* const model) {
+//     model->screen_text = 0;
+// }
+
+// bool flipbip_scene_2_input(InputEvent* event, void* context) {
+//     furi_assert(context);
+//     FlipBipScene2* instance = context;
+//     if (event->type == InputTypeRelease) {
+//         switch(event->key) {
+//             case InputKeyBack:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         UNUSED(model);
+//                         //flipbip_stop_all_sound(instance->context);
+//                         instance->callback(FlipBipCustomEventScene2Back, instance->context);
+//                         flipbip_play_long_bump(instance->context);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyUp:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 6;
+//                         flipbip_play_bad_bump(instance->context);
+//                         //flipbip_stop_all_sound(instance->context);
+//                         flipbip_led_set_rgb(instance->context, 255, 0, 255);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyDown:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 7;
+//                         flipbip_play_bad_bump(instance->context);
+//                         //flipbip_stop_all_sound(instance->context);
+//                         flipbip_led_set_rgb(instance->context, 255, 255, 0);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyLeft:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 8;
+//                         flipbip_play_bad_bump(instance->context);
+//                         //flipbip_stop_all_sound(instance->context);
+//                         flipbip_led_set_rgb(instance->context, 0, 255, 255);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyRight:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 9;
+//                         flipbip_play_bad_bump(instance->context);
+//                         //flipbip_stop_all_sound(instance->context);
+//                         flipbip_led_set_rgb(instance->context, 255, 0, 0);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyOk:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 10;
+//                         flipbip_play_bad_bump(instance->context);
+//                         //flipbip_stop_all_sound(instance->context);
+//                         flipbip_led_set_rgb(instance->context, 255, 255, 255);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyMAX:
+//                 break;
+//         }
+//     } else if (event->type == InputTypePress) {
+//          switch(event->key) {
+//             case InputKeyUp:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 1;
+//                         flipbip_play_happy_bump(instance->context);
+//                         //flipbip_play_input_sound(instance->context);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyDown:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 2;
+//                         flipbip_play_happy_bump(instance->context);
+//                         //flipbip_play_input_sound(instance->context);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyLeft:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 3;
+//                         flipbip_play_happy_bump(instance->context);
+//                         //flipbip_play_input_sound(instance->context);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyRight:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 4;
+//                         flipbip_play_happy_bump(instance->context);
+//                         //flipbip_play_input_sound(instance->context);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyOk:
+//                 with_view_model(
+//                     instance->view,
+//                     FlipBipScene2Model * model,
+//                     {
+//                         model->screen_text = 5;
+//                         flipbip_play_happy_bump(instance->context);
+//                         //flipbip_play_input_sound(instance->context);
+//                     },
+//                     true);
+//                 break;
+//             case InputKeyBack:
+//             case InputKeyMAX:
+//                 break;
+//         }
+//     }
     
-    return true;
-}
-
-void flipbip_scene_2_exit(void* context) {
-    furi_assert(context);
-    FlipBip* app = context;
-    flipbip_stop_all_sound(app);
-    //flipbip_led_reset(app);
-}
-
-void flipbip_scene_2_enter(void* context) {
-    furi_assert(context);
-    DOLPHIN_DEED(DolphinDeedPluginStart);
-}
-
-FlipBipScene2* flipbip_scene_2_alloc() {
-    FlipBipScene2* instance = malloc(sizeof(FlipBipScene2));
-    instance->view = view_alloc();
-    view_allocate_model(instance->view, ViewModelTypeLocking, sizeof(FlipBipScene2Model));
-    view_set_context(instance->view, instance);
-    view_set_draw_callback(instance->view, (ViewDrawCallback)flipbip_scene_2_draw);
-    view_set_input_callback(instance->view, flipbip_scene_2_input);
-    //view_set_enter_callback(instance->view, flipbip_scene_2_enter);
-    view_set_exit_callback(instance->view, flipbip_scene_2_exit);
-
-    with_view_model(
-        instance->view,
-        FlipBipScene2Model * model,
-        {
-            flipbip_scene_2_model_init(model);
-        },
-        true);
+//     return true;
+// }
+
+// void flipbip_scene_2_exit(void* context) {
+//     furi_assert(context);
+//     //FlipBip* app = context;
+//     //flipbip_stop_all_sound(app);
+//     //flipbip_led_reset(app);
+// }
+
+// void flipbip_scene_2_enter(void* context) {
+//     furi_assert(context);
+//     DOLPHIN_DEED(DolphinDeedPluginStart);
+// }
+
+// FlipBipScene2* flipbip_scene_2_alloc() {
+//     FlipBipScene2* instance = malloc(sizeof(FlipBipScene2));
+//     instance->view = view_alloc();
+//     view_allocate_model(instance->view, ViewModelTypeLocking, sizeof(FlipBipScene2Model));
+//     view_set_context(instance->view, instance);
+//     view_set_draw_callback(instance->view, (ViewDrawCallback)flipbip_scene_2_draw);
+//     view_set_input_callback(instance->view, flipbip_scene_2_input);
+//     //view_set_enter_callback(instance->view, flipbip_scene_2_enter);
+//     view_set_exit_callback(instance->view, flipbip_scene_2_exit);
+
+//     with_view_model(
+//         instance->view,
+//         FlipBipScene2Model * model,
+//         {
+//             flipbip_scene_2_model_init(model);
+//         },
+//         true);
     
-    return instance;
-}
+//     return instance;
+// }
 
-void flipbip_scene_2_free(FlipBipScene2* instance) {
-    furi_assert(instance);
+// void flipbip_scene_2_free(FlipBipScene2* instance) {
+//     furi_assert(instance);
 
 
-    view_free(instance->view);
-    free(instance);
-}
+//     view_free(instance->view);
+//     free(instance);
+// }
 
-View* flipbip_scene_2_get_view(FlipBipScene2* instance) {
-    furi_assert(instance);
+// View* flipbip_scene_2_get_view(FlipBipScene2* instance) {
+//     furi_assert(instance);
 
 
-    return instance->view;
-}
+//     return instance->view;
+// }
 

+ 12 - 12
views/flipbip_scene_2.h

@@ -1,19 +1,19 @@
-#pragma once
+// #pragma once
 
-#include <gui/view.h>
-#include "../helpers/flipbip_custom_event.h"
+// #include <gui/view.h>
+// #include "../helpers/flipbip_custom_event.h"
 
-typedef struct FlipBipScene2 FlipBipScene2;
+// typedef struct FlipBipScene2 FlipBipScene2;
 
-typedef void (*FlipBipScene2Callback)(FlipBipCustomEvent event, void* context);
+// typedef void (*FlipBipScene2Callback)(FlipBipCustomEvent event, void* context);
 
-void flipbip_scene_2_set_callback(
-    FlipBipScene2* instance,
-    FlipBipScene2Callback callback,
-    void * context);
+// void flipbip_scene_2_set_callback(
+//     FlipBipScene2* instance,
+//     FlipBipScene2Callback callback,
+//     void * context);
 
-FlipBipScene2* flipbip_scene_2_alloc();
+// FlipBipScene2* flipbip_scene_2_alloc();
 
-void flipbip_scene_2_free(FlipBipScene2* flipbip_static);
+// void flipbip_scene_2_free(FlipBipScene2* flipbip_static);
 
-View* flipbip_scene_2_get_view(FlipBipScene2* boilerpate_static);
+// View* flipbip_scene_2_get_view(FlipBipScene2* boilerpate_static);