From 1932eeef9a0be6a53884229fa982df8da6c68588 Mon Sep 17 00:00:00 2001 From: Jon Nordby Date: Thu, 4 Sep 2014 13:49:10 +0200 Subject: [PATCH] GCC: Set scale to empirically chosen value --- src/core/path_gcc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/path_gcc.c b/src/core/path_gcc.c index a0f1b39..f0bce83 100644 --- a/src/core/path_gcc.c +++ b/src/core/path_gcc.c @@ -39,7 +39,10 @@ void fab_write_gcc(struct fab_vars *v, char *output_file_name, int i,x,y,z,current_z,layer_power,nsegs=0,npts=0; float scale,xoffset,yoffset; output_file = fopen(output_file_name,"w"); - scale = 600.0*v->dx/(25.4*(v->nx-1.0)); // 600 DPI +// scale = 600.0*v->dx/(25.4*(v->nx-1.0)); // 600 DPI + // FIXME: calculate proper scale + scale = 3.35f; + if (loc == 'l') { xoffset = 600.0*(ox)/25.4; yoffset = 600.0*(oy - v->dy)/25.4; @@ -66,9 +69,9 @@ void fab_write_gcc(struct fab_vars *v, char *output_file_name, // Reset fprintf(output_file,"E"); - fprintf(output_file,"&u%dD", 127); - // TODO: set unit + // Unit + fprintf(output_file,"&u%dD", 254); // Cursor fprintf(output_file,"*p%dX", 100);