chiark / gitweb /
fairphone-case: fix SideButton calculations
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jan 2018 14:30:07 +0000 (14:30 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jan 2018 14:30:08 +0000 (14:30 +0000)
nfc with the one current caller

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index 07a2ca1..572b6e0 100644 (file)
@@ -265,8 +265,8 @@ module SideButton(y, y_ref_sign, l){
   //    0  y is centre of button in coordinate system
   $button_l= l;
   eff_y = y_ref_sign > 0 ?         -bumper [1] -y -l/2 :
-         y_ref_sign < 0 ? (-phone +bumper)[1] +y +l/2 :
-         -y;
+         y_ref_sign < 0 ? (-phone -bumper)[1] +y +l/2 :
+         y;
   echo(eff_y);
   translate([0, eff_y, 0])
     children();