diff harelet.c @ 14:8b5ff478ec66

Automated Vimcurial commmit
author VilyaemKenyaz
date Tue, 12 Sep 2023 08:35:17 -0400
parents 8fe2392f2fcc
children ef57eb9ec02b
line wrap: on
line diff
--- a/harelet.c	Tue Sep 12 08:28:49 2023 -0400
+++ b/harelet.c	Tue Sep 12 08:35:17 2023 -0400
@@ -111,12 +111,12 @@
 			//Compose
 			char instruction[32];
 			strcat(instruction,"G0 X ");
+			//Convert X to string
+			sprintf(buffer,"%d",points[i].X);
 			strcat(instruction,buffer);
-			//Convert X to string
-			sprintf(buffer,"%d",&points[i].X);
 			strcat(instruction," Y ");
 			//Convert Y to string
-			sprintf(buffer,"%d",&points[i].Y);
+			sprintf(buffer,"%d",points[i].Y);
 			strcat(instruction,buffer);
 			if(points[i].down = 1){
 				strcat(instruction," Z 5\n");
@@ -140,7 +140,7 @@
 	}
 
 	puts("Finished Compiling GCODE");
-
+	getchar();
 
 }
 
@@ -192,7 +192,10 @@
 			case 'c': 
 				Compile();
 				break;
-
+			case 'q':
+				clrscr();
+				exit(0);
+				break;
 			default:
 				putchar('\a');
 				break;