Просмотр исходного кода

renamed stuff to eth_troubleshooter

Anton Stadie 2 лет назад
Родитель
Сommit
4d6e727dc6
5 измененных файлов с 28 добавлено и 28 удалено
  1. 5 5
      application.fam
  2. 19 19
      eth_troubleshooter_app.c
  3. 3 3
      eth_troubleshooter_app.h
  4. 1 1
      eth_view_process.c
  5. 0 0
      images/ethernet_icon_10x10px.png

+ 5 - 5
application.fam

@@ -1,16 +1,16 @@
 App(
-	appid="finik_eth",
-	name="finik[eth]",
+	appid="eth_troubleshooter",
+	name="Ethernet Troubleshooter",
 	apptype=FlipperAppType.EXTERNAL,
-	entry_point="finik_eth_app",
-	cdefines=["FINIK_ETH"],
+	entry_point="eth_troubleshooter_app",
+	cdefines=["ETH_TROUBLESHOOTER"],
 	requires=[
 		"gui",
         "power",
 	],
 	stack_size=20*1024,
 	order=90,
-	fap_icon="images/ehternet_icon_10x10px.png",
+	fap_icon="images/ethernet_icon_10x10px.png",
     fap_category="GPIO",
 	fap_icon_assets="images",
 	fap_private_libs=[

+ 19 - 19
finik_eth_app.c → eth_troubleshooter_app.c

@@ -1,5 +1,5 @@
 
-#include "finik_eth_app.h"
+#include "eth_troubleshooter_app.h"
 
 #include <furi.h>
 #include <furi_hal_power.h>
@@ -12,7 +12,7 @@
 #include "eth_worker_i.h"
 #include "eth_view_process.h"
 
-#define TAG "FinikEthApp"
+#define TAG "EthTroubleshooterApp"
 
 static void draw_process_selector(Canvas* canvas, DrawProcess selector, CursorPosition cursor) {
     uint8_t y = 0;
@@ -55,9 +55,9 @@ static void draw_battery_cunsumption(Canvas* canvas, double cons) {
     furi_string_free(string);
 }
 
-static void finik_eth_app_draw_callback(Canvas* canvas, void* ctx) {
+static void eth_troubleshooter_app_draw_callback(Canvas* canvas, void* ctx) {
     furi_assert(ctx);
-    FinikEthApp* app = ctx;
+    EthTroubleshooterApp* app = ctx;
 
     canvas_clear(canvas);
 
@@ -82,28 +82,28 @@ static void finik_eth_app_draw_callback(Canvas* canvas, void* ctx) {
     }
 }
 
-static void finik_eth_battery_info_update_model(void* ctx) {
+static void eth_troubleshooter_battery_info_update_model(void* ctx) {
     furi_assert(ctx);
-    FinikEthApp* app = ctx;
+    EthTroubleshooterApp* app = ctx;
     power_get_info(app->power, &app->info);
 }
 
-static void finik_eth_app_input_callback(InputEvent* input_event, void* ctx) {
+static void eth_troubleshooter_app_input_callback(InputEvent* input_event, void* ctx) {
     furi_assert(ctx);
 
     FuriMessageQueue* event_queue = ctx;
     furi_message_queue_put(event_queue, input_event, FuriWaitForever);
 }
 
-FinikEthApp* finik_eth_app_alloc() {
-    FinikEthApp* app = malloc(sizeof(FinikEthApp));
+EthTroubleshooterApp* eth_troubleshooter_app_alloc() {
+    EthTroubleshooterApp* app = malloc(sizeof(EthTroubleshooterApp));
 
     app->view_port = view_port_alloc();
     app->event_queue = furi_message_queue_alloc(8, sizeof(InputEvent));
     app->eth_worker = eth_worker_alloc();
 
-    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);
+    view_port_draw_callback_set(app->view_port, eth_troubleshooter_app_draw_callback, app);
+    view_port_input_callback_set(app->view_port, eth_troubleshooter_app_input_callback, app->event_queue);
 
     app->gui = furi_record_open(RECORD_GUI);
     gui_add_view_port(app->gui, app->view_port, GuiLayerFullscreen);
@@ -115,7 +115,7 @@ FinikEthApp* finik_eth_app_alloc() {
     return app;
 }
 
-void finik_eth_app_free(FinikEthApp* app) {
+void eth_troubleshooter_app_free(EthTroubleshooterApp* app) {
     furi_assert(app);
 
     view_port_enabled_set(app->view_port, false);
@@ -130,7 +130,7 @@ void finik_eth_app_free(FinikEthApp* app) {
     furi_record_close(RECORD_POWER);
 }
 
-void finit_eth_app_key_handler(FinikEthApp* app, InputKey key) {
+void eth_troubleshooter_app_key_handler(EthTroubleshooterApp* app, InputKey key) {
     if(app->cursor_position == CURSOR_CHOOSE_PROCESS) {
         if(key == InputKeyUp || key == InputKeyDown) {
             app->draw_process =
@@ -176,19 +176,19 @@ void finit_eth_app_key_handler(FinikEthApp* app, InputKey key) {
     }
 }
 
-int32_t finik_eth_app(void* p) {
+int32_t eth_troubleshooter_app(void* p) {
     UNUSED(p);
-    FinikEthApp* app = finik_eth_app_alloc();
+    EthTroubleshooterApp* app = eth_troubleshooter_app_alloc();
 
     InputEvent event;
     uint8_t long_press = 0;
     InputKey long_press_key = 0;
 
     while(1) {
-        finik_eth_battery_info_update_model(app);
+        eth_troubleshooter_battery_info_update_model(app);
         if(furi_message_queue_get(app->event_queue, &event, 200) == FuriStatusOk) {
             if(event.type == InputTypePress) {
-                finit_eth_app_key_handler(app, event.key);
+                eth_troubleshooter_app_key_handler(app, event.key);
             } else if(event.type == InputTypeLong) {
                 long_press = 1;
                 long_press_key = event.key;
@@ -198,7 +198,7 @@ int32_t finik_eth_app(void* p) {
             }
         }
         if(long_press && long_press_key != InputKeyBack) {
-            finit_eth_app_key_handler(app, long_press_key);
+            eth_troubleshooter_app_key_handler(app, long_press_key);
         }
         if(app->cursor_position == CURSOR_EXIT) {
             eth_run(app->eth_worker, EthWorkerProcessExit);
@@ -207,6 +207,6 @@ int32_t finik_eth_app(void* p) {
         view_port_update(app->view_port);
     }
 
-    finik_eth_app_free(app);
+    eth_troubleshooter_app_free(app);
     return 0;
 }

+ 3 - 3
finik_eth_app.h → eth_troubleshooter_app.h

@@ -6,7 +6,7 @@
 #include <power/power_service/power.h>
 
 #include "eth_worker.h"
-#include "finik_eth_icons.h"
+#include "eth_troubleshooter_icons.h"
 
 typedef enum {
     DRAW_ALL,
@@ -31,7 +31,7 @@ typedef enum {
     CURSOR_EXIT,
 } CursorPosition;
 
-struct FinikEthApp {
+struct EthTroubleshooterApp {
     Gui* gui;
     ViewPort* view_port;
     FuriMessageQueue* event_queue;
@@ -46,4 +46,4 @@ struct FinikEthApp {
     CursorPosition cursor_position;
 };
 
-typedef struct FinikEthApp FinikEthApp;
+typedef struct EthTroubleshooterApp EthTroubleshooterApp;

+ 1 - 1
eth_view_process.c

@@ -2,7 +2,7 @@
 
 #include "eth_worker.h"
 #include "eth_worker_i.h"
-#include "finik_eth_icons.h"
+#include "eth_troubleshooter_icons.h"
 
 #include "lib/ioLibrary_Driver/u8g2/csrc/u8g2.h"
 

+ 0 - 0
images/ehternet_icon_10x10px.png → images/ethernet_icon_10x10px.png