Willy-JL 1 rok temu
rodzic
commit
cbd776a271

+ 1 - 1
key_copier/application.fam

@@ -13,5 +13,5 @@ App(
     fap_icon_assets="assets",
     fap_description="@README.md",
     fap_version="1.0",
-    fap_author="Torron"
+    fap_author="Torron",
 )

+ 15 - 15
key_copier/key_copier.c

@@ -30,9 +30,9 @@ typedef enum {
 } KeyCopierSubmenuIndex;
 
 typedef enum {
-    KeyCopierViewSubmenu, 
+    KeyCopierViewSubmenu,
     KeyCopierViewTextInput,
-    KeyCopierViewConfigure_i, 
+    KeyCopierViewConfigure_i,
     KeyCopierViewConfigure_e,
     KeyCopierViewSave,
     KeyCopierViewLoad,
@@ -41,19 +41,19 @@ typedef enum {
 } KeyCopierView;
 
 typedef struct {
-    ViewDispatcher* view_dispatcher; 
-    NotificationApp* notifications; 
-    Submenu* submenu; 
-    TextInput* text_input; 
-    VariableItemList* variable_item_list_config; 
-    View* view_measure; 
-    View* view_config_e; 
+    ViewDispatcher* view_dispatcher;
+    NotificationApp* notifications;
+    Submenu* submenu;
+    TextInput* text_input;
+    VariableItemList* variable_item_list_config;
+    View* view_measure;
+    View* view_config_e;
     View* view_save;
-    View* view_load; 
-    Widget* widget_about; 
-    VariableItem* key_name_item; 
+    View* view_load;
+    Widget* widget_about;
+    VariableItem* key_name_item;
     VariableItem* format_item;
-    char* temp_buffer; 
+    char* temp_buffer;
     uint32_t temp_buffer_size;
 
     DialogsApp* dialogs;
@@ -61,8 +61,8 @@ typedef struct {
 } KeyCopierApp;
 
 typedef struct {
-    uint32_t format_index; 
-    FuriString* key_name_str; 
+    uint32_t format_index;
+    FuriString* key_name_str;
     uint8_t pin_slc; // The pin that is being adjusted
     uint8_t* depth; // The cutting depth
     bool data_loaded;

+ 2 - 2
key_copier/key_copier.h

@@ -1,5 +1,5 @@
 #define KEY_COPIER_FILE_EXTENSION ".keycopy"
-#define INCHES_PER_PX 0.00978
+#define INCHES_PER_PX             0.00978
 
 static inline int min(int a, int b) {
     return (a < b) ? a : b;
@@ -7,4 +7,4 @@ static inline int min(int a, int b) {
 
 static inline int max(int a, int b) {
     return (a > b) ? a : b;
-}
+}

+ 35 - 39
key_copier/key_formats.c

@@ -2,43 +2,39 @@
 // all lengths in inches since it's all American formats
 // angle is in degrees
 const KeyFormat all_formats[] = {
-    {
-    .manufacturer = "Kwikset",
-    .format_name = "KW1",
-    .format_link = "https://lsamichigan.org/Tech/Kwikset_KeySpecs.pdf",
-    .first_pin_inch = 0.247,
-    .last_pin_inch = 0.847,
-    .pin_increment_inch = 0.15,
-    .pin_num = 5,
-    .pin_width_inch = 0.084,
-    .elbow_inch = 0.15,
-    .drill_angle = 90,
-    .uncut_depth_inch = 0.329,
-    .deepest_depth_inch = 0.191,
-    .depth_step_inch = 0.023,
-    .min_depth_ind = 1,
-    .max_depth_ind = 7,
-    .macs = 4,
-    .clearance = 3
-    },
+    {.manufacturer = "Kwikset",
+     .format_name = "KW1",
+     .format_link = "https://lsamichigan.org/Tech/Kwikset_KeySpecs.pdf",
+     .first_pin_inch = 0.247,
+     .last_pin_inch = 0.847,
+     .pin_increment_inch = 0.15,
+     .pin_num = 5,
+     .pin_width_inch = 0.084,
+     .elbow_inch = 0.15,
+     .drill_angle = 90,
+     .uncut_depth_inch = 0.329,
+     .deepest_depth_inch = 0.191,
+     .depth_step_inch = 0.023,
+     .min_depth_ind = 1,
+     .max_depth_ind = 7,
+     .macs = 4,
+     .clearance = 3},
 
-    {
-    .manufacturer = "Schlage",
-    .format_name = "SC4",
-    .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
-    .first_pin_inch = 0.231,
-    .last_pin_inch = 1.012,
-    .pin_increment_inch = 0.1562,
-    .pin_num = 6,
-    .pin_width_inch = 0.031,
-    .elbow_inch = 0.1,
-    .drill_angle = 90, // This should actually be 100 but the current resolution will make 100 degrees very ugly and unsuable
-    .uncut_depth_inch = 0.335,
-    .deepest_depth_inch = 0.2,
-    .depth_step_inch = 0.015,
-    .min_depth_ind = 0,
-    .max_depth_ind = 9,
-    .macs = 7,
-    .clearance = 8
-    }
-};
+    {.manufacturer = "Schlage",
+     .format_name = "SC4",
+     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .first_pin_inch = 0.231,
+     .last_pin_inch = 1.012,
+     .pin_increment_inch = 0.1562,
+     .pin_num = 6,
+     .pin_width_inch = 0.031,
+     .elbow_inch = 0.1,
+     .drill_angle =
+         90, // This should actually be 100 but the current resolution will make 100 degrees very ugly and unsuable
+     .uncut_depth_inch = 0.335,
+     .deepest_depth_inch = 0.2,
+     .depth_step_inch = 0.015,
+     .min_depth_ind = 0,
+     .max_depth_ind = 9,
+     .macs = 7,
+     .clearance = 8}};

+ 1 - 1
key_copier/key_formats.h

@@ -4,7 +4,7 @@
 #define FORMAT_NUM 2
 
 typedef struct {
-    char* manufacturer; 
+    char* manufacturer;
     char* format_name;
     char* format_link;