changeset 13:8fe2392f2fcc

Automated Vimcurial commmit
author VilyaemKenyaz
date Tue, 12 Sep 2023 08:28:49 -0400
parents 35e6a7b53e3c
children 8b5ff478ec66
files .harelet.c.swp FIRST harelet harelet.c
diffstat 4 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
Binary file .harelet.c.swp has changed
--- a/FIRST	Tue Sep 12 08:18:53 2023 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
- X1431671108 Y1431671120 Z 51431671120G0 X Y1431671108 Z 51431671108G0 X1431671108 Y1431671120 Z 51431671120G0 X Y1431671108 Z 51431671108G0 X1431671108 Y1431671120 Z 51431671120G0 X Y1431671108 Z 51431671108G0 X1431671108 Y1431671120 Z 51431671120G0 X Y1431671108 Z 51431671108G0 X143G0, X0, Y0, Z0
\ No newline at end of file
Binary file harelet has changed
--- a/harelet.c	Tue Sep 12 08:18:53 2023 -0400
+++ b/harelet.c	Tue Sep 12 08:28:49 2023 -0400
@@ -21,7 +21,7 @@
 
 #define DEEPNESS 5
 #define MAXPOINT 4096
-#define UNITS	"G20"
+#define UNITS	"G20\n"
 #define SPEED	20
 
 typedef struct{
@@ -89,9 +89,9 @@
  * *******************************************/
 void Compile(){
 
-	char filename[32];
+	char filename[64];
 	char file[8192];
-	char buffer[32];
+	char buffer[64];
 	unsigned int choice;
 
 	clrscr();
@@ -101,35 +101,35 @@
 
 	puts("Enter the filename");
 	scanf("%s",filename);
-	printf("Compiling %s,,,\n",filename);
+	printf("Compiling %s...\n",filename);
 	if(choice == 1){
 		//Set the miller
 		strcat(file,UNITS);
-		strcat(file,"G0 X0 Y0 Z0");
+		strcat(file,"G0 X0 Y0 Z0\n");
 		//Meat of instructions
 		for(int i = 0;i != numpoints;i++){
 			//Compose
 			char instruction[32];
-			strcat(instruction,"G0 X");
+			strcat(instruction,"G0 X ");
 			strcat(instruction,buffer);
 			//Convert X to string
 			sprintf(buffer,"%d",&points[i].X);
-			strcat(instruction," Y");
+			strcat(instruction," Y ");
 			//Convert Y to string
 			sprintf(buffer,"%d",&points[i].Y);
 			strcat(instruction,buffer);
 			if(points[i].down = 1){
-				strcat(instruction," Z 5");
+				strcat(instruction," Z 5\n");
 			}
 			else{
-				strcat(instruction," Z 0");
+				strcat(instruction," Z 0\n");
 			}
 			strcat(instruction,buffer);
 			//Write to string
 			strcat(file,instruction);
 		}
 		//Finish
-		strcat(file,"G0, X0, Y0, Z0");
+		strcat(file,"G0 X0 Y0 Z0\n");
 		WriteFile(filename,file);
 	}
 	else{