Mercurial Hosting > harelet
changeset 11:1d4df12de9e3
Automated Vimcurial commmit
author | VilyaemKenyaz |
---|---|
date | Tue, 12 Sep 2023 08:05:11 -0400 |
parents | c73aed540bdd |
children | 35e6a7b53e3c |
files | .harelet.c.swp HARELET.MAN README.md harelet harelet.c |
diffstat | 5 files changed, 26 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/HARELET.MAN Tue Sep 12 07:17:22 2023 -0400 +++ b/HARELET.MAN Tue Sep 12 08:05:11 2023 -0400 @@ -12,7 +12,12 @@ .PP CAD program for CNC machines -Vim keys (HJKL), or arrow keys. +Vim keys (HJKL) to move + +H Left +J Down +K Up +L Right A to add a point at the current cursor's position
--- a/README.md Tue Sep 12 07:17:22 2023 -0400 +++ b/README.md Tue Sep 12 08:05:11 2023 -0400 @@ -9,7 +9,12 @@ ## USAGE -Vim keys (HJKL), or arrow keys. +Vim keys (HJKL). + +H Left +J Down +K Up +L Right A to add a point at the current cursor's position
--- a/harelet.c Tue Sep 12 07:17:22 2023 -0400 +++ b/harelet.c Tue Sep 12 08:05:11 2023 -0400 @@ -15,7 +15,7 @@ #endif #ifdef _WIN32 -#include <Windows.h>> +#include <windows.h>> #include <conio.h> #endif @@ -33,7 +33,7 @@ point points[MAXPOINT]; unsigned int X = 100; -unsigned int Y = 100; +unsigned int Y = 25; unsigned int step = 5; unsigned int down = 0; unsigned int numpoints = 0; @@ -88,12 +88,12 @@ * Date - Sep 08 2023 * *******************************************/ void Compile(){ - /* + char * filename; char * file; char buffer[sizeof(int)*8+1]; int choice; - + clrscr(); puts("Select your format\n1. RAW GCODE"); scanf("%d",&choice); @@ -110,13 +110,16 @@ //Compose char * instruction; strcat(instruction,"G0 X"); - itoa(points[i].X,buffer); strcat(instruction,buffer); + //Convert X to string + sprintf(buffer,"%d",&points[i].X); strcat(instruction," Y"); - itoa(points[i].Y,buffer); + //Convert Y to string + sprintf(buffer,"%d",&points[i].Y); strcat(instruction,buffer); + //Convert Z to string + sprintf(buffer,"%d",5); strcat(instruction," Z"); - itoa(DEEPNESS,buffer); strcat(instruction,buffer); //Write to string strcat(file,instruction); @@ -126,9 +129,9 @@ WriteFile(filename,file); } - puts("Finished Compiling"); + puts("Finished Compiling GCODE"); - */ + } @@ -144,7 +147,7 @@ //New CONIO controls switch(getchar()){ case 'h': - X += step; + X -= step; break; case 'j': Y += step; @@ -153,7 +156,7 @@ Y -= step; break; case 'l': - X -= step; + X += step; break; case 's':