comparison harelet.c @ 14:8b5ff478ec66

Automated Vimcurial commmit
author VilyaemKenyaz
date Tue, 12 Sep 2023 08:35:17 -0400
parents 8fe2392f2fcc
children ef57eb9ec02b
comparison
equal deleted inserted replaced
13:8fe2392f2fcc 14:8b5ff478ec66
109 //Meat of instructions 109 //Meat of instructions
110 for(int i = 0;i != numpoints;i++){ 110 for(int i = 0;i != numpoints;i++){
111 //Compose 111 //Compose
112 char instruction[32]; 112 char instruction[32];
113 strcat(instruction,"G0 X "); 113 strcat(instruction,"G0 X ");
114 //Convert X to string
115 sprintf(buffer,"%d",points[i].X);
114 strcat(instruction,buffer); 116 strcat(instruction,buffer);
115 //Convert X to string
116 sprintf(buffer,"%d",&points[i].X);
117 strcat(instruction," Y "); 117 strcat(instruction," Y ");
118 //Convert Y to string 118 //Convert Y to string
119 sprintf(buffer,"%d",&points[i].Y); 119 sprintf(buffer,"%d",points[i].Y);
120 strcat(instruction,buffer); 120 strcat(instruction,buffer);
121 if(points[i].down = 1){ 121 if(points[i].down = 1){
122 strcat(instruction," Z 5\n"); 122 strcat(instruction," Z 5\n");
123 } 123 }
124 else{ 124 else{
138 138
139 139
140 } 140 }
141 141
142 puts("Finished Compiling GCODE"); 142 puts("Finished Compiling GCODE");
143 143 getchar();
144 144
145 } 145 }
146 146
147 147
148 /********************************************* 148 /*********************************************
190 break; 190 break;
191 191
192 case 'c': 192 case 'c':
193 Compile(); 193 Compile();
194 break; 194 break;
195 195 case 'q':
196 clrscr();
197 exit(0);
198 break;
196 default: 199 default:
197 putchar('\a'); 200 putchar('\a');
198 break; 201 break;
199 } 202 }
200 } 203 }