Frusta

Check-in [28fd787106]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:changed gcode precision to be .00 (hundredths)
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:28fd787106b08869c43187fdd987dd1ff5259569
User & Date: rmelton 2013-10-23 19:11:37
Context
2013-10-23
19:16
fixed exercise to work at z0 check-in: 80ef4bd8f0 user: rmelton tags: trunk
19:11
changed gcode precision to be .00 (hundredths) check-in: 28fd787106 user: rmelton tags: trunk
16:29
added exercise resonance tests check-in: 7c129b9525 user: rmelton tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/gcode/gcode_0.1.tcl.

376
377
378
379
380
381
382

383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
        switch -- $cmd {
          -move {}
          default {error "gcode::write::Path bad cmd=$cmd"}
        }
      }
      set path [concat {*}$args]
      set pathPt [lassign $path P0]

      switch -- [llength $P0] {
        1 {
          lassign $P0 x
          Puts G1 X$x
        }
        2 {
          lassign $P0 x y
          Puts G1 X$x Y$y
        }
        3 {
          lassign $P0 x y z
          Puts G1 X$x Y$y Z$z
        }
        default {error "gcode::write::Path bad length P0=$P0"}
      }
      foreach pt $pathPt {
        switch -- [llength $pt] {
          1 {
            lassign $pt x
            Puts G1 X$x
          }
          2 {
            lassign $pt x y
            Puts G1 X$x Y$y
          }
          3 {
            lassign $pt x y z
            Puts G1 X$x Y$y Z$z
          }
          default {error "gcode::write::Path bad length pt=$pt"}
        }
      }
    }
  }








>



|



|



|







|



|



|







376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
        switch -- $cmd {
          -move {}
          default {error "gcode::write::Path bad cmd=$cmd"}
        }
      }
      set path [concat {*}$args]
      set pathPt [lassign $path P0]
      set NUM "%0.2f"
      switch -- [llength $P0] {
        1 {
          lassign $P0 x
          Puts [format "G1 X$NUM" $x]
        }
        2 {
          lassign $P0 x y
          Puts [format "G1 X$NUM Y$NUM" $x $y]
        }
        3 {
          lassign $P0 x y z
          Puts [format "G1 X$NUM Y$NUM Z$NUM" $x $y $z]
        }
        default {error "gcode::write::Path bad length P0=$P0"}
      }
      foreach pt $pathPt {
        switch -- [llength $pt] {
          1 {
            lassign $pt x
            Puts [format "G1 X$NUM" $x]
          }
          2 {
            lassign $pt x y
            Puts [format "G1 X$NUM Y$NUM" $x $y]
          }
          3 {
            lassign $pt x y z
            Puts [format "G1 X$NUM Y$NUM Z$NUM" $x $y $z]
          }
          default {error "gcode::write::Path bad length pt=$pt"}
        }
      }
    }
  }