HonestLocksmith пре 1 година
родитељ
комит
71ef1f8991
3 измењених фајлова са 213 додато и 58 уклоњено
  1. 2 2
      key_copier.c
  2. 191 36
      key_formats.c
  3. 20 20
      key_formats.h

+ 2 - 2
key_copier.c

@@ -534,9 +534,9 @@ static void key_copier_view_measure_draw_callback(Canvas* canvas, void* model) {
     if(my_format.stop == 2) {
         // Draw a line using level_contour_px if stop equals 2 elbow must be firt pin inch
         canvas_draw_line(canvas, level_contour_px, top_contour_px, level_contour_px, 63);
-    } else {
+        //  } else {
         // Otherwise, draw a default line
-        canvas_draw_line(canvas, 0, top_contour_px, 0, 63);
+        //    canvas_draw_line(canvas, 0, top_contour_px, 0, 63); // too confusing but may want later
     }
 
     int slc_pin_px = (int)round(

+ 191 - 36
key_formats.c

@@ -30,8 +30,7 @@ const KeyFormat all_formats[] = {
      .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
+     .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,
@@ -43,35 +42,33 @@ const KeyFormat all_formats[] = {
 
     {.manufacturer = "Arrow",
      .format_name = "AR4",
-     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .format_link = "C2",
      .first_pin_inch = 0.265,
      .last_pin_inch = 1.040,
      .pin_increment_inch = 0.155,
      .pin_num = 6,
      .pin_width_inch = 0.060,
      .elbow_inch = 0.1,
-     .drill_angle =
-         90, // This should actually be 100 but the current resolution will
+     .drill_angle = 90, // This should actually be 100 but the current resolution will
      // make 100 degrees very ugly and unsuable
      .uncut_depth_inch = 0.312,
      .deepest_depth_inch = 0.186,
      .depth_step_inch = 0.014,
      .min_depth_ind = 0,
-     .max_depth_ind = 10,
+     .max_depth_ind = 9,
      .macs = 6,
      .clearance = 8},
 
     {.manufacturer = "Master Lock",
      .format_name = "M1",
-     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .format_link = "C35",
      .first_pin_inch = 0.185,
      .last_pin_inch = 0.689,
      .pin_increment_inch = 0.126,
      .pin_num = 5,
      .pin_width_inch = 0.039,
      .elbow_inch = 0.1,
-     .drill_angle =
-         90, // This should actually be 100 but the current resolution will make
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
      // 100 degrees very ugly and unsuable
      .uncut_depth_inch = 0.276,
      .deepest_depth_inch = 0.171,
@@ -83,35 +80,33 @@ const KeyFormat all_formats[] = {
 
     {.manufacturer = "American",
      .format_name = "AM7",
-     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .format_link = "C80",
      .first_pin_inch = 0.157,
      .last_pin_inch = 0.781,
      .pin_increment_inch = 0.125,
      .pin_num = 6,
      .pin_width_inch = 0.039,
      .elbow_inch = 0.1,
-     .drill_angle =
-         90, // This should actually be 100 but the current resolution will make
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
      // 100 degrees very ugly and unsuable
      .uncut_depth_inch = 0.283,
      .deepest_depth_inch = 0.173,
      .depth_step_inch = 0.016,
-     .min_depth_ind = 0,
+     .min_depth_ind = 1,
      .max_depth_ind = 8,
      .macs = 7,
      .clearance = 8},
 
     {.manufacturer = "Yale",
      .format_name = "Y2",
-     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .format_link = ".025",
      .first_pin_inch = 0.200,
      .last_pin_inch = 1.025,
      .pin_increment_inch = 0.165,
      .pin_num = 6,
      .pin_width_inch = 0.054,
      .elbow_inch = 0.1,
-     .drill_angle =
-         90, // This should actually be 100 but the current resolution will make
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
      // 100 degrees very ugly and unsuable
      .uncut_depth_inch = 0.320,
      .deepest_depth_inch = 0.145,
@@ -123,80 +118,76 @@ const KeyFormat all_formats[] = {
 
     {.manufacturer = "Yale",
      .format_name = "Y11",
-     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .format_link = "CX55",
      .first_pin_inch = 0.124,
      .last_pin_inch = 0.502,
      .pin_increment_inch = 0.095,
      .pin_num = 5,
      .pin_width_inch = 0.039,
      .elbow_inch = 0.1,
-     .drill_angle =
-         90, // This should actually be 100 but the current resolution will make
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
      // 100 degrees very ugly and unsuable
      .uncut_depth_inch = 0.246,
      .deepest_depth_inch = 0.167,
      .depth_step_inch = 0.020,
-     .min_depth_ind = 0,
+     .min_depth_ind = 1,
      .max_depth_ind = 5,
      .macs = 7,
      .clearance = 8},
 
     {.manufacturer = "Sargent",
      .format_name = "S22",
-     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .format_link = "C44",
      .first_pin_inch = 0.216,
      .last_pin_inch = 0.996,
      .pin_increment_inch = 0.156,
      .pin_num = 6,
      .pin_width_inch = 0.063,
      .elbow_inch = 0.1,
-     .drill_angle =
-         90, // This should actually be 100 but the current resolution will make
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
      // 100 degrees very ugly and unsuable
      .uncut_depth_inch = 0.328, // double check
      .deepest_depth_inch = 0.148,
      .depth_step_inch = 0.020,
-     .min_depth_ind = 0,
+     .min_depth_ind = 1,
      .max_depth_ind = 10,
      .macs = 7,
      .clearance = 8},
 
     {.manufacturer = "National",
      .format_name = "NA25",
-     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .format_link = "C40",
      .first_pin_inch = 0.250,
      .last_pin_inch = 0.874,
      .pin_increment_inch = 0.156,
      .pin_num = 5,
      .pin_width_inch = 0.039,
      .elbow_inch = 0.1,
-     .drill_angle =
-         90, // This should actually be 100 but the current resolution will make
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
      // 100 degrees very ugly and unsuable
      .uncut_depth_inch = 0.304,
      .deepest_depth_inch = 0.191,
      .depth_step_inch = 0.012,
      .min_depth_ind = 0,
-     .max_depth_ind = 10,
+     .max_depth_ind = 9,
      .macs = 7,
      .clearance = 8},
 
     {.manufacturer = "Corbin",
      .format_name = "CO88",
-     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .format_link = "C14",
      .first_pin_inch = 0.250,
      .last_pin_inch = 1.030,
      .pin_increment_inch = 0.156,
      .pin_num = 6,
      .pin_width_inch = 0.047,
      .elbow_inch = 0.1,
-     .drill_angle =
-         90, // This should actually be 100 but the current resolution will make
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
      // 100 degrees very ugly and unsuable
      .uncut_depth_inch = 0.343,
      .deepest_depth_inch = 0.217,
      .depth_step_inch = 0.014,
-     .min_depth_ind = 0,
+     .min_depth_ind = 1,
      .max_depth_ind = 10,
      .macs = 7,
      .clearance = 8},
@@ -237,11 +228,47 @@ const KeyFormat all_formats[] = {
      .macs = 9,
      .clearance = 8},
 
+    {.manufacturer = "National",
+     .format_name = "NA12",
+     .format_link = "C39",
+     .first_pin_inch = 0.150,
+     .last_pin_inch = 0.710,
+     .pin_increment_inch = 0.140,
+     .pin_num = 5,
+     .pin_width_inch = 0.039,
+     .elbow_inch = 0.1,
+     .drill_angle = 90,
+     .uncut_depth_inch = 0.270,
+     .deepest_depth_inch = 0.157,
+     .depth_step_inch = 0.013,
+     .min_depth_ind = 0,
+     .max_depth_ind = 9,
+     .macs = 7,
+     .clearance = 8},
+
+    {.manufacturer = "Russwin",
+     .format_name = "RU45",
+     .format_link = "CX6",
+     .first_pin_inch = 0.250,
+     .last_pin_inch = 1.030,
+     .pin_increment_inch = 0.156,
+     .pin_num = 6,
+     .pin_width_inch = 0.053,
+     .elbow_inch = 0.1,
+     .drill_angle = 90,
+     .uncut_depth_inch = 0.343,
+     .deepest_depth_inch = 0.203,
+     .depth_step_inch = 0.028,
+     .min_depth_ind = 1,
+     .max_depth_ind = 6,
+     .macs = 5,
+     .clearance = 8},
+
     {.manufacturer = "Ford",
      .format_name = "H75",
      .sides = 2,
      .stop = 2,
-     .format_link = "https://lsamichigan.org/Tech/SCHLAGE_KeySpecs.pdf",
+     .format_link = "CX101",
      .first_pin_inch = 0.201,
      .last_pin_inch = 0.845,
      .pin_increment_inch = 0.092,
@@ -249,13 +276,141 @@ const KeyFormat all_formats[] = {
      .pin_width_inch = 0.039,
      .elbow_inch = 0.201, // this should be equal to first pin inch for tip
      // stopped key line
-     .drill_angle =
-         90, // This should actually be 100 but the current resolution will make
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
      // 100 degrees very ugly and unsuable
      .uncut_depth_inch = 0.354,
      .deepest_depth_inch = 0.254,
      .depth_step_inch = 0.025,
-     .min_depth_ind = 0,
+     .min_depth_ind = 1,
      .max_depth_ind = 5,
      .macs = 5,
+     .clearance = 0},
+
+    {.manufacturer = "Chevrolet",
+     .format_name = "B102",
+     .sides = 2,
+     .stop = 2,
+     .format_link = "",
+     .first_pin_inch = 0.205,
+     .last_pin_inch = 1.037,
+     .pin_increment_inch = 0.093,
+     .pin_num = 10,
+     .pin_width_inch = 0.039,
+     .elbow_inch = 0.205, // this should be equal to first pin inch for tip
+     // stopped key line
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
+     // 100 degrees very ugly and unsuable
+     .uncut_depth_inch = 0.315,
+     .deepest_depth_inch = 0.161,
+     .depth_step_inch = 0.026,
+     .min_depth_ind = 1,
+     .max_depth_ind = 4,
+     .macs = 5,
+     .clearance = 0},
+
+    {.manufacturer = "Dodge",
+     .format_name = "Y159",
+     .sides = 2,
+     .stop = 2,
+     .format_link = "CX102",
+     .first_pin_inch = 0.297,
+     .last_pin_inch = 0.941,
+     .pin_increment_inch = 0.092,
+     .pin_num = 8,
+     .pin_width_inch = 0.039,
+     .elbow_inch = 0.297, // this should be equal to first pin inch for tip
+     // stopped key line
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
+     // 100 degrees very ugly and unsuable
+     .uncut_depth_inch = 0.339,
+     .deepest_depth_inch = 0.197,
+     .depth_step_inch = 0.047,
+     .min_depth_ind = 1,
+     .max_depth_ind = 4,
+     .macs = 5,
+     .clearance = 0},
+
+    {.manufacturer = "Kawasaki",
+     .format_name = "KA14",
+     .sides = 2,
+     .format_link = "CMC50",
+     .first_pin_inch = 0.098,
+     .last_pin_inch = 0.591,
+     .pin_increment_inch = 0.098,
+     .pin_num = 6,
+     .pin_width_inch = 0.039,
+     .elbow_inch = 0.1, // this should be equal to first pin inch for tip
+     // stopped key line
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
+     // 100 degrees very ugly and unsuable
+     .uncut_depth_inch = 0.258,
+     .deepest_depth_inch = 0.198,
+     .depth_step_inch = 0.020,
+     .min_depth_ind = 1,
+     .max_depth_ind = 4,
+     .macs = 4,
+     .clearance = 0},
+
+    {.manufacturer = "Yamaha",
+     .format_name = "YM63",
+     .sides = 2,
+     .format_link = "CMC71",
+     .first_pin_inch = 0.157,
+     .last_pin_inch = 0.748,
+     .pin_increment_inch = 0.098,
+     .pin_num = 7,
+     .pin_width_inch = 0.039,
+     .elbow_inch = 0.1, // this should be equal to first pin inch for tip
+     // stopped key line
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
+     // 100 degrees very ugly and unsuable
+     .uncut_depth_inch = 0.295,
+     .deepest_depth_inch = 0.236,
+     .depth_step_inch = 0.020,
+     .min_depth_ind = 1,
+     .max_depth_ind = 4,
+     .macs = 4,
+     .clearance = 0},
+
+    {.manufacturer = "Best (A2)",
+     .format_name = "SFIC",
+     .sides = 2,
+     .stop = 2,
+     .format_link = "C3",
+     .first_pin_inch = 0.081,
+     .last_pin_inch = 0.978,
+     .pin_increment_inch = 0.149,
+     .pin_num = 7,
+     .pin_width_inch = 0.051,
+     .elbow_inch = 0.081, // this should be equal to first pin inch for tip
+     // stopped key line
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
+     // 100 degrees very ugly and unsuable
+     .uncut_depth_inch = 0.318,
+     .deepest_depth_inch = 0.206,
+     .depth_step_inch = 0.025,
+     .min_depth_ind = 0,
+     .max_depth_ind = 9,
+     .macs = 5,
+     .clearance = 0},
+
+    {.manufacturer = "RV (FIC,GL,Bauer)",
+     .format_name = "RV",
+     .sides = 2,
+     .format_link = "Card",
+     .first_pin_inch = 0.126,
+     .last_pin_inch = 0.504,
+     .pin_increment_inch = 0.094,
+     .pin_num = 5,
+     .pin_width_inch = 0.039,
+     .elbow_inch = 0.126, // this should be equal to first pin inch for tip
+     // stopped key line
+     .drill_angle = 90, // This should actually be 100 but the current resolution will make
+     // 100 degrees very ugly and unsuable
+     .uncut_depth_inch = 0.260,
+     .deepest_depth_inch = 0.181,
+     .depth_step_inch = 0.040,
+     .min_depth_ind = 1,
+     .max_depth_ind = 3,
+     .macs = 3,
      .clearance = 0}};

+ 20 - 20
key_formats.h

@@ -1,30 +1,30 @@
 #ifndef KEY_FORMATS_H
 #define KEY_FORMATS_H
 
-#define FORMAT_NUM 13
+#define FORMAT_NUM 21
 
 typedef struct {
-  char *manufacturer;
-  char *format_name;
-  char *format_link;
-  int sides;
-  int stop;
-  double first_pin_inch;
-  double last_pin_inch;
-  double pin_increment_inch;
-  int pin_num;
-  double pin_width_inch;
-  double drill_angle;
-  double elbow_inch;
+    char* manufacturer;
+    char* format_name;
+    char* format_link;
+    int sides;
+    int stop;
+    double first_pin_inch;
+    double last_pin_inch;
+    double pin_increment_inch;
+    int pin_num;
+    double pin_width_inch;
+    double drill_angle;
+    double elbow_inch;
 
-  double uncut_depth_inch;
-  double deepest_depth_inch;
-  double depth_step_inch;
-  int min_depth_ind;
-  int max_depth_ind;
+    double uncut_depth_inch;
+    double deepest_depth_inch;
+    double depth_step_inch;
+    int min_depth_ind;
+    int max_depth_ind;
 
-  int macs;
-  int clearance;
+    int macs;
+    int clearance;
 } KeyFormat;
 
 extern const KeyFormat all_formats[FORMAT_NUM];