karasevIA 2 лет назад
Родитель
Сommit
20e16d7cf1
4 измененных файлов с 20 добавлено и 20 удалено
  1. 5 5
      application.fam
  2. BIN
      ethernet_icon.png
  3. 12 12
      finik_eth_app.c
  4. 3 3
      finik_eth_app.h

+ 5 - 5
application.fam

@@ -1,15 +1,15 @@
 App(
 App(
-	appid="example_5",
-	name="Example 5 application",
+	appid="finik_eth",
+	name="[ETH]finik",
 	apptype=FlipperAppType.EXTERNAL,
 	apptype=FlipperAppType.EXTERNAL,
-	entry_point="example_5_app",
-	cdefines=["APP_EXAMPLE_5"],
+	entry_point="finik_eth_app",
+	cdefines=["FINIK_ETH"],
 	requires=[
 	requires=[
 		"gui",
 		"gui",
 	],
 	],
 	stack_size=1 * 1024,
 	stack_size=1 * 1024,
 	order=90,
 	order=90,
-	fap_icon="emoji_smile_icon_10x10px.png",
+	fap_icon="ethernet_icon.png",
 	fap_category="Misc",
 	fap_category="Misc",
 	fap_icon_assets="images",
 	fap_icon_assets="images",
 )
 )

BIN
ethernet_icon.png


+ 12 - 12
example_5_app.c → finik_eth_app.c

@@ -1,5 +1,5 @@
 
 
-#include "example_5_app.h"
+#include "finik_eth_app.h"
 
 
 #include <furi.h>
 #include <furi.h>
 #include <gui/gui.h>
 #include <gui/gui.h>
@@ -7,9 +7,9 @@
 #include <input/input.h>
 #include <input/input.h>
 #include <notification/notification_messages.h>
 #include <notification/notification_messages.h>
 
 
-static void example_5_app_draw_callback(Canvas* canvas, void* ctx) {
+static void finik_eth_app_draw_callback(Canvas* canvas, void* ctx) {
     furi_assert(ctx);
     furi_assert(ctx);
-    Example5App* app = ctx;
+    FinikEthApp* app = ctx;
 
 
     canvas_clear(canvas);
     canvas_clear(canvas);
 
 
@@ -30,21 +30,21 @@ static void example_5_app_draw_callback(Canvas* canvas, void* ctx) {
     }
     }
 }
 }
 
 
-static void example_5_app_input_callback(InputEvent* input_event, void* ctx) {
+static void finik_eth_app_input_callback(InputEvent* input_event, void* ctx) {
     furi_assert(ctx);
     furi_assert(ctx);
 
 
     FuriMessageQueue* event_queue = ctx;
     FuriMessageQueue* event_queue = ctx;
     furi_message_queue_put(event_queue, input_event, FuriWaitForever);
     furi_message_queue_put(event_queue, input_event, FuriWaitForever);
 }
 }
 
 
-Example5App* example_5_app_alloc() {
-    Example5App* app = malloc(sizeof(Example5App));
+FinikEthApp* finik_eth_app_alloc() {
+    FinikEthApp* app = malloc(sizeof(FinikEthApp));
 
 
     app->view_port = view_port_alloc();
     app->view_port = view_port_alloc();
     app->event_queue = furi_message_queue_alloc(8, sizeof(InputEvent));
     app->event_queue = furi_message_queue_alloc(8, sizeof(InputEvent));
 
 
-    view_port_draw_callback_set(app->view_port, example_5_app_draw_callback, app);
-    view_port_input_callback_set(app->view_port, example_5_app_input_callback, app->event_queue);
+    view_port_draw_callback_set(app->view_port, finik_eth_app_draw_callback, app);
+    view_port_input_callback_set(app->view_port, finik_eth_app_input_callback, app->event_queue);
 
 
     app->gui = furi_record_open(RECORD_GUI);
     app->gui = furi_record_open(RECORD_GUI);
     gui_add_view_port(app->gui, app->view_port, GuiLayerFullscreen);
     gui_add_view_port(app->gui, app->view_port, GuiLayerFullscreen);
@@ -54,7 +54,7 @@ Example5App* example_5_app_alloc() {
     return app;
     return app;
 }
 }
 
 
-void example_5_app_free(Example5App* app) {
+void finik_eth_app_free(FinikEthApp* app) {
     furi_assert(app);
     furi_assert(app);
 
 
     view_port_enabled_set(app->view_port, false);
     view_port_enabled_set(app->view_port, false);
@@ -67,9 +67,9 @@ void example_5_app_free(Example5App* app) {
     furi_record_close(RECORD_NOTIFICATION);
     furi_record_close(RECORD_NOTIFICATION);
 }
 }
 
 
-int32_t example_5_app(void* p) {
+int32_t finik_eth_app(void* p) {
     UNUSED(p);
     UNUSED(p);
-    Example5App* app = example_5_app_alloc();
+    FinikEthApp* app = finik_eth_app_alloc();
 
 
     InputEvent event;
     InputEvent event;
 
 
@@ -97,6 +97,6 @@ int32_t example_5_app(void* p) {
         }
         }
     }
     }
 
 
-    example_5_app_free(app);
+    finik_eth_app_free(app);
     return 0;
     return 0;
 }
 }

+ 3 - 3
example_5_app.h → finik_eth_app.h

@@ -4,7 +4,7 @@
 #include <gui/gui.h>
 #include <gui/gui.h>
 #include <notification/notification_messages.h>
 #include <notification/notification_messages.h>
 
 
-#include "example_5_icons.h"
+#include "finik_eth_icons.h"
 
 
 typedef enum {
 typedef enum {
     DRAW_ALL,
     DRAW_ALL,
@@ -13,7 +13,7 @@ typedef enum {
     TOTAL_DRAW_MODES = 3,
     TOTAL_DRAW_MODES = 3,
 } DrawMode;
 } DrawMode;
 
 
-struct Example5App {
+struct FinikEthApp {
     Gui* gui;
     Gui* gui;
     ViewPort* view_port;
     ViewPort* view_port;
     FuriMessageQueue* event_queue;
     FuriMessageQueue* event_queue;
@@ -22,7 +22,7 @@ struct Example5App {
     DrawMode draw_mode;
     DrawMode draw_mode;
 };
 };
 
 
-typedef struct Example5App Example5App;
+typedef struct FinikEthApp FinikEthApp;
 
 
 const NotificationSequence example_led_sequence = {
 const NotificationSequence example_led_sequence = {
     &message_red_255,
     &message_red_255,