Sfoglia il codice sorgente

Merge fixes and format

Willy-JL 1 anno fa
parent
commit
576c05cf11

+ 1 - 1
ethernet/application.fam

@@ -11,7 +11,7 @@ App(
     stack_size=5 * 1024,
     stack_size=5 * 1024,
     order=90,
     order=90,
     fap_icon="images/ethernet_icon_10x10px.png",
     fap_icon="images/ethernet_icon_10x10px.png",
-    fap_category="GPIO",
+    fap_category="GPIO/Debug",
     fap_icon_assets="images",
     fap_icon_assets="images",
     fap_private_libs=[
     fap_private_libs=[
         Lib(
         Lib(

+ 0 - 0
ethernet/images/screenshot-ping.png → ethernet/docs/screenshot-ping.png


+ 0 - 0
ethernet/images/screenshot_dhcp.png → ethernet/docs/screenshot_dhcp.png


+ 0 - 0
ethernet/images/screenshot_init.png → ethernet/docs/screenshot_init.png


+ 0 - 0
ethernet/images/screenshot_static.png → ethernet/docs/screenshot_static.png


+ 1 - 1
ethernet/eth_save_process.c

@@ -298,4 +298,4 @@ void ethernet_save_process_free(EthernetSaveConfig* config) {
     storage_file_free(config->log_file);
     storage_file_free(config->log_file);
     furi_record_close(RECORD_STORAGE);
     furi_record_close(RECORD_STORAGE);
     free(config);
     free(config);
-}
+}

+ 6 - 12
ethernet/eth_save_process.h

@@ -13,18 +13,12 @@ typedef struct EthernetSaveConfig {
     File* log_file;
     File* log_file;
 } EthernetSaveConfig;
 } EthernetSaveConfig;
 
 
-#define ETHERNET_SAVE_DEFAULT_MAC \
-    { 0x10, 0x08, 0xDC, 0x47, 0x47, 0x54 }
-#define ETHERNET_SAVE_DEFAULT_IP \
-    { 192, 168, 0, 101 }
-#define ETHERNET_SAVE_DEFAULT_MASK \
-    { 255, 255, 255, 0 }
-#define ETHERNET_SAVE_DEFAULT_GATEWAY \
-    { 192, 168, 0, 1 }
-#define ETHERNET_SAVE_DEFAULT_DNS \
-    { 192, 168, 0, 1 }
-#define ETHERNET_SAVE_DEFAULT_PING_IP \
-    { 8, 8, 8, 8 }
+#define ETHERNET_SAVE_DEFAULT_MAC     {0x10, 0x08, 0xDC, 0x47, 0x47, 0x54}
+#define ETHERNET_SAVE_DEFAULT_IP      {192, 168, 0, 101}
+#define ETHERNET_SAVE_DEFAULT_MASK    {255, 255, 255, 0}
+#define ETHERNET_SAVE_DEFAULT_GATEWAY {192, 168, 0, 1}
+#define ETHERNET_SAVE_DEFAULT_DNS     {192, 168, 0, 1}
+#define ETHERNET_SAVE_DEFAULT_PING_IP {8, 8, 8, 8}
 
 
 EthernetSaveConfig* ethernet_save_process_malloc();
 EthernetSaveConfig* ethernet_save_process_malloc();
 void ethernet_save_process_free(EthernetSaveConfig* config);
 void ethernet_save_process_free(EthernetSaveConfig* config);

+ 2 - 1
ethernet/eth_troubleshooter_app.c

@@ -103,7 +103,8 @@ EthTroubleshooterApp* eth_troubleshooter_app_alloc() {
     app->eth_worker = eth_worker_alloc();
     app->eth_worker = eth_worker_alloc();
 
 
     view_port_draw_callback_set(app->view_port, eth_troubleshooter_app_draw_callback, app);
     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);
+    view_port_input_callback_set(
+        app->view_port, eth_troubleshooter_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);

+ 1 - 1
ethernet/eth_view_process.h

@@ -56,4 +56,4 @@ typedef struct EthViewDrawStatic {
 typedef struct EthViewDrawPing {
 typedef struct EthViewDrawPing {
     uint8_t current_digit;
     uint8_t current_digit;
     uint8_t* ip;
     uint8_t* ip;
-} EthViewDrawPing;
+} EthViewDrawPing;

+ 1 - 1
ethernet/eth_worker_dhcp.c

@@ -5,4 +5,4 @@
 void dhcp_timer_callback(void* context) {
 void dhcp_timer_callback(void* context) {
     UNUSED(context);
     UNUSED(context);
     DHCP_time_handler();
     DHCP_time_handler();
-}
+}

+ 1 - 1
ethernet/eth_worker_ping.c

@@ -8,4 +8,4 @@ void ping_wait_ms(int ms) {
 
 
 uint8_t ping_auto_interface(uint8_t* adress) {
 uint8_t ping_auto_interface(uint8_t* adress) {
     return ping_auto(PING_SOCKET, adress);
     return ping_auto(PING_SOCKET, adress);
-}
+}