From 71cfc6915aa182954a537807b1ab39d4a2c8f708 Mon Sep 17 00:00:00 2001 From: Leo Lou Date: Wed, 13 Jun 2018 19:14:47 +0900 Subject: [PATCH] Use pinky condition --- src/dactyl_keyboard/dactyl.clj | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/dactyl_keyboard/dactyl.clj b/src/dactyl_keyboard/dactyl.clj index 021e7bc..20a90a8 100644 --- a/src/dactyl_keyboard/dactyl.clj +++ b/src/dactyl_keyboard/dactyl.clj @@ -23,7 +23,7 @@ (def column-style (if (> nrows 5) :orthographic :standard)) ; options include :standard, :orthographic, and :fixed ; (def column-style :fixed) -(def pinky-15u true) +(def pinky-15u false) (defn column-offset [column] (cond (= column 2) [0 2.82 -4.5] @@ -170,9 +170,7 @@ (def column-x-delta (+ -1 (- (* column-radius (Math/sin β))))) (defn offset-for-column [col] - (cond - (= col lastcol) 5.5 - :else 0)) + (if (and (true? pinky-15u) (= col lastcol)) 5.5 0)) (defn apply-key-geometry [translate-fn rotate-x-fn rotate-y-fn column row shape] (let [column-angle (* β (- centercol column)) placed-shape (->> shape @@ -264,10 +262,16 @@ (def web-post-br (translate [(- (/ mount-width 2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) ; wide posts for 1.5u keys in the main cluster -(def wide-post-tr (translate [(- (/ mount-width 1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) -(def wide-post-tl (translate [(+ (/ mount-width -1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) -(def wide-post-bl (translate [(+ (/ mount-width -1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) -(def wide-post-br (translate [(- (/ mount-width 1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) + +(if (true? pinky-15u) + (do (def wide-post-tr (translate [(- (/ mount-width 1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) + (def wide-post-tl (translate [(+ (/ mount-width -1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) + (def wide-post-bl (translate [(+ (/ mount-width -1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) + (def wide-post-br (translate [(- (/ mount-width 1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post))) + (do (def wide-post-tr web-post-tr) + (def wide-post-tl web-post-tl) + (def wide-post-bl web-post-bl) + (def wide-post-br web-post-br))) (defn triangle-hulls [& shapes] (apply union