Merge lp:~jeremyrcohen/fabinterpreter/Jeremy_Cohen into lp:fabinterpreter
- Jeremy_Cohen
- Merge into Qt_version
Proposed by
Jeffrey Lipton
Status: | Merged |
---|---|
Approved by: | Jeffrey Lipton |
Approved revision: | 32 |
Merged at revision: | 21 |
Proposed branch: | lp:~jeremyrcohen/fabinterpreter/Jeremy_Cohen |
Merge into: | lp:fabinterpreter |
Diff against target: |
7154 lines (+3700/-1226) 39 files modified
README.txt (+7/-0) software/Common/JrKerr/nmccom.cpp (+49/-33) software/Common/JrKerr/nmccom.h (+2/-2) software/Common/JrKerr/old_path/path.cpp (+650/-0) software/Common/JrKerr/old_path/path.h (+83/-0) software/Common/JrKerr/path.cpp (+11/-12) software/Common/JrKerr/path.h (+10/-10) software/Common/JrKerr/picservo.cpp (+35/-25) software/Common/JrKerr/picservo.h (+17/-17) software/Common/JrKerr/src/Makefile (+1/-1) software/Common/JrKerr/src/Makefile.Debug (+1/-1) software/Common/JrKerr/src/Makefile.Release (+1/-1) software/Common/JrKerr/src/src.pro.user (+178/-37) software/Duel Syringe - Model 2.config (+197/-0) software/FabInterpreter/FabAtHomePrinter.cpp (+44/-122) software/FabInterpreter/FabAtHomePrinter.h (+37/-8) software/FabInterpreter/Interpreter.pro (+5/-3) software/FabInterpreter/Interpreter.pro.user (+132/-121) software/FabInterpreter/Makefile (+29/-38) software/FabInterpreter/Motor.cpp (+116/-118) software/FabInterpreter/Motor.h (+76/-78) software/FabInterpreter/Path_Tester/Makefile (+271/-0) software/FabInterpreter/Path_Tester/Path_Tester.pro (+21/-0) software/FabInterpreter/Path_Tester/Path_Tester.pro.user (+228/-0) software/FabInterpreter/Path_Tester/jrkerr.pro (+18/-0) software/FabInterpreter/Path_Tester/main.cpp (+177/-0) software/FabInterpreter/Util.h (+2/-7) software/FabInterpreter/guicomponentsthread.cpp (+16/-8) software/FabInterpreter/guicomponentsthread.h (+27/-20) software/FabInterpreter/mainwindow.cpp (+140/-77) software/FabInterpreter/mainwindow.h (+12/-9) software/FabInterpreter/mainwindow.ui (+400/-475) software/FabInterpreter/printthread.cpp (+12/-2) software/FabInterpreter/printthread.h (+4/-0) software/Plastic Tool - Model 2.config (+159/-0) software/Valve - Model 2.config (+186/-0) software/XYZ.config (+148/-0) software/hybrid.config (+197/-0) software/sparse_cube.fab (+1/-1) |
To merge this branch: | bzr merge lp:~jeremyrcohen/fabinterpreter/Jeremy_Cohen |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeffrey Lipton | Pending | ||
Review via email: mp+32015@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'README.txt' | |||
2 | --- README.txt 1970-01-01 00:00:00 +0000 | |||
3 | +++ README.txt 2010-08-07 00:08:43 +0000 | |||
4 | @@ -0,0 +1,7 @@ | |||
5 | 1 | Steps to running interpreter: | ||
6 | 2 | |||
7 | 3 | 1.Make sure DYLD_LIBRARY_PATH if using this on a Mac contains the directory of the qextserial libraries. This can be done in the run settings in Qt | ||
8 | 4 | 2.Set the Interpreter project to depend on src.pro (in Common/JrKerr/src/ but src.pro MUST be opened with Interpreter.pro to do this) | ||
9 | 5 | 3.Delete text in “Command” in the “Generate GUI” build step and add in “uic” | ||
10 | 6 | 4.Compile project | ||
11 | 7 | 5.Make sure the executable is set to active in Qt settings (and make sure that Qt has the right executable set) | ||
12 | 0 | 8 | ||
13 | === modified file 'software/.DS_Store' | |||
14 | 1 | Binary files software/.DS_Store 2010-07-23 20:12:14 +0000 and software/.DS_Store 2010-08-07 00:08:43 +0000 differ | 9 | Binary files software/.DS_Store 2010-07-23 20:12:14 +0000 and software/.DS_Store 2010-08-07 00:08:43 +0000 differ |
15 | === modified file 'software/Common/.DS_Store' | |||
16 | 2 | Binary files software/Common/.DS_Store 2010-07-23 20:12:14 +0000 and software/Common/.DS_Store 2010-08-07 00:08:43 +0000 differ | 10 | Binary files software/Common/.DS_Store 2010-07-23 20:12:14 +0000 and software/Common/.DS_Store 2010-08-07 00:08:43 +0000 differ |
17 | === modified file 'software/Common/JrKerr/nmccom.cpp' | |||
18 | --- software/Common/JrKerr/nmccom.cpp 2010-07-23 20:12:14 +0000 | |||
19 | +++ software/Common/JrKerr/nmccom.cpp 2010-08-07 00:08:43 +0000 | |||
20 | @@ -44,8 +44,13 @@ | |||
21 | 44 | cstr[1] = addr; | 44 | cstr[1] = addr; |
22 | 45 | cstr[2] = HARD_RESET; | 45 | cstr[2] = HARD_RESET; |
23 | 46 | cstr[3] = (byte)(cstr[1] + cstr[2]); //checksum | 46 | cstr[3] = (byte)(cstr[1] + cstr[2]); //checksum |
26 | 47 | 47 | int bytesRead = 0; | |
27 | 48 | ComPort->write(cstr, 4);//send reset | 48 | int totalBytes = 4; |
28 | 49 | for (i = 0; i < 4; i++) | ||
29 | 50 | { | ||
30 | 51 | ComPort->write(&(cstr[i]), 1);//send reset | ||
31 | 52 | bytesRead++; | ||
32 | 53 | } | ||
33 | 49 | usleep(10000); //wait for reset to execute | 54 | usleep(10000); //wait for reset to execute |
34 | 50 | for (i=0; i<nummod_; i++) delete mod[i].p; //delete and prev. declared modules | 55 | for (i=0; i<nummod_; i++) delete mod[i].p; //delete and prev. declared modules |
35 | 51 | nummod_ = 0; | 56 | nummod_ = 0; |
36 | @@ -54,11 +59,11 @@ | |||
37 | 54 | 59 | ||
38 | 55 | ComPort->setBaudRate(BAUD19200);//Reset the baud rate to the default | 60 | ComPort->setBaudRate(BAUD19200);//Reset the baud rate to the default |
39 | 56 | 61 | ||
45 | 57 | ComPort->flush(); //may not work | 62 | ComPort->flush(); //clear out any random crap left in buffer |
46 | 58 | // SioClrInbuf(ComPort); //clear out any random crap left in buffer | 63 | |
47 | 59 | 64 | if (totalBytes != bytesRead) | |
48 | 60 | 65 | return false; | |
49 | 61 | return(true); | 66 | else return true; |
50 | 62 | } | 67 | } |
51 | 63 | 68 | ||
52 | 64 | //--------------------------------------------------------------------------- | 69 | //--------------------------------------------------------------------------- |
53 | @@ -134,22 +139,24 @@ | |||
54 | 134 | InitVars(); | 139 | InitVars(); |
55 | 135 | if (ComPort != NULL) | 140 | if (ComPort != NULL) |
56 | 136 | delete ComPort; | 141 | delete ComPort; |
58 | 137 | ComPort = new QextSerialPort(portname, QextSerialPort::EventDriven); | 142 | ComPort = new QextSerialPort(portname, QextSerialPort::Polling); |
59 | 138 | bool open_status = ComPort->open(QIODevice::ReadWrite); | 143 | bool open_status = ComPort->open(QIODevice::ReadWrite); |
60 | 139 | ComPort->setBaudRate(BAUD19200); | 144 | ComPort->setBaudRate(BAUD19200); |
61 | 140 | ComPort->setFlowControl(FLOW_OFF); | 145 | ComPort->setFlowControl(FLOW_OFF); |
62 | 141 | ComPort->setParity(PAR_NONE); | 146 | ComPort->setParity(PAR_NONE); |
63 | 142 | ComPort->setDataBits(DATA_8); | 147 | ComPort->setDataBits(DATA_8); |
64 | 143 | ComPort->setStopBits(STOP_1); | 148 | ComPort->setStopBits(STOP_1); |
66 | 144 | ComPort->setTimeout(100); | 149 | //TODO: see how comport behaves w/out a timeout |
67 | 150 | //ComPort->setTimeout(500); | ||
68 | 145 | if (open_status < 0) return 0; | 151 | if (open_status < 0) return 0; |
69 | 146 | 152 | ||
76 | 147 | printf("Resetting NMC devices\n"); | 153 | qDebug() << "Resetting NMC devices"; |
77 | 148 | 154 | ||
78 | 149 | NmcHardReset(0xFF); | 155 | //TODO: change these reset commands because 0xFF is the wrong group address |
79 | 150 | NmcHardReset(0xFF); | 156 | NmcHardReset(0xFF); |
80 | 151 | 157 | NmcHardReset(0xFF); | |
81 | 152 | printf("NMC reset complete\n"); | 158 | |
82 | 159 | qDebug() << "NMC reset complete"; | ||
83 | 153 | addr = 1; | 160 | addr = 1; |
84 | 154 | while (1) | 161 | while (1) |
85 | 155 | { | 162 | { |
86 | @@ -167,13 +174,11 @@ | |||
87 | 167 | numread = ComPort->read(cstr, 2); //get back status, cksum | 174 | numread = ComPort->read(cstr, 2); //get back status, cksum |
88 | 168 | //numread = SioGetChars(ComPort, cstr, 2); | 175 | //numread = SioGetChars(ComPort, cstr, 2); |
89 | 169 | 176 | ||
90 | 170 | //jrc352: error reading in characters in SioGetChars | ||
91 | 171 | |||
92 | 172 | if (numread!=2) break; //if no response, punt out of loop | 177 | if (numread!=2) break; //if no response, punt out of loop |
93 | 173 | 178 | ||
94 | 174 | if (cstr[0] != cstr[1]) | 179 | if (cstr[0] != cstr[1]) |
95 | 175 | { | 180 | { |
97 | 176 | printf("Status checksum error - please reset the Network\n"); | 181 | qDebug() << "Status checksum error - please reset the Network"; |
98 | 177 | ComPort->close(); | 182 | ComPort->close(); |
99 | 178 | return(0); | 183 | return(0); |
100 | 179 | } | 184 | } |
101 | @@ -189,7 +194,7 @@ | |||
102 | 189 | 194 | ||
103 | 190 | if (numread!=4) | 195 | if (numread!=4) |
104 | 191 | { | 196 | { |
106 | 192 | printf("Could not read device type\n"); | 197 | qDebug() << "Could not read device type"; |
107 | 193 | ComPort->close(); | 198 | ComPort->close(); |
108 | 194 | return(0); | 199 | return(0); |
109 | 195 | } | 200 | } |
110 | @@ -201,10 +206,20 @@ | |||
111 | 201 | mod[addr].groupleader = false; | 206 | mod[addr].groupleader = false; |
112 | 202 | switch (mod[addr].modtype) | 207 | switch (mod[addr].modtype) |
113 | 203 | { | 208 | { |
118 | 204 | case SERVOMODTYPE: mod[addr].p = ServoNewMod(); break; | 209 | case SERVOMODTYPE: |
119 | 205 | case ADCMODTYPE: mod[addr].p = AdcNewMod(); break; | 210 | { |
120 | 206 | case IOMODTYPE: mod[addr].p = IoNewMod(); break; | 211 | mod[addr].p = ServoNewMod(); |
121 | 207 | case STEPMODTYPE: mod[addr].p = StepNewMod(); break; | 212 | //fix for change in I/O CTRL command |
122 | 213 | if ((mod[addr].modver<10) || (mod[addr].modver>20)) | ||
123 | 214 | { | ||
124 | 215 | mod[addr].p = (SERVOMOD *)(mod[addr].p); | ||
125 | 216 | //mod[addr].p->ioctrl = IO1_IN | IO2_IN; | ||
126 | 217 | } | ||
127 | 218 | break; | ||
128 | 219 | } | ||
129 | 220 | case ADCMODTYPE: mod[addr].p = AdcNewMod(); break; | ||
130 | 221 | case IOMODTYPE: mod[addr].p = IoNewMod(); break; | ||
131 | 222 | case STEPMODTYPE: mod[addr].p = StepNewMod(); break; | ||
132 | 208 | } | 223 | } |
133 | 209 | addr++; //increment the address | 224 | addr++; //increment the address |
134 | 210 | } | 225 | } |
135 | @@ -216,12 +231,12 @@ | |||
136 | 216 | if (nummod_ > 0) | 231 | if (nummod_ > 0) |
137 | 217 | { | 232 | { |
138 | 218 | NmcChangeBaud(0xFF, baudrate); | 233 | NmcChangeBaud(0xFF, baudrate); |
141 | 219 | if (nummod_>1) printf("%d Modules found\n", nummod_); | 234 | if (nummod_>1) qDebug() << nummod_ << "Modules found"; |
142 | 220 | else printf("%d Module found\n", nummod_); | 235 | else qDebug() << nummod_ << "Module found"; |
143 | 221 | } | 236 | } |
144 | 222 | else | 237 | else |
145 | 223 | { | 238 | { |
147 | 224 | printf("No modules found on the network.\nPlease check power and connections.\n"); | 239 | qDebug() << "No modules found on the network.\nPlease check power and connections."; |
148 | 225 | ComPort->close(); | 240 | ComPort->close(); |
149 | 226 | } | 241 | } |
150 | 227 | 242 | ||
151 | @@ -248,7 +263,6 @@ | |||
152 | 248 | //If too many SIO errors, punt | 263 | //If too many SIO errors, punt |
153 | 249 | if (SioError > MAXSIOERROR) | 264 | if (SioError > MAXSIOERROR) |
154 | 250 | { | 265 | { |
155 | 251 | qDebug() << "bad!!!!!"; | ||
156 | 252 | return(false); | 266 | return(false); |
157 | 253 | } | 267 | } |
158 | 254 | IOBusy = true; | 268 | IOBusy = true; |
159 | @@ -259,7 +273,7 @@ | |||
160 | 259 | ( mod[stataddr].modtype==IOMODTYPE) || | 273 | ( mod[stataddr].modtype==IOMODTYPE) || |
161 | 260 | ( mod[stataddr].modtype==STEPMODTYPE) ) ) | 274 | ( mod[stataddr].modtype==STEPMODTYPE) ) ) |
162 | 261 | { | 275 | { |
164 | 262 | printf("Module type %d not supported\n",mod[stataddr].modtype); | 276 | qDebug() << "Module type" << mod[stataddr].modtype << "not supported"; |
165 | 263 | return (false); | 277 | return (false); |
166 | 264 | } | 278 | } |
167 | 265 | 279 | ||
168 | @@ -280,13 +294,15 @@ | |||
169 | 280 | ComPort->flush(); //Get rid of any old input chars | 294 | ComPort->flush(); //Get rid of any old input chars |
170 | 281 | 295 | ||
171 | 282 | int bytesWritten = 0; | 296 | int bytesWritten = 0; |
172 | 297 | |||
173 | 283 | for (i = 0; i < n+4; i++) | 298 | for (i = 0; i < n+4; i++) |
174 | 284 | { | 299 | { |
176 | 285 | if (ComPort->write(&(char)outstr[i], 1) == 1) bytesWritten++; //Send the command string | 300 | byte * temp = &(outstr[i]); |
177 | 301 | if(ComPort->write((char *)temp, 1)) bytesWritten++; //Send the command string | ||
178 | 286 | } | 302 | } |
179 | 287 | 303 | ||
180 | 288 | if (bytesWritten != n+4) | 304 | if (bytesWritten != n+4) |
182 | 289 | printf("Only wrote %d bytes out of %d bytes.\n",bytesWritten, n+4); | 305 | qDebug() << "Only wrote " << bytesWritten << " bytes out of " << n+4 << " bytes."; |
183 | 290 | 306 | ||
184 | 291 | if (stataddr == 0) //If a group command w/ no leader, add delay then exit | 307 | if (stataddr == 0) //If a group command w/ no leader, add delay then exit |
185 | 292 | { | 308 | { |
186 | @@ -325,7 +341,7 @@ | |||
187 | 325 | //If too many errors - prompt to reset | 341 | //If too many errors - prompt to reset |
188 | 326 | if (SioError >= MAXSIOERROR) | 342 | if (SioError >= MAXSIOERROR) |
189 | 327 | { | 343 | { |
191 | 328 | printf("Multiple communication errors - please reset the Network\n"); | 344 | qDebug() << "Multiple communication errors - please reset the Network"; |
192 | 329 | return; | 345 | return; |
193 | 330 | } | 346 | } |
194 | 331 | 347 | ||
195 | @@ -341,12 +357,12 @@ | |||
196 | 341 | char cmdstr[2]; | 357 | char cmdstr[2]; |
197 | 342 | 358 | ||
198 | 343 | if (!(groupaddr & 0x80)) return false; //punt if not valid group address | 359 | if (!(groupaddr & 0x80)) return false; //punt if not valid group address |
199 | 344 | |||
200 | 345 | cmdstr[0] = addr; | 360 | cmdstr[0] = addr; |
201 | 346 | cmdstr[1] = groupaddr; | 361 | cmdstr[1] = groupaddr; |
202 | 347 | if (leader) cmdstr[1] &= 0x7F; //clear upper bit if a group leader | 362 | if (leader) cmdstr[1] &= 0x7F; //clear upper bit if a group leader |
203 | 348 | mod[addr].groupaddr = groupaddr; | 363 | mod[addr].groupaddr = groupaddr; |
204 | 349 | mod[addr].groupleader = leader; | 364 | mod[addr].groupleader = leader; |
205 | 365 | usleep(50000); | ||
206 | 350 | return NmcSendCmd(addr, SET_ADDR, cmdstr, 2, addr); | 366 | return NmcSendCmd(addr, SET_ADDR, cmdstr, 2, addr); |
207 | 351 | } | 367 | } |
208 | 352 | //--------------------------------------------------------------------------- | 368 | //--------------------------------------------------------------------------- |
209 | @@ -366,7 +382,7 @@ | |||
210 | 366 | //--------------------------------------------------------------------------- | 382 | //--------------------------------------------------------------------------- |
211 | 367 | extern "C" BOOL NmcNoOp(byte addr) | 383 | extern "C" BOOL NmcNoOp(byte addr) |
212 | 368 | { | 384 | { |
214 | 369 | return NmcSendCmd(addr, NOP, NULL, 0, addr); | 385 | return NmcSendCmd(addr, NOP, NULL, 0, addr); |
215 | 370 | } | 386 | } |
216 | 371 | //--------------------------------------------------------------------------- | 387 | //--------------------------------------------------------------------------- |
217 | 372 | extern "C" BOOL NmcReadStatus(byte addr, byte statusitems) | 388 | extern "C" BOOL NmcReadStatus(byte addr, byte statusitems) |
218 | 373 | 389 | ||
219 | === modified file 'software/Common/JrKerr/nmccom.h' | |||
220 | --- software/Common/JrKerr/nmccom.h 2010-07-12 18:50:09 +0000 | |||
221 | +++ software/Common/JrKerr/nmccom.h 2010-08-07 00:08:43 +0000 | |||
222 | @@ -13,7 +13,7 @@ | |||
223 | 13 | // Non-windows platforms need these too -BR | 13 | // Non-windows platforms need these too -BR |
224 | 14 | //typedef int BOOL; //0=false, <>0 true | 14 | //typedef int BOOL; //0=false, <>0 true |
225 | 15 | //typedef int HANDLE; | 15 | //typedef int HANDLE; |
227 | 16 | //typedef unsigned long DWORD; | 16 | //typedef unsigned int DWORD; |
228 | 17 | //#define INVALID_HANDLE_VALUE -1 | 17 | //#define INVALID_HANDLE_VALUE -1 |
229 | 18 | 18 | ||
230 | 19 | 19 | ||
231 | @@ -22,7 +22,7 @@ | |||
232 | 22 | //jrc352: below taken from "sioutil.h" | 22 | //jrc352: below taken from "sioutil.h" |
233 | 23 | // Non-windows platforms need these too -BR | 23 | // Non-windows platforms need these too -BR |
234 | 24 | typedef int BOOL; //0=false, <>0 true | 24 | typedef int BOOL; //0=false, <>0 true |
236 | 25 | typedef unsigned long DWORD; | 25 | typedef unsigned int DWORD; |
237 | 26 | #define INVALID_HANDLE_VALUE -1 | 26 | #define INVALID_HANDLE_VALUE -1 |
238 | 27 | 27 | ||
239 | 28 | typedef struct _NMCMOD { | 28 | typedef struct _NMCMOD { |
240 | 29 | 29 | ||
241 | === added directory 'software/Common/JrKerr/old_path' | |||
242 | === added file 'software/Common/JrKerr/old_path/path.cpp' | |||
243 | --- software/Common/JrKerr/old_path/path.cpp 1970-01-01 00:00:00 +0000 | |||
244 | +++ software/Common/JrKerr/old_path/path.cpp 2010-08-07 00:08:43 +0000 | |||
245 | @@ -0,0 +1,650 @@ | |||
246 | 1 | //--------------------------------------------------------------------------- | ||
247 | 2 | #pragma hdrstop | ||
248 | 3 | |||
249 | 4 | #include <math.h> | ||
250 | 5 | #include "path.h" | ||
251 | 6 | #include "nmccom.h" | ||
252 | 7 | #include "picservo.h" | ||
253 | 8 | #include <QDebug> | ||
254 | 9 | //--------------------------------------------------------------------------- | ||
255 | 10 | //Globals: | ||
256 | 11 | int pathsize; //local path size | ||
257 | 12 | segment seglist[MAXSEG]; //list of segments | ||
258 | 13 | int seglistsize; //number of segments in list | ||
259 | 14 | int curseg; //current segment number | ||
260 | 15 | int curppoint; //current pathpoint | ||
261 | 16 | float tan_tolerance = TAN_3DEGREE; //minimum cos(th) for angle between tangents | ||
262 | 17 | frame cur_arcframe; //coordinate fram for the current arc | ||
263 | 18 | float pathlen; //total path length | ||
264 | 19 | float arclen; //total length of path already downloaded | ||
265 | 20 | float stublen; //length of path in current segment | ||
266 | 21 | int pathfreq = P_30HZ; //selected path frequency | ||
267 | 22 | int bufsize; //max num points to store in the PIC-SERVO buffer | ||
268 | 23 | float maxvel, vel, acc; //max. velocity, cur velocity & acceleration | ||
269 | 24 | byte x = 1; //axes addresses | ||
270 | 25 | byte y = 2; | ||
271 | 26 | byte z = 3; | ||
272 | 27 | byte group = 0xFF; //group address for coordinated controllers | ||
273 | 28 | byte leader = 0x00; //group leader address for coordinated controllers | ||
274 | 29 | int finaldecel; //flag for when final deceleration has started | ||
275 | 30 | int at_end; //flags when we are at end of path | ||
276 | 31 | float xoff, yoff, zoff; //origin offset | ||
277 | 32 | float UTOCX, UTOCY, UTOCZ; //Units TO Counts conversion factors | ||
278 | 33 | float tolerance; //small distance tolerance use for near-zero comparisons | ||
279 | 34 | |||
280 | 35 | //--------------------------------------------------------------------------- | ||
281 | 36 | // Geometric functions | ||
282 | 37 | //--------------------------------------------------------------------------- | ||
283 | 38 | //Returns the magnitude of a floating point vector | ||
284 | 39 | float mag(fp p) | ||
285 | 40 | { | ||
286 | 41 | return(sqrt(p[0]*p[0] + p[1]*p[1] + p[2]*p[2])); | ||
287 | 42 | } | ||
288 | 43 | //--------------------------------------------------------------------------- | ||
289 | 44 | //Returns the dot product of two floating point vectors | ||
290 | 45 | float dot(fp x, fp y) | ||
291 | 46 | { | ||
292 | 47 | return( x[0]*y[0] + x[1]*y[1] + x[2]*y[2] ); | ||
293 | 48 | } | ||
294 | 49 | //--------------------------------------------------------------------------- | ||
295 | 50 | //Z is returned as the cross product of (x cross y) | ||
296 | 51 | void cross(fp x, fp y, fp z) | ||
297 | 52 | { | ||
298 | 53 | z[0] = x[1]*y[2] - x[2]*y[1]; | ||
299 | 54 | z[1] = x[2]*y[0] - x[0]*y[2]; | ||
300 | 55 | z[2] = x[0]*y[1] - x[1]*y[0]; | ||
301 | 56 | } | ||
302 | 57 | //--------------------------------------------------------------------------- | ||
303 | 58 | //y = normalized x ( normalize(x,x) works OK ) | ||
304 | 59 | float normalize(fp x, fp y) | ||
305 | 60 | { | ||
306 | 61 | float a; | ||
307 | 62 | |||
308 | 63 | a = mag(x); | ||
309 | 64 | if (a==0.0) return(a); | ||
310 | 65 | |||
311 | 66 | y[0] /= a; | ||
312 | 67 | y[1] /= a; | ||
313 | 68 | y[2] /= a; | ||
314 | 69 | return(a); | ||
315 | 70 | } | ||
316 | 71 | //--------------------------------------------------------------------------- | ||
317 | 72 | //Cooredinate frame transformation: y = F*x, ( y = F*y OK ) | ||
318 | 73 | void fvmult(frame *F, fp x, fp y) | ||
319 | 74 | { | ||
320 | 75 | fp xtemp; | ||
321 | 76 | |||
322 | 77 | xtemp[0] = x[0]; | ||
323 | 78 | xtemp[1] = x[1]; | ||
324 | 79 | xtemp[2] = x[2]; | ||
325 | 80 | y[0] = F->x[0]*xtemp[0] + F->y[0]*xtemp[1] + F->z[0]*xtemp[2] + F->p[0]; | ||
326 | 81 | y[1] = F->x[1]*xtemp[0] + F->y[1]*xtemp[1] + F->z[1]*xtemp[2] + F->p[1]; | ||
327 | 82 | y[2] = F->x[2]*xtemp[0] + F->y[2]*xtemp[1] + F->z[2]*xtemp[2] + F->p[2]; | ||
328 | 83 | } | ||
329 | 84 | //--------------------------------------------------------------------------- | ||
330 | 85 | // Coordinate frame inversion: *B = inverse(A) | ||
331 | 86 | void finvert(frame A, frame *B) | ||
332 | 87 | { | ||
333 | 88 | B->x[1] = A.y[0]; | ||
334 | 89 | B->x[2] = A.z[0]; | ||
335 | 90 | B->y[2] = A.z[1]; | ||
336 | 91 | B->y[0] = A.x[1]; | ||
337 | 92 | B->z[0] = A.x[2]; | ||
338 | 93 | B->z[1] = A.y[2]; | ||
339 | 94 | B->x[0] = A.x[0]; | ||
340 | 95 | B->y[1] = A.y[1]; | ||
341 | 96 | B->z[2] = A.z[2]; | ||
342 | 97 | B->p[0] = -A.x[0]*A.p[0] - A.y[0]*A.p[1] - A.z[0]*A.p[2]; | ||
343 | 98 | B->p[1] = -A.x[1]*A.p[0] - A.y[1]*A.p[1] - A.z[1]*A.p[2]; | ||
344 | 99 | B->p[2] = -A.x[2]*A.p[0] - A.y[2]*A.p[1] - A.z[2]*A.p[2]; | ||
345 | 100 | } | ||
346 | 101 | //--------------------------------------------------------------------------- | ||
347 | 102 | //Get a normal vector tangent to a segment endpoint (=1 for p1, =2 for p2) | ||
348 | 103 | //returns -1 if segment length or radius < tolerance, 0 on success | ||
349 | 104 | int GetTanVect(segment *s, fp p, int endpoint) | ||
350 | 105 | { | ||
351 | 106 | fp q; | ||
352 | 107 | |||
353 | 108 | if (s->type == LINE) | ||
354 | 109 | { | ||
355 | 110 | p[0] = s->p2[0] - s->p1[0]; | ||
356 | 111 | p[1] = s->p2[1] - s->p1[1]; | ||
357 | 112 | p[2] = s->p2[2] - s->p1[2]; | ||
358 | 113 | if (normalize(p, p) < tolerance) return(-1); | ||
359 | 114 | else return(0); | ||
360 | 115 | } | ||
361 | 116 | else if (s->type == ARC) | ||
362 | 117 | { | ||
363 | 118 | if (endpoint == 1) | ||
364 | 119 | { | ||
365 | 120 | q[0] = s->p1[0] - s->c[0]; | ||
366 | 121 | q[1] = s->p1[1] - s->c[1]; | ||
367 | 122 | q[2] = s->p1[2] - s->c[2]; | ||
368 | 123 | } | ||
369 | 124 | else | ||
370 | 125 | { | ||
371 | 126 | q[0] = s->p2[0] - s->c[0]; | ||
372 | 127 | q[1] = s->p2[1] - s->c[1]; | ||
373 | 128 | q[2] = s->p2[2] - s->c[2]; | ||
374 | 129 | } | ||
375 | 130 | if (normalize(q, q) < tolerance) return(-1); | ||
376 | 131 | cross(s->norm, q, p); | ||
377 | 132 | return(0); | ||
378 | 133 | } | ||
379 | 134 | |||
380 | 135 | return(0); | ||
381 | 136 | } | ||
382 | 137 | //--------------------------------------------------------------------------- | ||
383 | 138 | // Segment list functions | ||
384 | 139 | //--------------------------------------------------------------------------- | ||
385 | 140 | //Theta = allowable angle (in degrees) between continuous path segments | ||
386 | 141 | extern "C" void SetTangentTolerance(float theta) | ||
387 | 142 | { | ||
388 | 143 | tan_tolerance = cos(theta*DTOR); | ||
389 | 144 | } | ||
390 | 145 | //--------------------------------------------------------------------------- | ||
391 | 146 | // Clear the current segment list and initialize the starting point | ||
392 | 147 | extern "C" void ClearSegList(float xi, float yi, float zi) | ||
393 | 148 | { | ||
394 | 149 | seglistsize = 0; | ||
395 | 150 | seglist[0].p1[0] = xi; | ||
396 | 151 | seglist[0].p1[1] = yi; | ||
397 | 152 | seglist[0].p1[2] = zi; | ||
398 | 153 | } | ||
399 | 154 | //--------------------------------------------------------------------------- | ||
400 | 155 | //Extract the reference frame for an arc | ||
401 | 156 | //Also fills in the radius and arclength | ||
402 | 157 | void GetArcFrame(segment *seg, frame *F) | ||
403 | 158 | { | ||
404 | 159 | float q, theta; | ||
405 | 160 | fp p; | ||
406 | 161 | |||
407 | 162 | if (seg->type != ARC) return; //punt if not an arc | ||
408 | 163 | |||
409 | 164 | F->p[0] = seg->c[0]; //origin is at the center | ||
410 | 165 | F->p[1] = seg->c[1]; | ||
411 | 166 | F->p[2] = seg->c[2]; | ||
412 | 167 | F->x[0] = seg->p1[0] - seg->c[0]; //X vector points from center to P1 | ||
413 | 168 | F->x[1] = seg->p1[1] - seg->c[1]; | ||
414 | 169 | F->x[2] = seg->p1[2] - seg->c[2]; | ||
415 | 170 | seg->r = normalize(F->x, F->x); //extract radius and normalize | ||
416 | 171 | q = dot(F->x, seg->norm); //make sure normal vector is perp. to X | ||
417 | 172 | F->z[0] = seg->norm[0] - q*F->x[0]; | ||
418 | 173 | F->z[1] = seg->norm[1] - q*F->x[1]; | ||
419 | 174 | F->z[2] = seg->norm[2] - q*F->x[2]; | ||
420 | 175 | normalize(F->z, F->z); | ||
421 | 176 | cross(F->z, F->x, F->y); | ||
422 | 177 | |||
423 | 178 | p[0] = seg->p2[0] - seg->c[0]; //get the arclength | ||
424 | 179 | p[1] = seg->p2[1] - seg->c[1]; | ||
425 | 180 | p[2] = seg->p2[2] - seg->c[2]; | ||
426 | 181 | theta = atan2( dot(p,F->y), dot(p,F->x) ); | ||
427 | 182 | if (theta < 0.0) theta = TWOPI + theta; | ||
428 | 183 | if (fabs(theta) < 0.001) theta = TWOPI - theta; | ||
429 | 184 | seg->len = fabs(seg->r * theta); | ||
430 | 185 | } | ||
431 | 186 | //--------------------------------------------------------------------------- | ||
432 | 187 | //Add a line segment to the segment list | ||
433 | 188 | //Returns: position in segment list if OK | ||
434 | 189 | // -1 if segment is not tangent | ||
435 | 190 | // -2 if segment list is full | ||
436 | 191 | //Function assumes the normal vector of any previous arc segment is accurate | ||
437 | 192 | extern "C" int AddLineSeg(float x, float y, float z) | ||
438 | 193 | { | ||
439 | 194 | fp pn, qn; | ||
440 | 195 | |||
441 | 196 | if (seglistsize >= MAXSEG) return(-2); | ||
442 | 197 | |||
443 | 198 | seglist[seglistsize].type = LINE; | ||
444 | 199 | |||
445 | 200 | seglist[seglistsize].p2[0] = x; | ||
446 | 201 | seglist[seglistsize].p2[1] = y; | ||
447 | 202 | seglist[seglistsize].p2[2] = z; | ||
448 | 203 | |||
449 | 204 | if (seglistsize > 0) //match start point to end point of prev segment | ||
450 | 205 | { | ||
451 | 206 | seglist[seglistsize].p1[0] = seglist[seglistsize-1].p2[0]; | ||
452 | 207 | seglist[seglistsize].p1[1] = seglist[seglistsize-1].p2[1]; | ||
453 | 208 | seglist[seglistsize].p1[2] = seglist[seglistsize-1].p2[2]; | ||
454 | 209 | } | ||
455 | 210 | |||
456 | 211 | //Calculate normal vector and length for this segment | ||
457 | 212 | pn[0] = x - seglist[seglistsize].p1[0]; | ||
458 | 213 | pn[1] = y - seglist[seglistsize].p1[1]; | ||
459 | 214 | pn[2] = z - seglist[seglistsize].p1[2]; | ||
460 | 215 | seglist[seglistsize].len = normalize(pn, pn); | ||
461 | 216 | |||
462 | 217 | //Check tangency with prev. segment for segments > tolerance: | ||
463 | 218 | if ( (seglist[seglistsize].len > tolerance) && (seglistsize > 0) ) | ||
464 | 219 | if ( GetTanVect( &(seglist[seglistsize-1]), qn, 2) == 0 ) | ||
465 | 220 | if (dot(pn,qn) < tan_tolerance) return(-1); | ||
466 | 221 | |||
467 | 222 | seglistsize++; | ||
468 | 223 | qDebug() << "seglistsize = " << seglistsize - 1; | ||
469 | 224 | return(seglistsize - 1); | ||
470 | 225 | } | ||
471 | 226 | //--------------------------------------------------------------------------- | ||
472 | 227 | //Add an arc segment to the segment list | ||
473 | 228 | //Returns: position in segment list if OK | ||
474 | 229 | // -1 if segment is not tangent | ||
475 | 230 | // -2 if segment list is full | ||
476 | 231 | // -3 if arc data invalid | ||
477 | 232 | //(Invalid arc data - zero len. normal, radius < tolerance, normal not perp.) | ||
478 | 233 | //Function assumes the normal vector of any previous arc segment is accurate | ||
479 | 234 | extern "C" int AddArcSeg( float x, float y, float z, //end point | ||
480 | 235 | float cx, float cy, float cz, //center point | ||
481 | 236 | float nx, float ny, float nz ) //normal | ||
482 | 237 | { | ||
483 | 238 | fp pn, qn; | ||
484 | 239 | frame F; | ||
485 | 240 | |||
486 | 241 | if (seglistsize >= MAXSEG) return(-2); | ||
487 | 242 | |||
488 | 243 | seglist[seglistsize].type = ARC; | ||
489 | 244 | |||
490 | 245 | seglist[seglistsize].p2[0] = x; | ||
491 | 246 | seglist[seglistsize].p2[1] = y; | ||
492 | 247 | seglist[seglistsize].p2[2] = z; | ||
493 | 248 | seglist[seglistsize].c[0] = cx; | ||
494 | 249 | seglist[seglistsize].c[1] = cy; | ||
495 | 250 | seglist[seglistsize].c[2] = cz; | ||
496 | 251 | seglist[seglistsize].norm[0] = nx; | ||
497 | 252 | seglist[seglistsize].norm[1] = ny; | ||
498 | 253 | seglist[seglistsize].norm[2] = nz; | ||
499 | 254 | |||
500 | 255 | if (seglistsize > 0) //match start point to end point of prev segment | ||
501 | 256 | { | ||
502 | 257 | seglist[seglistsize].p1[0] = seglist[seglistsize-1].p2[0]; | ||
503 | 258 | seglist[seglistsize].p1[1] = seglist[seglistsize-1].p2[1]; | ||
504 | 259 | seglist[seglistsize].p1[2] = seglist[seglistsize-1].p2[2]; | ||
505 | 260 | } | ||
506 | 261 | |||
507 | 262 | //Normalize n and punt if too small | ||
508 | 263 | if ( normalize(seglist[seglistsize].norm, seglist[seglistsize].norm) < tolerance ) | ||
509 | 264 | return(-3); | ||
510 | 265 | |||
511 | 266 | //Find radius to p2, and punt if too small | ||
512 | 267 | pn[0] = x - cx; | ||
513 | 268 | pn[1] = y - cy; | ||
514 | 269 | pn[2] = z - cz; | ||
515 | 270 | seglist[seglistsize].r = normalize(pn, pn); | ||
516 | 271 | if ( seglist[seglistsize].r < tolerance) return(-3); | ||
517 | 272 | |||
518 | 273 | //Check if normal is perp to c->p2 vector and punt if not | ||
519 | 274 | if ( fabs(dot(seglist[seglistsize].norm, pn)) > 0.001 ) return(-3); | ||
520 | 275 | |||
521 | 276 | //Find radius to p1, and punt if not equal to radius to p2 | ||
522 | 277 | pn[0] = seglist[seglistsize].p1[0] - cx; | ||
523 | 278 | pn[1] = seglist[seglistsize].p1[1] - cy; | ||
524 | 279 | pn[2] = seglist[seglistsize].p1[2] - cz; | ||
525 | 280 | if ( fabs(seglist[seglistsize].r - normalize(pn, pn)) > tolerance) return(-3); | ||
526 | 281 | |||
527 | 282 | //Check if normal is perp to c->p2 vector and punt if not | ||
528 | 283 | if ( fabs(dot(seglist[seglistsize].norm, pn)) > 0.001 ) return(-3); | ||
529 | 284 | |||
530 | 285 | //Check for tangency with prev segment | ||
531 | 286 | if ( seglistsize > 0 ) | ||
532 | 287 | { | ||
533 | 288 | GetTanVect( &(seglist[seglistsize]), pn, 1); //get current tangent | ||
534 | 289 | if ( GetTanVect( &(seglist[seglistsize-1]), qn, 2) == 0 ) //get prev tangent | ||
535 | 290 | if (dot(pn,qn) < tan_tolerance) return(-1); | ||
536 | 291 | } | ||
537 | 292 | |||
538 | 293 | GetArcFrame(&(seglist[seglistsize]), &F); //fills in segment length | ||
539 | 294 | |||
540 | 295 | seglistsize++; | ||
541 | 296 | return(seglistsize - 1); | ||
542 | 297 | } | ||
543 | 298 | //--------------------------------------------------------------------------- | ||
544 | 299 | //Returns a point p which lies on a line segment, and is a distance s from | ||
545 | 300 | //the start of the line segment | ||
546 | 301 | void GetLineSegPoint(segment *seg, float s, fp p) | ||
547 | 302 | { | ||
548 | 303 | float r; | ||
549 | 304 | |||
550 | 305 | r = s/seg->len; | ||
551 | 306 | p[0] = seg->p1[0] + r*(seg->p2[0] - seg->p1[0]); | ||
552 | 307 | p[1] = seg->p1[1] + r*(seg->p2[1] - seg->p1[1]); | ||
553 | 308 | p[2] = seg->p1[2] + r*(seg->p2[2] - seg->p1[2]); | ||
554 | 309 | } | ||
555 | 310 | //--------------------------------------------------------------------------- | ||
556 | 311 | //Set feedrate in units per second | ||
557 | 312 | extern "C" void SetFeedrate(float fr) | ||
558 | 313 | { | ||
559 | 314 | switch (pathfreq) //calculate velocity in units per tick | ||
560 | 315 | { | ||
561 | 316 | case P_30HZ: maxvel = fr/30.0; | ||
562 | 317 | break; | ||
563 | 318 | case P_60HZ: maxvel = fr/60.0; | ||
564 | 319 | break; | ||
565 | 320 | case P_120HZ: maxvel = fr/120.0; | ||
566 | 321 | break; | ||
567 | 322 | default: maxvel = fr/30.0; | ||
568 | 323 | } | ||
569 | 324 | } | ||
570 | 325 | //--------------------------------------------------------------------------- | ||
571 | 326 | //Set the origin to which all segment data is relative | ||
572 | 327 | extern "C" void SetOrigin(float xoffset, float yoffset, float zoffset) | ||
573 | 328 | { | ||
574 | 329 | xoff = xoffset; //origin offset | ||
575 | 330 | yoff = yoffset; | ||
576 | 331 | zoff = zoffset; | ||
577 | 332 | } | ||
578 | 333 | //--------------------------------------------------------------------------- | ||
579 | 334 | //Initialize various parameters for this path generation module | ||
580 | 335 | //Returns -1 if Status items are not set properly, | ||
581 | 336 | // -2 if scale facotrs are zero | ||
582 | 337 | extern "C" int SetPathParams2(int freq, int nbuf, | ||
583 | 338 | int xaxis, int yaxis, int zaxis, int groupaddr, int leaderaddr, | ||
584 | 339 | float xscale, float yscale, float zscale, | ||
585 | 340 | float accel ) | ||
586 | 341 | { | ||
587 | 342 | byte statitems; | ||
588 | 343 | byte ioctrl; | ||
589 | 344 | |||
590 | 345 | //SimpleMsgBox(" PIC-SERVO Coordinated Control Example\n\n- FOR EVALUATION PURPOSES ONLY -"); | ||
591 | 346 | |||
592 | 347 | pathfreq = freq; //set to 30 or 60 hz | ||
593 | 348 | bufsize = nbuf; //max num points to store in the PIC-SERVO buffer | ||
594 | 349 | x = (byte)xaxis; //axes addresses | ||
595 | 350 | y = (byte)yaxis; | ||
596 | 351 | z = (byte)zaxis; | ||
597 | 352 | group = (byte)groupaddr; | ||
598 | 353 | leader = (byte)leaderaddr; | ||
599 | 354 | |||
600 | 355 | if (freq == P_120HZ) //set fast path mode if using 120 Hz path | ||
601 | 356 | { | ||
602 | 357 | ioctrl = ServoGetIoCtrl(x); | ||
603 | 358 | ServoSetIoCtrl(x, (byte)(ioctrl | FAST_PATH)); | ||
604 | 359 | ioctrl = ServoGetIoCtrl(y); | ||
605 | 360 | ServoSetIoCtrl(y, (byte)(ioctrl | FAST_PATH)); | ||
606 | 361 | if (z) | ||
607 | 362 | { | ||
608 | 363 | ioctrl = ServoGetIoCtrl(z); | ||
609 | 364 | ServoSetIoCtrl(z, (byte)(ioctrl | FAST_PATH)); | ||
610 | 365 | } | ||
611 | 366 | } | ||
612 | 367 | else //clear fast path bit if using slower modes | ||
613 | 368 | { | ||
614 | 369 | ioctrl = ServoGetIoCtrl(x); | ||
615 | 370 | ServoSetIoCtrl(x, (byte)(ioctrl & ~((byte)(FAST_PATH)) )); | ||
616 | 371 | ioctrl = ServoGetIoCtrl(y); | ||
617 | 372 | ServoSetIoCtrl(y, (byte)(ioctrl & ~((byte)(FAST_PATH)) )); | ||
618 | 373 | if (z) | ||
619 | 374 | { | ||
620 | 375 | ioctrl = ServoGetIoCtrl(z); | ||
621 | 376 | ServoSetIoCtrl(z, (byte)(ioctrl & ~((byte)(FAST_PATH)) )); | ||
622 | 377 | } | ||
623 | 378 | } | ||
624 | 379 | |||
625 | 380 | if (fabs(xscale)<1.0 || fabs(yscale)<1.0) return(-2); | ||
626 | 381 | if ( zaxis && (fabs(zscale)<1.0) ) return(-2); | ||
627 | 382 | |||
628 | 383 | UTOCX = xscale; //Units To X counts | ||
629 | 384 | UTOCY = yscale; | ||
630 | 385 | UTOCZ = zscale; | ||
631 | 386 | |||
632 | 387 | //Set the tolerance equivalent to 40 counts of the lowest resolution axis | ||
633 | 388 | tolerance = fabs(40.0/xscale); | ||
634 | 389 | if (tolerance < fabs(40.0/yscale)) tolerance = fabs(40.0/yscale); | ||
635 | 390 | if (zaxis) | ||
636 | 391 | if (tolerance < fabs(40.0/zscale)) tolerance = fabs(40.0/zscale); | ||
637 | 392 | |||
638 | 393 | switch (pathfreq) //calculate acceleration in units per tick^2 | ||
639 | 394 | { | ||
640 | 395 | case P_30HZ: acc = accel/30.0/30.0; | ||
641 | 396 | break; | ||
642 | 397 | case P_60HZ: acc = accel/60.0/60.0; | ||
643 | 398 | break; | ||
644 | 399 | case P_120HZ: acc = accel/120.0/120.0; | ||
645 | 400 | break; | ||
646 | 401 | default: acc = accel/30.0/30.0; | ||
647 | 402 | } | ||
648 | 403 | |||
649 | 404 | //Check that the required status data will be returned with each command: | ||
650 | 405 | statitems = SEND_POS | SEND_NPOINTS | SEND_PERROR | SEND_AUX; | ||
651 | 406 | |||
652 | 407 | if ( ( (NmcGetStatItems(x)& statitems) != statitems ) || | ||
653 | 408 | ( (NmcGetStatItems(y)& statitems) != statitems ) || | ||
654 | 409 | ( (z && (NmcGetStatItems(z)& statitems) != statitems )) ) | ||
655 | 410 | { | ||
656 | 411 | //ErrorMsgBox("Required status items have not been set"); | ||
657 | 412 | return(-1); | ||
658 | 413 | } | ||
659 | 414 | |||
660 | 415 | return(0); | ||
661 | 416 | } | ||
662 | 417 | //--------------------------------------------------------------------------- | ||
663 | 418 | //Initialize various parameters for this path generation module | ||
664 | 419 | //Returns -1 if Status items are not set properly, | ||
665 | 420 | // -2 if scale facotrs are zero | ||
666 | 421 | extern "C" int SetPathParams(int freq, int nbuf, | ||
667 | 422 | int xaxis, int yaxis, int zaxis, int groupaddr, int leaderaddr, | ||
668 | 423 | float xscale, float yscale, float zscale, | ||
669 | 424 | float accel ) | ||
670 | 425 | { | ||
671 | 426 | byte statitems; | ||
672 | 427 | |||
673 | 428 | //SimpleMsgBox(" PIC-SERVO Coordinated Control Example\n\n- FOR EVALUATION PURPOSES ONLY -"); | ||
674 | 429 | |||
675 | 430 | pathfreq = freq; //set to 30 or 60 hz | ||
676 | 431 | bufsize = nbuf; //max num points to store in the PIC-SERVO buffer | ||
677 | 432 | x = (byte)xaxis; //axes addresses | ||
678 | 433 | y = (byte)yaxis; | ||
679 | 434 | z = (byte)zaxis; | ||
680 | 435 | group = (byte)groupaddr; | ||
681 | 436 | leader = (byte)leaderaddr; | ||
682 | 437 | |||
683 | 438 | if (freq == P_120HZ) //set fast path mode if using 120 Hz path | ||
684 | 439 | { | ||
685 | 440 | ServoSetIoCtrl(x, IO1_IN | IO2_IN | FAST_PATH); | ||
686 | 441 | ServoSetIoCtrl(y, IO1_IN | IO2_IN | FAST_PATH); | ||
687 | 442 | if (z) ServoSetIoCtrl(z, IO1_IN | IO2_IN | FAST_PATH); | ||
688 | 443 | } | ||
689 | 444 | else //otherwise, use slow mode | ||
690 | 445 | { | ||
691 | 446 | ServoSetIoCtrl(x, IO1_IN | IO2_IN); | ||
692 | 447 | ServoSetIoCtrl(y, IO1_IN | IO2_IN); | ||
693 | 448 | if (z) ServoSetIoCtrl(z, IO1_IN | IO2_IN); | ||
694 | 449 | } | ||
695 | 450 | |||
696 | 451 | if (fabs(xscale)<1.0 || fabs(yscale)<1.0) return(-2); | ||
697 | 452 | if ( zaxis && (fabs(zscale)<1.0) ) return(-2); | ||
698 | 453 | |||
699 | 454 | UTOCX = xscale; //Units To X counts | ||
700 | 455 | UTOCY = yscale; | ||
701 | 456 | UTOCZ = zscale; | ||
702 | 457 | |||
703 | 458 | //Set the tolerance equivalent to 40 counts of the lowest resolution axis | ||
704 | 459 | tolerance = fabs(40.0/xscale); | ||
705 | 460 | if (tolerance < fabs(40.0/yscale)) tolerance = fabs(40.0/yscale); | ||
706 | 461 | if (zaxis) | ||
707 | 462 | if (tolerance < fabs(40.0/zscale)) tolerance = fabs(40.0/zscale); | ||
708 | 463 | |||
709 | 464 | switch (pathfreq) //calculate acceleration in units per tick^2 | ||
710 | 465 | { | ||
711 | 466 | case P_30HZ: acc = accel/30.0/30.0; | ||
712 | 467 | break; | ||
713 | 468 | case P_60HZ: acc = accel/60.0/60.0; | ||
714 | 469 | break; | ||
715 | 470 | case P_120HZ: acc = accel/120.0/120.0; | ||
716 | 471 | break; | ||
717 | 472 | default: acc = accel/30.0/30.0; | ||
718 | 473 | } | ||
719 | 474 | |||
720 | 475 | //Check that the required status data will be returned with each command: | ||
721 | 476 | statitems = SEND_POS | SEND_NPOINTS | SEND_PERROR | SEND_AUX; | ||
722 | 477 | |||
723 | 478 | if ( ( (NmcGetStatItems(x)& statitems) != statitems ) || | ||
724 | 479 | ( (NmcGetStatItems(y)& statitems) != statitems ) || | ||
725 | 480 | ( (z && (NmcGetStatItems(z)& statitems) != statitems )) ) | ||
726 | 481 | { | ||
727 | 482 | //ErrorMsgBox("Required status items have not been set"); | ||
728 | 483 | return(-1); | ||
729 | 484 | } | ||
730 | 485 | |||
731 | 486 | return(0); | ||
732 | 487 | } | ||
733 | 488 | //--------------------------------------------------------------------------- | ||
734 | 489 | //Initializes the coordinated path after all of the segments have been added. | ||
735 | 490 | //This function should be called just before the application starts calling | ||
736 | 491 | //the function AddPathPoints(). | ||
737 | 492 | //Returns the overall path length for all of the segments. | ||
738 | 493 | //Returns 0.0 on communications error | ||
739 | 494 | extern "C" float InitPath() | ||
740 | 495 | { | ||
741 | 496 | int i; | ||
742 | 497 | |||
743 | 498 | curseg = 0; | ||
744 | 499 | curppoint = 0; | ||
745 | 500 | arclen = 0.0; | ||
746 | 501 | stublen = 0.0; | ||
747 | 502 | pathlen = 0.0; | ||
748 | 503 | vel = 0.0; | ||
749 | 504 | finaldecel = 0; | ||
750 | 505 | at_end = 0; | ||
751 | 506 | |||
752 | 507 | for (i=0; i<seglistsize; i++) pathlen += seglist[i].len; | ||
753 | 508 | |||
754 | 509 | if (seglist[0].type == ARC) GetArcFrame( &(seglist[0]), &cur_arcframe ); | ||
755 | 510 | |||
756 | 511 | //make sure we exit path mode first | ||
757 | 512 | if (!ServoStopMotor(x, ServoGetStopCtrl(x) & (byte)AMP_ENABLE)) return(0.0); | ||
758 | 513 | if (!ServoStopMotor(y, ServoGetStopCtrl(y) & (byte)AMP_ENABLE)) return(0.0); | ||
759 | 514 | if (z) | ||
760 | 515 | if (!ServoStopMotor(z, ServoGetStopCtrl(z) & (byte)AMP_ENABLE)) return(0.0); | ||
761 | 516 | |||
762 | 517 | ServoInitPath(x); //set the beginning of the path to the current position | ||
763 | 518 | ServoInitPath(y); | ||
764 | 519 | if (z) ServoInitPath(z); | ||
765 | 520 | |||
766 | 521 | return(pathlen); | ||
767 | 522 | } | ||
768 | 523 | //--------------------------------------------------------------------------- | ||
769 | 524 | //Gets the next point in the path. | ||
770 | 525 | //returns -1 if already at the end of the path | ||
771 | 526 | //returns 1 if the last point in the path | ||
772 | 527 | //returns 0 otherwise | ||
773 | 528 | int GetNextPathpoint(int *xp, int *yp, int *zp) | ||
774 | 529 | { | ||
775 | 530 | fp p; | ||
776 | 531 | |||
777 | 532 | if (at_end) return(-1); | ||
778 | 533 | |||
779 | 534 | //First check if decelerating to the endpoint | ||
780 | 535 | if (finaldecel || (vel*vel > 2*acc*(pathlen - arclen)) ) | ||
781 | 536 | { | ||
782 | 537 | vel -= acc; | ||
783 | 538 | if (vel<acc) vel = acc; //use acc value as minimum velocity | ||
784 | 539 | finaldecel = 1; | ||
785 | 540 | } | ||
786 | 541 | else if (vel<maxvel) //check for acceleration to current maxvel | ||
787 | 542 | { | ||
788 | 543 | vel+=acc; | ||
789 | 544 | if (vel>maxvel) vel = maxvel; | ||
790 | 545 | } | ||
791 | 546 | else if (vel>maxvel) //check for deceleration to current maxvel | ||
792 | 547 | { | ||
793 | 548 | vel-=acc; | ||
794 | 549 | if (vel<maxvel) vel = maxvel; | ||
795 | 550 | } | ||
796 | 551 | |||
797 | 552 | while (1) //skip over a segment (or more) if necessary | ||
798 | 553 | { | ||
799 | 554 | if ( (stublen + vel) > seglist[curseg].len ) //if past end of segment | ||
800 | 555 | { | ||
801 | 556 | stublen -= seglist[curseg].len; //subtract off the seg length | ||
802 | 557 | curseg++; // & move to next segment | ||
803 | 558 | int cSeg = curseg; | ||
804 | 559 | int sLen = seglistsize; | ||
805 | 560 | if (seglist[curseg].type == ARC) //update arcframe if necessary | ||
806 | 561 | GetArcFrame( &(seglist[curseg]), &cur_arcframe ); | ||
807 | 562 | if (curseg == seglistsize) | ||
808 | 563 | { | ||
809 | 564 | at_end = 1; //check for end of segment list | ||
810 | 565 | break; | ||
811 | 566 | } | ||
812 | 567 | } | ||
813 | 568 | else | ||
814 | 569 | { | ||
815 | 570 | stublen += vel; | ||
816 | 571 | arclen += vel; | ||
817 | 572 | int tempArclen = arclen; | ||
818 | 573 | int tempPathlen = pathlen; | ||
819 | 574 | if (arclen > pathlen) at_end = 1; | ||
820 | 575 | break; | ||
821 | 576 | } | ||
822 | 577 | } | ||
823 | 578 | |||
824 | 579 | if (at_end) //return the final endpoint | ||
825 | 580 | { | ||
826 | 581 | *xp = (int)( (seglist[seglistsize-1].p2[0] + xoff) * UTOCX ); | ||
827 | 582 | *yp = (int)( (seglist[seglistsize-1].p2[1] + yoff) * UTOCY ); | ||
828 | 583 | *zp = (int)( (seglist[seglistsize-1].p2[2] + zoff) * UTOCZ ); | ||
829 | 584 | } | ||
830 | 585 | else //find the point within the current segment | ||
831 | 586 | { | ||
832 | 587 | if (seglist[curseg].type == LINE) | ||
833 | 588 | { | ||
834 | 589 | GetLineSegPoint( &(seglist[curseg]), stublen, p ); | ||
835 | 590 | } | ||
836 | 591 | else if (seglist[curseg].type == ARC) | ||
837 | 592 | { | ||
838 | 593 | p[0] = seglist[curseg].r * cos(stublen/seglist[curseg].r); | ||
839 | 594 | p[1] = seglist[curseg].r * sin(stublen/seglist[curseg].r); | ||
840 | 595 | p[2] = 0; | ||
841 | 596 | fvmult(&cur_arcframe, p, p); | ||
842 | 597 | } | ||
843 | 598 | *xp = (int)( (p[0] + xoff) * UTOCX ); | ||
844 | 599 | *yp = (int)( (p[1] + yoff) * UTOCY ); | ||
845 | 600 | *zp = (int)( (p[2] + zoff) * UTOCZ ); | ||
846 | 601 | } | ||
847 | 602 | |||
848 | 603 | return(at_end); | ||
849 | 604 | } | ||
850 | 605 | //--------------------------------------------------------------------------- | ||
851 | 606 | //Adds points to path buffer - should be called at regular intervals which | ||
852 | 607 | //are shorter than the buffer time (bufsize/pathfreq). | ||
853 | 608 | // | ||
854 | 609 | //Returns: -1 if path download is done | ||
855 | 610 | // curseg if in middle of the path | ||
856 | 611 | // -2 if communication error | ||
857 | 612 | extern "C" int AddPathPoints() | ||
858 | 613 | { | ||
859 | 614 | int xp[7], yp[7], zp[7]; //set of up to 7 pathpoints | ||
860 | 615 | int pcount; | ||
861 | 616 | |||
862 | 617 | //VEL = MAXVEL = 0.0 defines a feedhold condition | ||
863 | 618 | //Setting MAXVEL to a non-zero value will resume path execution | ||
864 | 619 | if (maxvel==0.0 && vel == 0.0) return(curseg); | ||
865 | 620 | |||
866 | 621 | while (!at_end) //GetNextPathpoint() sets the global at_end | ||
867 | 622 | { | ||
868 | 623 | if (!NmcNoOp(x)) return(-2); //read num points from X | ||
869 | 624 | |||
870 | 625 | //punt when PIC-SERVO buffer is full | ||
871 | 626 | if ((ServoGetNPoints(x)>bufsize) || (ServoGetNPoints(x)>87)) | ||
872 | 627 | { | ||
873 | 628 | if (!NmcNoOp(y)) return(-2); //make sure data is updated even if points are not added | ||
874 | 629 | if (!NmcNoOp(z)) return(-2); | ||
875 | 630 | break; | ||
876 | 631 | } | ||
877 | 632 | |||
878 | 633 | for (pcount=0; pcount<7; pcount++) //get upto 7 new points | ||
879 | 634 | if ( GetNextPathpoint( xp+pcount, yp+pcount, zp+pcount ) ) break; | ||
880 | 635 | |||
881 | 636 | if (pcount<7) pcount++; | ||
882 | 637 | |||
883 | 638 | if (!ServoAddPathpoints(x, pcount, xp, pathfreq)) return(-2); | ||
884 | 639 | if (!ServoAddPathpoints(y, pcount, yp, pathfreq)) return(-2); | ||
885 | 640 | if (z) | ||
886 | 641 | if (!ServoAddPathpoints(z, pcount, zp, pathfreq)) return(-2); | ||
887 | 642 | } | ||
888 | 643 | |||
889 | 644 | if ( !(ServoGetAux(x) & PATH_MODE) ) //start path mode when buffer full | ||
890 | 645 | if (!ServoStartPathMode(group, leader)) return(-2); | ||
891 | 646 | |||
892 | 647 | if (at_end) return(-1); | ||
893 | 648 | return(curseg); | ||
894 | 649 | } | ||
895 | 650 | //--------------------------------------------------------------------------- | ||
896 | 0 | 651 | ||
897 | === added file 'software/Common/JrKerr/old_path/path.h' | |||
898 | --- software/Common/JrKerr/old_path/path.h 1970-01-01 00:00:00 +0000 | |||
899 | +++ software/Common/JrKerr/old_path/path.h 2010-08-07 00:08:43 +0000 | |||
900 | @@ -0,0 +1,83 @@ | |||
901 | 1 | //--------------------------------------------------------------------------- | ||
902 | 2 | #ifndef pathH | ||
903 | 3 | #define pathH | ||
904 | 4 | //--------------------------------------------------------------------------- | ||
905 | 5 | //Defines: | ||
906 | 6 | |||
907 | 7 | //Segment types: | ||
908 | 8 | #define LINE 0 | ||
909 | 9 | #define ARC 1 | ||
910 | 10 | |||
911 | 11 | #define MAXSEG 1000 //Maximum number of segments | ||
912 | 12 | #define PI 3.14159 | ||
913 | 13 | #define TWOPI 6.28319 | ||
914 | 14 | #define DTOR 0.017453 | ||
915 | 15 | |||
916 | 16 | //Valuse for tangent tolerance | ||
917 | 17 | #define TAN_1DEGREE 0.99985 | ||
918 | 18 | #define TAN_3DEGREE 0.99863 | ||
919 | 19 | #define TAN_5DEGREE 0.99619 | ||
920 | 20 | #define TAN_10DEGREE 0.98481 | ||
921 | 21 | #define TAN_20DEGREE 0.93969 | ||
922 | 22 | #define TAN_45DEGREE 0.70711 | ||
923 | 23 | |||
924 | 24 | #define ONLINE 1 | ||
925 | 25 | //--------------------------------------------------------------------------- | ||
926 | 26 | //Data types: | ||
927 | 27 | |||
928 | 28 | typedef float fp[3]; //floating point 3x1 vector | ||
929 | 29 | |||
930 | 30 | typedef int ip[3]; //integer 3x1 vector | ||
931 | 31 | |||
932 | 32 | typedef struct { //data type for line segments or arc segments | ||
933 | 33 | int type; //LINE or ARC | ||
934 | 34 | fp p1; //Starting point | ||
935 | 35 | fp p2; //Ending point | ||
936 | 36 | fp c; //Center point (arcs only) | ||
937 | 37 | fp norm; //Normal vector (arcs only) | ||
938 | 38 | float len; //Segment length | ||
939 | 39 | float r; //Radius (arcs only) | ||
940 | 40 | } segment; | ||
941 | 41 | |||
942 | 42 | typedef struct { //data type for a coordinate frame | ||
943 | 43 | fp x; | ||
944 | 44 | fp y; | ||
945 | 45 | fp z; | ||
946 | 46 | fp p; | ||
947 | 47 | } frame; | ||
948 | 48 | |||
949 | 49 | //--------------------------------------------------------------------------- | ||
950 | 50 | //Function prototypes: | ||
951 | 51 | float mag(fp p); | ||
952 | 52 | float dot(fp x, fp y); | ||
953 | 53 | void cross(fp x, fp y, fp z); | ||
954 | 54 | float normalize(fp x, fp y); | ||
955 | 55 | void fvmult(frame *F, fp x, fp y); | ||
956 | 56 | void finvert(frame A, frame *B); | ||
957 | 57 | int GetTanVect(segment *s, fp p, int endpoint); | ||
958 | 58 | void GetArcFrame(segment *seg, frame *F); | ||
959 | 59 | void GetLineSegPoint(segment *seg, float s, fp p); | ||
960 | 60 | int GetNextPathpoint(int *xp, int *yp, int *zp); | ||
961 | 61 | |||
962 | 62 | //Path mode API functions: | ||
963 | 63 | extern "C" void SetTangentTolerance(float theta); | ||
964 | 64 | extern "C" void ClearSegList(float x, float y, float z); | ||
965 | 65 | extern "C" int AddLineSeg(float x, float y, float z); | ||
966 | 66 | extern "C" int AddArcSeg( float x, float y, float z, //end point | ||
967 | 67 | float cx, float cy, float cz, //center point | ||
968 | 68 | float nx, float ny, float nz ); //normal | ||
969 | 69 | extern "C" void SetFeedrate(float fr); | ||
970 | 70 | extern "C" void SetOrigin(float xoffset, float yoffset, float zoffset); | ||
971 | 71 | extern "C" int SetPathParams(int freq, int nbuf, | ||
972 | 72 | int xaxis, int yaxis, int zaxis, int groupaddr, int leaderaddr, | ||
973 | 73 | float xscale, float yscale, float zscale, | ||
974 | 74 | float accel ); | ||
975 | 75 | extern "C" int SetPathParams2(int freq, int nbuf, | ||
976 | 76 | int xaxis, int yaxis, int zaxis, int groupaddr, int leaderaddr, | ||
977 | 77 | float xscale, float yscale, float zscale, | ||
978 | 78 | float accel ); | ||
979 | 79 | extern "C" float InitPath(); | ||
980 | 80 | extern "C" int AddPathPoints(); | ||
981 | 81 | |||
982 | 82 | //--------------------------------------------------------------------------- | ||
983 | 83 | #endif | ||
984 | 0 | 84 | ||
985 | === modified file 'software/Common/JrKerr/path.cpp' | |||
986 | --- software/Common/JrKerr/path.cpp 2010-07-23 20:12:14 +0000 | |||
987 | +++ software/Common/JrKerr/path.cpp 2010-08-07 00:08:43 +0000 | |||
988 | @@ -5,7 +5,7 @@ | |||
989 | 5 | #include "path.h" | 5 | #include "path.h" |
990 | 6 | #include "nmccom.h" | 6 | #include "nmccom.h" |
991 | 7 | #include "picservo.h" | 7 | #include "picservo.h" |
993 | 8 | #include <QDebug> | 8 | #include "qdebug.h" |
994 | 9 | //--------------------------------------------------------------------------- | 9 | //--------------------------------------------------------------------------- |
995 | 10 | //Globals: | 10 | //Globals: |
996 | 11 | int pathsize; //local path size | 11 | int pathsize; //local path size |
997 | @@ -220,7 +220,6 @@ | |||
998 | 220 | if (dot(pn,qn) < tan_tolerance) return(-1); | 220 | if (dot(pn,qn) < tan_tolerance) return(-1); |
999 | 221 | 221 | ||
1000 | 222 | seglistsize++; | 222 | seglistsize++; |
1001 | 223 | qDebug() << "seglistsize = " << seglistsize - 1; | ||
1002 | 224 | return(seglistsize - 1); | 223 | return(seglistsize - 1); |
1003 | 225 | } | 224 | } |
1004 | 226 | //--------------------------------------------------------------------------- | 225 | //--------------------------------------------------------------------------- |
1005 | @@ -408,7 +407,7 @@ | |||
1006 | 408 | ( (NmcGetStatItems(y)& statitems) != statitems ) || | 407 | ( (NmcGetStatItems(y)& statitems) != statitems ) || |
1007 | 409 | ( (z && (NmcGetStatItems(z)& statitems) != statitems )) ) | 408 | ( (z && (NmcGetStatItems(z)& statitems) != statitems )) ) |
1008 | 410 | { | 409 | { |
1010 | 411 | //ErrorMsgBox("Required status items have not been set"); | 410 | qDebug() << "Required status items have not been set"; |
1011 | 412 | return(-1); | 411 | return(-1); |
1012 | 413 | } | 412 | } |
1013 | 414 | 413 | ||
1014 | @@ -479,7 +478,7 @@ | |||
1015 | 479 | ( (NmcGetStatItems(y)& statitems) != statitems ) || | 478 | ( (NmcGetStatItems(y)& statitems) != statitems ) || |
1016 | 480 | ( (z && (NmcGetStatItems(z)& statitems) != statitems )) ) | 479 | ( (z && (NmcGetStatItems(z)& statitems) != statitems )) ) |
1017 | 481 | { | 480 | { |
1019 | 482 | //ErrorMsgBox("Required status items have not been set"); | 481 | qDebug() << "Required status items have not been set"; |
1020 | 483 | return(-1); | 482 | return(-1); |
1021 | 484 | } | 483 | } |
1022 | 485 | 484 | ||
1023 | @@ -525,7 +524,7 @@ | |||
1024 | 525 | //returns -1 if already at the end of the path | 524 | //returns -1 if already at the end of the path |
1025 | 526 | //returns 1 if the last point in the path | 525 | //returns 1 if the last point in the path |
1026 | 527 | //returns 0 otherwise | 526 | //returns 0 otherwise |
1028 | 528 | int GetNextPathpoint(long int *xp, long int *yp, long int *zp) | 527 | int GetNextPathpoint(int *xp, int *yp, int *zp) |
1029 | 529 | { | 528 | { |
1030 | 530 | fp p; | 529 | fp p; |
1031 | 531 | 530 | ||
1032 | @@ -574,9 +573,9 @@ | |||
1033 | 574 | 573 | ||
1034 | 575 | if (at_end) //return the final endpoint | 574 | if (at_end) //return the final endpoint |
1035 | 576 | { | 575 | { |
1039 | 577 | *xp = (long int)( (seglist[seglistsize-1].p2[0] + xoff) * UTOCX ); | 576 | *xp = (int)( (seglist[seglistsize-1].p2[0] + xoff) * UTOCX ); |
1040 | 578 | *yp = (long int)( (seglist[seglistsize-1].p2[1] + yoff) * UTOCY ); | 577 | *yp = (int)( (seglist[seglistsize-1].p2[1] + yoff) * UTOCY ); |
1041 | 579 | *zp = (long int)( (seglist[seglistsize-1].p2[2] + zoff) * UTOCZ ); | 578 | *zp = (int)( (seglist[seglistsize-1].p2[2] + zoff) * UTOCZ ); |
1042 | 580 | } | 579 | } |
1043 | 581 | else //find the point within the current segment | 580 | else //find the point within the current segment |
1044 | 582 | { | 581 | { |
1045 | @@ -591,9 +590,9 @@ | |||
1046 | 591 | p[2] = 0; | 590 | p[2] = 0; |
1047 | 592 | fvmult(&cur_arcframe, p, p); | 591 | fvmult(&cur_arcframe, p, p); |
1048 | 593 | } | 592 | } |
1052 | 594 | *xp = (long int)( (p[0] + xoff) * UTOCX ); | 593 | *xp = (int)( (p[0] + xoff) * UTOCX ); |
1053 | 595 | *yp = (long int)( (p[1] + yoff) * UTOCY ); | 594 | *yp = (int)( (p[1] + yoff) * UTOCY ); |
1054 | 596 | *zp = (long int)( (p[2] + zoff) * UTOCZ ); | 595 | *zp = (int)( (p[2] + zoff) * UTOCZ ); |
1055 | 597 | } | 596 | } |
1056 | 598 | 597 | ||
1057 | 599 | return(at_end); | 598 | return(at_end); |
1058 | @@ -607,7 +606,7 @@ | |||
1059 | 607 | // -2 if communication error | 606 | // -2 if communication error |
1060 | 608 | extern "C" int AddPathPoints() | 607 | extern "C" int AddPathPoints() |
1061 | 609 | { | 608 | { |
1063 | 610 | long int xp[7], yp[7], zp[7]; //set of up to 7 pathpoints | 609 | int xp[7], yp[7], zp[7]; //set of up to 7 pathpoints |
1064 | 611 | int pcount; | 610 | int pcount; |
1065 | 612 | 611 | ||
1066 | 613 | //VEL = MAXVEL = 0.0 defines a feedhold condition | 612 | //VEL = MAXVEL = 0.0 defines a feedhold condition |
1067 | 614 | 613 | ||
1068 | === modified file 'software/Common/JrKerr/path.h' | |||
1069 | --- software/Common/JrKerr/path.h 2010-07-13 18:44:38 +0000 | |||
1070 | +++ software/Common/JrKerr/path.h 2010-08-07 00:08:43 +0000 | |||
1071 | @@ -27,7 +27,7 @@ | |||
1072 | 27 | 27 | ||
1073 | 28 | typedef float fp[3]; //floating point 3x1 vector | 28 | typedef float fp[3]; //floating point 3x1 vector |
1074 | 29 | 29 | ||
1076 | 30 | typedef long int ip[3]; //integer 3x1 vector | 30 | typedef int ip[3]; //integer 3x1 vector |
1077 | 31 | 31 | ||
1078 | 32 | typedef struct { //data type for line segments or arc segments | 32 | typedef struct { //data type for line segments or arc segments |
1079 | 33 | int type; //LINE or ARC | 33 | int type; //LINE or ARC |
1080 | @@ -57,25 +57,25 @@ | |||
1081 | 57 | int GetTanVect(segment *s, fp p, int endpoint); | 57 | int GetTanVect(segment *s, fp p, int endpoint); |
1082 | 58 | void GetArcFrame(segment *seg, frame *F); | 58 | void GetArcFrame(segment *seg, frame *F); |
1083 | 59 | void GetLineSegPoint(segment *seg, float s, fp p); | 59 | void GetLineSegPoint(segment *seg, float s, fp p); |
1085 | 60 | int GetNextPathpoint(long int *xp, long int *yp, long int *zp); | 60 | int GetNextPathpoint(int *xp, int *yp, int *zp); |
1086 | 61 | 61 | ||
1087 | 62 | //Path mode API functions: | 62 | //Path mode API functions: |
1088 | 63 | extern "C" void SetTangentTolerance(float theta); | 63 | extern "C" void SetTangentTolerance(float theta); |
1089 | 64 | extern "C" void ClearSegList(float x, float y, float z); | 64 | extern "C" void ClearSegList(float x, float y, float z); |
1090 | 65 | extern "C" int AddLineSeg(float x, float y, float z); | 65 | extern "C" int AddLineSeg(float x, float y, float z); |
1091 | 66 | extern "C" int AddArcSeg( float x, float y, float z, //end point | 66 | extern "C" int AddArcSeg( float x, float y, float z, //end point |
1094 | 67 | float cx, float cy, float cz, //center point | 67 | float cx, float cy, float cz, //center point |
1095 | 68 | float nx, float ny, float nz ); //normal | 68 | float nx, float ny, float nz ); //normal |
1096 | 69 | extern "C" void SetFeedrate(float fr); | 69 | extern "C" void SetFeedrate(float fr); |
1097 | 70 | extern "C" void SetOrigin(float xoffset, float yoffset, float zoffset); | 70 | extern "C" void SetOrigin(float xoffset, float yoffset, float zoffset); |
1098 | 71 | extern "C" int SetPathParams(int freq, int nbuf, | 71 | extern "C" int SetPathParams(int freq, int nbuf, |
1102 | 72 | int xaxis, int yaxis, int zaxis, int groupaddr, int leaderaddr, | 72 | int xaxis, int yaxis, int zaxis, int groupaddr, int leaderaddr, |
1103 | 73 | float xscale, float yscale, float zscale, | 73 | float xscale, float yscale, float zscale, |
1104 | 74 | float accel ); | 74 | float accel ); |
1105 | 75 | extern "C" int SetPathParams2(int freq, int nbuf, | 75 | extern "C" int SetPathParams2(int freq, int nbuf, |
1109 | 76 | int xaxis, int yaxis, int zaxis, int groupaddr, int leaderaddr, | 76 | int xaxis, int yaxis, int zaxis, int groupaddr, int leaderaddr, |
1110 | 77 | float xscale, float yscale, float zscale, | 77 | float xscale, float yscale, float zscale, |
1111 | 78 | float accel ); | 78 | float accel ); |
1112 | 79 | extern "C" float InitPath(); | 79 | extern "C" float InitPath(); |
1113 | 80 | extern "C" int AddPathPoints(); | 80 | extern "C" int AddPathPoints(); |
1114 | 81 | 81 | ||
1115 | 82 | 82 | ||
1116 | === modified file 'software/Common/JrKerr/picservo.cpp' | |||
1117 | --- software/Common/JrKerr/picservo.cpp 2010-07-23 20:12:14 +0000 | |||
1118 | +++ software/Common/JrKerr/picservo.cpp 2010-08-07 00:08:43 +0000 | |||
1119 | @@ -5,6 +5,7 @@ | |||
1120 | 5 | #include "qextserialport.h" | 5 | #include "qextserialport.h" |
1121 | 6 | #include <stdio.h> | 6 | #include <stdio.h> |
1122 | 7 | #include <unistd.h> | 7 | #include <unistd.h> |
1123 | 8 | #include <QDebug> | ||
1124 | 8 | 9 | ||
1125 | 9 | //--------------------------------------------------------------------------- | 10 | //--------------------------------------------------------------------------- |
1126 | 10 | extern NMCMOD mod[]; //Array of modules | 11 | extern NMCMOD mod[]; //Array of modules |
1127 | @@ -37,9 +38,10 @@ | |||
1128 | 37 | (p->gain).el = 0; | 38 | (p->gain).el = 0; |
1129 | 38 | (p->gain).sr = 1; | 39 | (p->gain).sr = 1; |
1130 | 39 | (p->gain).dc = 0; | 40 | (p->gain).dc = 0; |
1131 | 41 | (p->gain).sm = 1; | ||
1132 | 40 | 42 | ||
1133 | 41 | p->stoppos = 0; | 43 | p->stoppos = 0; |
1135 | 42 | p->ioctrl = IO1_IN | IO2_IN; | 44 | p->ioctrl = 0; |
1136 | 43 | p->homectrl = 0; | 45 | p->homectrl = 0; |
1137 | 44 | p->movectrl = 0; | 46 | p->movectrl = 0; |
1138 | 45 | p->stopctrl = 0; | 47 | p->stopctrl = 0; |
1139 | @@ -72,18 +74,19 @@ | |||
1140 | 72 | if ( (mod[addr].statusitems) & SEND_PERROR ) numbytes +=2; | 74 | if ( (mod[addr].statusitems) & SEND_PERROR ) numbytes +=2; |
1141 | 73 | if ( (mod[addr].statusitems) & SEND_NPOINTS ) numbytes +=1; | 75 | if ( (mod[addr].statusitems) & SEND_NPOINTS ) numbytes +=1; |
1142 | 74 | QextSerialPort* ComPort = getComPort(); | 76 | QextSerialPort* ComPort = getComPort(); |
1144 | 75 | //usleep(50000); | 77 | //usleep(100000); |
1145 | 76 | for (i = 0, numrcvd = 0; i < numbytes; i++) | 78 | for (i = 0, numrcvd = 0; i < numbytes; i++) |
1146 | 77 | { | 79 | { |
1148 | 78 | if (ComPort->read(&(char)inbuf[i], 1)) numrcvd++; | 80 | byte* temp = &inbuf[i]; |
1149 | 81 | if (ComPort->read((char *) temp, 1)) numrcvd++; | ||
1150 | 79 | } | 82 | } |
1151 | 80 | 83 | ||
1152 | 81 | 84 | ||
1153 | 82 | //Verify enough data was read | 85 | //Verify enough data was read |
1154 | 83 | if (numrcvd != numbytes) | 86 | if (numrcvd != numbytes) |
1155 | 84 | { | 87 | { |
1158 | 85 | printf("ServoGetStat (%d) failed to read chars\n",addr); | 88 | qDebug() << "ServoGetStat " << addr << " failed to read chars"; |
1159 | 86 | printf("Read %d bytes out of %d bytes\n", numrcvd, numbytes); | 89 | qDebug() << "Read " << numrcvd << " bytes out of " << numbytes << " bytes."; |
1160 | 87 | return false; | 90 | return false; |
1161 | 88 | } | 91 | } |
1162 | 89 | 92 | ||
1163 | @@ -92,7 +95,7 @@ | |||
1164 | 92 | for (i=0; i<numbytes-1; i++) cksum = (byte)(cksum + inbuf[i]); | 95 | for (i=0; i<numbytes-1; i++) cksum = (byte)(cksum + inbuf[i]); |
1165 | 93 | if (cksum != inbuf[numbytes-1]) | 96 | if (cksum != inbuf[numbytes-1]) |
1166 | 94 | { | 97 | { |
1168 | 95 | printf("ServoGetStat(%d): checksum error\n",addr); | 98 | qDebug() << "ServoGetStat" << addr << ": checksum error"; |
1169 | 96 | return false; | 99 | return false; |
1170 | 97 | } | 100 | } |
1171 | 98 | 101 | ||
1172 | @@ -100,7 +103,7 @@ | |||
1173 | 100 | mod[addr].stat = inbuf[0]; | 103 | mod[addr].stat = inbuf[0]; |
1174 | 101 | if (mod[addr].stat & CKSUM_ERROR) | 104 | if (mod[addr].stat & CKSUM_ERROR) |
1175 | 102 | { | 105 | { |
1177 | 103 | printf("Command checksum error!\n"); | 106 | qDebug() << "Command checksum error!"; |
1178 | 104 | return false; | 107 | return false; |
1179 | 105 | } | 108 | } |
1180 | 106 | 109 | ||
1181 | @@ -108,7 +111,7 @@ | |||
1182 | 108 | bytecount = 1; | 111 | bytecount = 1; |
1183 | 109 | if ( (mod[addr].statusitems) & SEND_POS ) | 112 | if ( (mod[addr].statusitems) & SEND_POS ) |
1184 | 110 | { | 113 | { |
1186 | 111 | p->pos = *( (long *)(inbuf + bytecount) ); | 114 | p->pos = *( (int *)(inbuf + bytecount) ); |
1187 | 112 | bytecount +=4; | 115 | bytecount +=4; |
1188 | 113 | } | 116 | } |
1189 | 114 | if ( (mod[addr].statusitems) & SEND_AD ) | 117 | if ( (mod[addr].statusitems) & SEND_AD ) |
1190 | @@ -128,7 +131,7 @@ | |||
1191 | 128 | } | 131 | } |
1192 | 129 | if ( (mod[addr].statusitems) & SEND_HOME ) | 132 | if ( (mod[addr].statusitems) & SEND_HOME ) |
1193 | 130 | { | 133 | { |
1195 | 131 | p->home = *( (unsigned long *)(inbuf + bytecount) ); | 134 | p->home = *( (unsigned int *)(inbuf + bytecount) ); |
1196 | 132 | bytecount +=4; | 135 | bytecount +=4; |
1197 | 133 | } | 136 | } |
1198 | 134 | if ( (mod[addr].statusitems) & SEND_ID ) | 137 | if ( (mod[addr].statusitems) & SEND_ID ) |
1199 | @@ -144,6 +147,7 @@ | |||
1200 | 144 | } | 147 | } |
1201 | 145 | if ( (mod[addr].statusitems) & SEND_NPOINTS ) | 148 | if ( (mod[addr].statusitems) & SEND_NPOINTS ) |
1202 | 146 | { | 149 | { |
1203 | 150 | byte temp = inbuf[bytecount]; | ||
1204 | 147 | p->npoints = inbuf[bytecount]; | 151 | p->npoints = inbuf[bytecount]; |
1205 | 148 | //bytecount +=1; | 152 | //bytecount +=1; |
1206 | 149 | } | 153 | } |
1207 | @@ -151,7 +155,7 @@ | |||
1208 | 151 | return(true); | 155 | return(true); |
1209 | 152 | } | 156 | } |
1210 | 153 | //--------------------------------------------------------------------------- | 157 | //--------------------------------------------------------------------------- |
1212 | 154 | extern "C" long ServoGetPos(byte addr) | 158 | extern "C" int ServoGetPos(byte addr) |
1213 | 155 | { | 159 | { |
1214 | 156 | SERVOMOD * p; | 160 | SERVOMOD * p; |
1215 | 157 | 161 | ||
1216 | @@ -183,7 +187,7 @@ | |||
1217 | 183 | return p->aux; | 187 | return p->aux; |
1218 | 184 | } | 188 | } |
1219 | 185 | //--------------------------------------------------------------------------- | 189 | //--------------------------------------------------------------------------- |
1221 | 186 | extern "C" long ServoGetHome(byte addr) | 190 | extern "C" int ServoGetHome(byte addr) |
1222 | 187 | { | 191 | { |
1223 | 188 | SERVOMOD * p; | 192 | SERVOMOD * p; |
1224 | 189 | 193 | ||
1225 | @@ -207,7 +211,7 @@ | |||
1226 | 207 | return p->npoints; | 211 | return p->npoints; |
1227 | 208 | } | 212 | } |
1228 | 209 | //--------------------------------------------------------------------------- | 213 | //--------------------------------------------------------------------------- |
1230 | 210 | extern "C" long ServoGetCmdPos(byte addr) | 214 | extern "C" int ServoGetCmdPos(byte addr) |
1231 | 211 | { | 215 | { |
1232 | 212 | SERVOMOD * p; | 216 | SERVOMOD * p; |
1233 | 213 | 217 | ||
1234 | @@ -215,7 +219,7 @@ | |||
1235 | 215 | return p->cmdpos; | 219 | return p->cmdpos; |
1236 | 216 | } | 220 | } |
1237 | 217 | //--------------------------------------------------------------------------- | 221 | //--------------------------------------------------------------------------- |
1239 | 218 | extern "C" long ServoGetCmdVel(byte addr) | 222 | extern "C" int ServoGetCmdVel(byte addr) |
1240 | 219 | { | 223 | { |
1241 | 220 | SERVOMOD * p; | 224 | SERVOMOD * p; |
1242 | 221 | 225 | ||
1243 | @@ -223,7 +227,7 @@ | |||
1244 | 223 | return p->cmdvel; | 227 | return p->cmdvel; |
1245 | 224 | } | 228 | } |
1246 | 225 | //--------------------------------------------------------------------------- | 229 | //--------------------------------------------------------------------------- |
1248 | 226 | extern "C" long ServoGetCmdAcc(byte addr) | 230 | extern "C" int ServoGetCmdAcc(byte addr) |
1249 | 227 | { | 231 | { |
1250 | 228 | SERVOMOD * p; | 232 | SERVOMOD * p; |
1251 | 229 | 233 | ||
1252 | @@ -231,7 +235,7 @@ | |||
1253 | 231 | return p->cmdacc; | 235 | return p->cmdacc; |
1254 | 232 | } | 236 | } |
1255 | 233 | //--------------------------------------------------------------------------- | 237 | //--------------------------------------------------------------------------- |
1257 | 234 | extern "C" long ServoGetStopPos(byte addr) | 238 | extern "C" int ServoGetStopPos(byte addr) |
1258 | 235 | { | 239 | { |
1259 | 236 | SERVOMOD * p; | 240 | SERVOMOD * p; |
1260 | 237 | 241 | ||
1261 | @@ -343,6 +347,9 @@ | |||
1262 | 343 | *( (byte *)(cmdstr+13) ) = dc; | 347 | *( (byte *)(cmdstr+13) ) = dc; |
1263 | 344 | 348 | ||
1264 | 345 | 349 | ||
1265 | 350 | usleep(51000); | ||
1266 | 351 | |||
1267 | 352 | |||
1268 | 346 | return NmcSendCmd(addr, SET_GAIN, cmdstr, 14, addr); | 353 | return NmcSendCmd(addr, SET_GAIN, cmdstr, 14, addr); |
1269 | 347 | } | 354 | } |
1270 | 348 | //---------------------------------------------------------------------------// | 355 | //---------------------------------------------------------------------------// |
1271 | @@ -434,7 +441,7 @@ | |||
1272 | 434 | return NmcSendCmd(addr, SET_GAIN, cmdstr, 15, addr); | 441 | return NmcSendCmd(addr, SET_GAIN, cmdstr, 15, addr); |
1273 | 435 | } | 442 | } |
1274 | 436 | //--------------------------------------------------------------------------- | 443 | //--------------------------------------------------------------------------- |
1276 | 437 | extern "C" BOOL ServoLoadTraj(byte addr, byte mode, long pos, long vel, long acc, byte pwm) | 444 | extern "C" BOOL ServoLoadTraj(byte addr, byte mode, int pos, int vel, int acc, byte pwm) |
1277 | 438 | { | 445 | { |
1278 | 439 | SERVOMOD * p; | 446 | SERVOMOD * p; |
1279 | 440 | char cmdstr[16]; | 447 | char cmdstr[16]; |
1280 | @@ -449,9 +456,9 @@ | |||
1281 | 449 | 456 | ||
1282 | 450 | count = 0; | 457 | count = 0; |
1283 | 451 | *( (byte *)(cmdstr + count) ) = mode; count += 1; | 458 | *( (byte *)(cmdstr + count) ) = mode; count += 1; |
1287 | 452 | if (mode & LOAD_POS) { *( (long *)(cmdstr + count) ) = pos; count += 4; } | 459 | if (mode & LOAD_POS) { *( (int *)(cmdstr + count) ) = pos; count += 4; } |
1288 | 453 | if (mode & LOAD_VEL) { *( (long *)(cmdstr + count) ) = vel; count += 4; } | 460 | if (mode & LOAD_VEL) { *( (int *)(cmdstr + count) ) = vel; count += 4; } |
1289 | 454 | if (mode & LOAD_ACC) { *( (long *)(cmdstr + count) ) = acc; count += 4; } | 461 | if (mode & LOAD_ACC) { *( (int *)(cmdstr + count) ) = acc; count += 4; } |
1290 | 455 | if (mode & LOAD_PWM) { *( (byte *)(cmdstr + count) ) = pwm; count += 1; } | 462 | if (mode & LOAD_PWM) { *( (byte *)(cmdstr + count) ) = pwm; count += 1; } |
1291 | 456 | 463 | ||
1292 | 457 | return NmcSendCmd(addr, LOAD_TRAJ, cmdstr, (byte)count, addr); | 464 | return NmcSendCmd(addr, LOAD_TRAJ, cmdstr, (byte)count, addr); |
1293 | @@ -467,14 +474,17 @@ | |||
1294 | 467 | p->last_ppoint = p->pos + p->perror; | 474 | p->last_ppoint = p->pos + p->perror; |
1295 | 468 | } | 475 | } |
1296 | 469 | //--------------------------------------------------------------------------- | 476 | //--------------------------------------------------------------------------- |
1298 | 470 | extern "C" BOOL ServoAddPathpoints(byte addr, int npoints, long *path, int freq) | 477 | extern "C" BOOL ServoAddPathpoints(byte addr, int npoints, int *path, int freq) |
1299 | 471 | { | 478 | { |
1300 | 472 | SERVOMOD * p; | 479 | SERVOMOD * p; |
1301 | 473 | char cmdstr[16]; | 480 | char cmdstr[16]; |
1303 | 474 | long diff; | 481 | int diff; |
1304 | 475 | int rev; | 482 | int rev; |
1305 | 476 | int i; | 483 | int i; |
1306 | 477 | 484 | ||
1307 | 485 | //npoints must be greater than 0 | ||
1308 | 486 | if (npoints <= 0) return 0; | ||
1309 | 487 | |||
1310 | 478 | p = (SERVOMOD *)(mod[addr].p); | 488 | p = (SERVOMOD *)(mod[addr].p); |
1311 | 479 | 489 | ||
1312 | 480 | for (i=0; i<npoints; i++) | 490 | for (i=0; i<npoints; i++) |
1313 | @@ -559,12 +569,12 @@ | |||
1314 | 559 | // pos: position (-2,147,483,648 - +2,147,483,647) // | 569 | // pos: position (-2,147,483,648 - +2,147,483,647) // |
1315 | 560 | // Description: Sets the module position to the specified value. // | 570 | // Description: Sets the module position to the specified value. // |
1316 | 561 | //---------------------------------------------------------------------------// | 571 | //---------------------------------------------------------------------------// |
1318 | 562 | extern "C" BOOL ServoSetPos(byte addr, long pos) | 572 | extern "C" BOOL ServoSetPos(byte addr, int pos) |
1319 | 563 | { | 573 | { |
1320 | 564 | char cmdstr[6]; | 574 | char cmdstr[6]; |
1321 | 565 | 575 | ||
1322 | 566 | cmdstr[0] = SET_POS; //mode byte for reset pos | 576 | cmdstr[0] = SET_POS; //mode byte for reset pos |
1324 | 567 | *( (long *)(cmdstr + 1) ) = pos; | 577 | *( (int *)(cmdstr + 1) ) = pos; |
1325 | 568 | 578 | ||
1326 | 569 | return NmcSendCmd(addr, RESET_POS, cmdstr, 5, addr); | 579 | return NmcSendCmd(addr, RESET_POS, cmdstr, 5, addr); |
1327 | 570 | } | 580 | } |
1328 | @@ -593,7 +603,7 @@ | |||
1329 | 593 | // pos: unprofiled command position // | 603 | // pos: unprofiled command position // |
1330 | 594 | // Description: Stop the motor at the specified position. // | 604 | // Description: Stop the motor at the specified position. // |
1331 | 595 | //---------------------------------------------------------------------------// | 605 | //---------------------------------------------------------------------------// |
1333 | 596 | extern "C" BOOL ServoStopHere(byte addr, byte mode, long pos) | 606 | extern "C" BOOL ServoStopHere(byte addr, byte mode, int pos) |
1334 | 597 | { | 607 | { |
1335 | 598 | SERVOMOD * p; | 608 | SERVOMOD * p; |
1336 | 599 | char cmdstr[6]; | 609 | char cmdstr[6]; |
1337 | @@ -603,7 +613,7 @@ | |||
1338 | 603 | p->stopctrl = mode; | 613 | p->stopctrl = mode; |
1339 | 604 | 614 | ||
1340 | 605 | cmdstr[0] = mode; | 615 | cmdstr[0] = mode; |
1342 | 606 | *( (long *)(cmdstr + 1) ) = pos; | 616 | *( (int *)(cmdstr + 1) ) = pos; |
1343 | 607 | 617 | ||
1344 | 608 | return NmcSendCmd(addr, STOP_MOTOR, cmdstr, 5, addr); | 618 | return NmcSendCmd(addr, STOP_MOTOR, cmdstr, 5, addr); |
1345 | 609 | } | 619 | } |
1346 | 610 | 620 | ||
1347 | === modified file 'software/Common/JrKerr/picservo.h' | |||
1348 | --- software/Common/JrKerr/picservo.h 2010-07-12 18:50:09 +0000 | |||
1349 | +++ software/Common/JrKerr/picservo.h 2010-08-07 00:08:43 +0000 | |||
1350 | @@ -24,28 +24,28 @@ | |||
1351 | 24 | } GAINVECT; | 24 | } GAINVECT; |
1352 | 25 | 25 | ||
1353 | 26 | typedef struct _SERVOMOD { | 26 | typedef struct _SERVOMOD { |
1355 | 27 | long pos; //current position | 27 | int pos; //current position |
1356 | 28 | byte ad; //a/d value | 28 | byte ad; //a/d value |
1357 | 29 | short int vel; //current velocity | 29 | short int vel; //current velocity |
1358 | 30 | byte aux; //auxilliary status byte | 30 | byte aux; //auxilliary status byte |
1360 | 31 | long home; //home position | 31 | int home; //home position |
1361 | 32 | short int perror; //position error | 32 | short int perror; //position error |
1362 | 33 | byte npoints; //number of points in path buffer | 33 | byte npoints; //number of points in path buffer |
1363 | 34 | 34 | ||
1364 | 35 | //The following data is stored locally for reference | 35 | //The following data is stored locally for reference |
1368 | 36 | long cmdpos; //last commanded position | 36 | int cmdpos; //last commanded position |
1369 | 37 | long cmdvel; //last commanded velocity | 37 | int cmdvel; //last commanded velocity |
1370 | 38 | long cmdacc; //last commanded acceleration | 38 | int cmdacc; //last commanded acceleration |
1371 | 39 | byte cmdpwm; //last commanded PWM value | 39 | byte cmdpwm; //last commanded PWM value |
1372 | 40 | GAINVECT gain; | 40 | GAINVECT gain; |
1374 | 41 | long stoppos; //motor stop position (used by stop command) | 41 | int stoppos; //motor stop position (used by stop command) |
1375 | 42 | byte stopctrl; //stop control byte | 42 | byte stopctrl; //stop control byte |
1376 | 43 | byte movectrl; //load_traj control byte | 43 | byte movectrl; //load_traj control byte |
1377 | 44 | byte ioctrl; //I/O control byte | 44 | byte ioctrl; //I/O control byte |
1378 | 45 | byte homectrl; //homing control byte | 45 | byte homectrl; //homing control byte |
1379 | 46 | byte ph_adv; //phase advance (for ss-drive modules) | 46 | byte ph_adv; //phase advance (for ss-drive modules) |
1380 | 47 | byte ph_off; //phase offset (for ss-drive modules) | 47 | byte ph_off; //phase offset (for ss-drive modules) |
1382 | 48 | long last_ppoint; //last path point specified | 48 | int last_ppoint; //last path point specified |
1383 | 49 | } SERVOMOD; | 49 | } SERVOMOD; |
1384 | 50 | 50 | ||
1385 | 51 | 51 | ||
1386 | @@ -163,17 +163,17 @@ | |||
1387 | 163 | //Servo module function prototypes: | 163 | //Servo module function prototypes: |
1388 | 164 | extern "C" SERVOMOD * ServoNewMod(); | 164 | extern "C" SERVOMOD * ServoNewMod(); |
1389 | 165 | extern "C" BOOL ServoGetStat(byte addr); | 165 | extern "C" BOOL ServoGetStat(byte addr); |
1391 | 166 | extern "C" long ServoGetPos(byte addr); | 166 | extern "C" int ServoGetPos(byte addr); |
1392 | 167 | extern "C" byte ServoGetAD(byte addr); | 167 | extern "C" byte ServoGetAD(byte addr); |
1393 | 168 | extern "C" short int ServoGetVel(byte addr); | 168 | extern "C" short int ServoGetVel(byte addr); |
1394 | 169 | extern "C" byte ServoGetAux(byte addr); | 169 | extern "C" byte ServoGetAux(byte addr); |
1396 | 170 | extern "C" long ServoGetHome(byte addr); | 170 | extern "C" int ServoGetHome(byte addr); |
1397 | 171 | extern "C" short int ServoGetPError(byte addr); | 171 | extern "C" short int ServoGetPError(byte addr); |
1398 | 172 | extern "C" byte ServoGetNPoints(byte addr); | 172 | extern "C" byte ServoGetNPoints(byte addr); |
1403 | 173 | extern "C" long ServoGetCmdPos(byte addr); | 173 | extern "C" int ServoGetCmdPos(byte addr); |
1404 | 174 | extern "C" long ServoGetCmdVel(byte addr); | 174 | extern "C" int ServoGetCmdVel(byte addr); |
1405 | 175 | extern "C" long ServoGetCmdAcc(byte addr); | 175 | extern "C" int ServoGetCmdAcc(byte addr); |
1406 | 176 | extern "C" long ServoGetStopPos(byte addr); | 176 | extern "C" int ServoGetStopPos(byte addr); |
1407 | 177 | extern "C" byte ServoGetCmdPwm(byte addr); | 177 | extern "C" byte ServoGetCmdPwm(byte addr); |
1408 | 178 | extern "C" byte ServoGetMoveCtrl(byte addr); | 178 | extern "C" byte ServoGetMoveCtrl(byte addr); |
1409 | 179 | extern "C" byte ServoGetStopCtrl(byte addr); | 179 | extern "C" byte ServoGetStopCtrl(byte addr); |
1410 | @@ -198,15 +198,15 @@ | |||
1411 | 198 | extern "C" BOOL ServoResetPos(byte addr); | 198 | extern "C" BOOL ServoResetPos(byte addr); |
1412 | 199 | extern "C" BOOL ServoResetRelHome(byte addr); | 199 | extern "C" BOOL ServoResetRelHome(byte addr); |
1413 | 200 | //added | 200 | //added |
1415 | 201 | extern "C" BOOL ServoSetPos(byte addr, long pos); | 201 | extern "C" BOOL ServoSetPos(byte addr, int pos); |
1416 | 202 | extern "C" BOOL ServoClearBits(byte addr); | 202 | extern "C" BOOL ServoClearBits(byte addr); |
1417 | 203 | extern "C" BOOL ServoStopMotor(byte addr, byte mode); | 203 | extern "C" BOOL ServoStopMotor(byte addr, byte mode); |
1418 | 204 | //added | 204 | //added |
1420 | 205 | extern "C" BOOL ServoStopHere(byte addr, byte mode, long pos); | 205 | extern "C" BOOL ServoStopHere(byte addr, byte mode, int pos); |
1421 | 206 | extern "C" BOOL ServoSetIoCtrl(byte addr, byte mode); | 206 | extern "C" BOOL ServoSetIoCtrl(byte addr, byte mode); |
1423 | 207 | extern "C" BOOL ServoLoadTraj(byte addr, byte mode, long pos, long vel, long acc, byte pwm); | 207 | extern "C" BOOL ServoLoadTraj(byte addr, byte mode, int pos, int vel, int acc, byte pwm); |
1424 | 208 | extern "C" void ServoInitPath(byte addr); | 208 | extern "C" void ServoInitPath(byte addr); |
1426 | 209 | extern "C" BOOL ServoAddPathpoints(byte addr, int npoints, long *path, int freq); | 209 | extern "C" BOOL ServoAddPathpoints(byte addr, int npoints, int *path, int freq); |
1427 | 210 | extern "C" BOOL ServoStartPathMode(byte groupaddr, byte groupleader); | 210 | extern "C" BOOL ServoStartPathMode(byte groupaddr, byte groupleader); |
1428 | 211 | //added | 211 | //added |
1429 | 212 | extern "C" BOOL ServoStartMove(byte groupaddr, byte groupleader); | 212 | extern "C" BOOL ServoStartMove(byte groupaddr, byte groupleader); |
1430 | 213 | 213 | ||
1431 | === modified file 'software/Common/JrKerr/src/.DS_Store' | |||
1432 | 214 | Binary files software/Common/JrKerr/src/.DS_Store 2010-07-23 20:12:14 +0000 and software/Common/JrKerr/src/.DS_Store 2010-08-07 00:08:43 +0000 differ | 214 | Binary files software/Common/JrKerr/src/.DS_Store 2010-07-23 20:12:14 +0000 and software/Common/JrKerr/src/.DS_Store 2010-08-07 00:08:43 +0000 differ |
1433 | === modified file 'software/Common/JrKerr/src/Makefile' | |||
1434 | --- software/Common/JrKerr/src/Makefile 2010-07-22 15:32:37 +0000 | |||
1435 | +++ software/Common/JrKerr/src/Makefile 2010-08-07 00:08:43 +0000 | |||
1436 | @@ -1,6 +1,6 @@ | |||
1437 | 1 | ############################################################################# | 1 | ############################################################################# |
1438 | 2 | # Makefile for building: libqextserialportd.1.0.0.dylib | 2 | # Makefile for building: libqextserialportd.1.0.0.dylib |
1440 | 3 | # Generated by qmake (2.01a) (Qt 4.6.3) on: Tue Jul 20 14:13:07 2010 | 3 | # Generated by qmake (2.01a) (Qt 4.6.3) on: Tue Aug 3 22:47:38 2010 |
1441 | 4 | # Project: src.pro | 4 | # Project: src.pro |
1442 | 5 | # Template: lib | 5 | # Template: lib |
1443 | 6 | # Command: /usr/bin/qmake -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile src.pro | 6 | # Command: /usr/bin/qmake -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile src.pro |
1444 | 7 | 7 | ||
1445 | === modified file 'software/Common/JrKerr/src/Makefile.Debug' | |||
1446 | --- software/Common/JrKerr/src/Makefile.Debug 2010-07-22 15:32:37 +0000 | |||
1447 | +++ software/Common/JrKerr/src/Makefile.Debug 2010-08-07 00:08:43 +0000 | |||
1448 | @@ -1,6 +1,6 @@ | |||
1449 | 1 | ############################################################################# | 1 | ############################################################################# |
1450 | 2 | # Makefile for building: libqextserialportd.1.0.0.dylib | 2 | # Makefile for building: libqextserialportd.1.0.0.dylib |
1452 | 3 | # Generated by qmake (2.01a) (Qt 4.6.3) on: Tue Jul 20 14:13:07 2010 | 3 | # Generated by qmake (2.01a) (Qt 4.6.3) on: Tue Aug 3 22:47:38 2010 |
1453 | 4 | # Project: src.pro | 4 | # Project: src.pro |
1454 | 5 | # Template: lib | 5 | # Template: lib |
1455 | 6 | ############################################################################# | 6 | ############################################################################# |
1456 | 7 | 7 | ||
1457 | === modified file 'software/Common/JrKerr/src/Makefile.Release' | |||
1458 | --- software/Common/JrKerr/src/Makefile.Release 2010-07-22 15:32:37 +0000 | |||
1459 | +++ software/Common/JrKerr/src/Makefile.Release 2010-08-07 00:08:43 +0000 | |||
1460 | @@ -1,6 +1,6 @@ | |||
1461 | 1 | ############################################################################# | 1 | ############################################################################# |
1462 | 2 | # Makefile for building: libqextserialport.1.0.0.dylib | 2 | # Makefile for building: libqextserialport.1.0.0.dylib |
1464 | 3 | # Generated by qmake (2.01a) (Qt 4.6.3) on: Tue Jul 20 14:13:07 2010 | 3 | # Generated by qmake (2.01a) (Qt 4.6.3) on: Tue Aug 3 22:47:38 2010 |
1465 | 4 | # Project: src.pro | 4 | # Project: src.pro |
1466 | 5 | # Template: lib | 5 | # Template: lib |
1467 | 6 | ############################################################################# | 6 | ############################################################################# |
1468 | 7 | 7 | ||
1469 | === modified file 'software/Common/JrKerr/src/src.pro.user' | |||
1470 | --- software/Common/JrKerr/src/src.pro.user 2010-07-23 20:12:14 +0000 | |||
1471 | +++ software/Common/JrKerr/src/src.pro.user 2010-08-07 00:08:43 +0000 | |||
1472 | @@ -22,9 +22,7 @@ | |||
1473 | 22 | </data> | 22 | </data> |
1474 | 23 | <data> | 23 | <data> |
1475 | 24 | <variable>RunConfiguration0-UserEnvironmentChanges</variable> | 24 | <variable>RunConfiguration0-UserEnvironmentChanges</variable> |
1479 | 25 | <valuelist type="QVariantList"> | 25 | <valuelist type="QVariantList"/> |
1477 | 26 | <value type="QString">DYLD_LIBRARY_PATH=$(qextserialport)/src/build</value> | ||
1478 | 27 | </valuelist> | ||
1480 | 28 | </data> | 26 | </data> |
1481 | 29 | <data> | 27 | <data> |
1482 | 30 | <variable>RunConfiguration0-UserName</variable> | 28 | <variable>RunConfiguration0-UserName</variable> |
1483 | @@ -61,32 +59,42 @@ | |||
1484 | 61 | </valuemap> | 59 | </valuemap> |
1485 | 62 | </data> | 60 | </data> |
1486 | 63 | <data> | 61 | <data> |
1487 | 62 | <variable>buildConfiguration-Release</variable> | ||
1488 | 63 | <valuemap type="QVariantMap"> | ||
1489 | 64 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | ||
1490 | 65 | <value key="QtVersionId" type="int">0</value> | ||
1491 | 66 | <value key="ToolChain" type="int">0</value> | ||
1492 | 67 | <value key="addQDumper" type=""></value> | ||
1493 | 68 | <value key="buildConfiguration" type="int">2</value> | ||
1494 | 69 | </valuemap> | ||
1495 | 70 | </data> | ||
1496 | 71 | <data> | ||
1497 | 64 | <variable>buildconfiguration-Debug-buildstep0</variable> | 72 | <variable>buildconfiguration-Debug-buildstep0</variable> |
1498 | 65 | <valuemap type="QVariantMap"> | 73 | <valuemap type="QVariantMap"> |
1499 | 66 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | 74 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> |
1500 | 67 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | 75 | <valuelist key="abstractProcess.Environment" type="QVariantList"> |
1502 | 68 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-4XNpfV/Render</value> | 76 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> |
1503 | 69 | <value type="QString">COMMAND_MODE=unix2003</value> | 77 | <value type="QString">COMMAND_MODE=unix2003</value> |
1505 | 70 | <value type="QString">DISPLAY=/tmp/launch-s7Hnnm/:0</value> | 78 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> |
1506 | 71 | <value type="QString">HOME=/Users/jcman912</value> | 79 | <value type="QString">HOME=/Users/jcman912</value> |
1507 | 72 | <value type="QString">LOGNAME=jcman912</value> | 80 | <value type="QString">LOGNAME=jcman912</value> |
1508 | 73 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | 81 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> |
1509 | 74 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | 82 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> |
1510 | 75 | <value type="QString">SHELL=/bin/bash</value> | 83 | <value type="QString">SHELL=/bin/bash</value> |
1512 | 76 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-jV3RpK/Listeners</value> | 84 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> |
1513 | 77 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | 85 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> |
1514 | 78 | <value type="QString">USER=jcman912</value> | 86 | <value type="QString">USER=jcman912</value> |
1515 | 79 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | 87 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> |
1516 | 80 | </valuelist> | 88 | </valuelist> |
1517 | 81 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | 89 | <valuelist key="abstractProcess.arguments" type="QVariantList"> |
1519 | 82 | <value type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/Common/JrKerr/src/src.pro</value> | 90 | <value type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/Common/JrKerr/src/src.pro</value> |
1520 | 83 | <value type="QString">-spec</value> | 91 | <value type="QString">-spec</value> |
1521 | 84 | <value type="QString">macx-g++</value> | 92 | <value type="QString">macx-g++</value> |
1522 | 85 | <value type="QString">-r</value> | 93 | <value type="QString">-r</value> |
1523 | 86 | </valuelist> | 94 | </valuelist> |
1524 | 87 | <value key="abstractProcess.command" type="QString">/usr/bin/qmake</value> | 95 | <value key="abstractProcess.command" type="QString">/usr/bin/qmake</value> |
1525 | 88 | <value key="abstractProcess.enabled" type="bool">false</value> | 96 | <value key="abstractProcess.enabled" type="bool">false</value> |
1527 | 89 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/Common/JrKerr/src</value> | 97 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/Common/JrKerr/src</value> |
1528 | 90 | </valuemap> | 98 | </valuemap> |
1529 | 91 | </data> | 99 | </data> |
1530 | 92 | <data> | 100 | <data> |
1531 | @@ -94,15 +102,15 @@ | |||
1532 | 94 | <valuemap type="QVariantMap"> | 102 | <valuemap type="QVariantMap"> |
1533 | 95 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | 103 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> |
1534 | 96 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | 104 | <valuelist key="abstractProcess.Environment" type="QVariantList"> |
1536 | 97 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-4XNpfV/Render</value> | 105 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> |
1537 | 98 | <value type="QString">COMMAND_MODE=unix2003</value> | 106 | <value type="QString">COMMAND_MODE=unix2003</value> |
1539 | 99 | <value type="QString">DISPLAY=/tmp/launch-s7Hnnm/:0</value> | 107 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> |
1540 | 100 | <value type="QString">HOME=/Users/jcman912</value> | 108 | <value type="QString">HOME=/Users/jcman912</value> |
1541 | 101 | <value type="QString">LOGNAME=jcman912</value> | 109 | <value type="QString">LOGNAME=jcman912</value> |
1542 | 102 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | 110 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> |
1543 | 103 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | 111 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> |
1544 | 104 | <value type="QString">SHELL=/bin/bash</value> | 112 | <value type="QString">SHELL=/bin/bash</value> |
1546 | 105 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-jV3RpK/Listeners</value> | 113 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> |
1547 | 106 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | 114 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> |
1548 | 107 | <value type="QString">USER=jcman912</value> | 115 | <value type="QString">USER=jcman912</value> |
1549 | 108 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | 116 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> |
1550 | @@ -113,7 +121,7 @@ | |||
1551 | 113 | </valuelist> | 121 | </valuelist> |
1552 | 114 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | 122 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> |
1553 | 115 | <value key="abstractProcess.enabled" type="bool">true</value> | 123 | <value key="abstractProcess.enabled" type="bool">true</value> |
1555 | 116 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/Common/JrKerr/src</value> | 124 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/Common/JrKerr/src</value> |
1556 | 117 | </valuemap> | 125 | </valuemap> |
1557 | 118 | </data> | 126 | </data> |
1558 | 119 | <data> | 127 | <data> |
1559 | @@ -121,37 +129,163 @@ | |||
1560 | 121 | <valuemap type="QVariantMap"> | 129 | <valuemap type="QVariantMap"> |
1561 | 122 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | 130 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> |
1562 | 123 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | 131 | <valuelist key="abstractProcess.Environment" type="QVariantList"> |
1588 | 124 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-D74XdB/Render</value> | 132 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> |
1589 | 125 | <value type="QString">COMMAND_MODE=unix2003</value> | 133 | <value type="QString">COMMAND_MODE=unix2003</value> |
1590 | 126 | <value type="QString">DISPLAY=/tmp/launch-NT9FlI/:0</value> | 134 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> |
1591 | 127 | <value type="QString">HOME=/Users/jcman912</value> | 135 | <value type="QString">HOME=/Users/jcman912</value> |
1592 | 128 | <value type="QString">LOGNAME=jcman912</value> | 136 | <value type="QString">LOGNAME=jcman912</value> |
1593 | 129 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | 137 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> |
1594 | 130 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | 138 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> |
1595 | 131 | <value type="QString">SHELL=/bin/bash</value> | 139 | <value type="QString">SHELL=/bin/bash</value> |
1596 | 132 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-8Wa6tg/Listeners</value> | 140 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> |
1597 | 133 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | 141 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> |
1598 | 134 | <value type="QString">USER=jcman912</value> | 142 | <value type="QString">USER=jcman912</value> |
1599 | 135 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | 143 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> |
1600 | 136 | </valuelist> | 144 | </valuelist> |
1601 | 137 | <value key="abstractProcess.IgnoreReturnValue" type="bool">true</value> | 145 | <value key="abstractProcess.IgnoreReturnValue" type="bool">true</value> |
1602 | 138 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | 146 | <valuelist key="abstractProcess.arguments" type="QVariantList"> |
1603 | 139 | <value type="QString">clean</value> | 147 | <value type="QString">clean</value> |
1604 | 140 | <value type="QString">-w</value> | 148 | <value type="QString">-w</value> |
1605 | 141 | </valuelist> | 149 | </valuelist> |
1606 | 142 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | 150 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> |
1607 | 143 | <value key="abstractProcess.enabled" type="bool">true</value> | 151 | <value key="abstractProcess.enabled" type="bool">true</value> |
1608 | 144 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/Common/JrKerr/src</value> | 152 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/Common/JrKerr/src</value> |
1609 | 145 | <value key="cleanConfig" type="bool">true</value> | 153 | <value key="cleanConfig" type="bool">true</value> |
1610 | 146 | <valuelist key="makeargs" type="QVariantList"> | 154 | <valuelist key="makeargs" type="QVariantList"> |
1611 | 147 | <value type="QString">clean</value> | 155 | <value type="QString">clean</value> |
1612 | 148 | </valuelist> | 156 | </valuelist> |
1613 | 157 | </valuemap> | ||
1614 | 158 | </data> | ||
1615 | 159 | <data> | ||
1616 | 160 | <variable>buildconfiguration-Debug-cleanstep1</variable> | ||
1617 | 161 | <valuemap type="QVariantMap"> | ||
1618 | 162 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | ||
1619 | 163 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
1620 | 164 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> | ||
1621 | 165 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
1622 | 166 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> | ||
1623 | 167 | <value type="QString">HOME=/Users/jcman912</value> | ||
1624 | 168 | <value type="QString">LOGNAME=jcman912</value> | ||
1625 | 169 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
1626 | 170 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
1627 | 171 | <value type="QString">SHELL=/bin/bash</value> | ||
1628 | 172 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> | ||
1629 | 173 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
1630 | 174 | <value type="QString">USER=jcman912</value> | ||
1631 | 175 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
1632 | 176 | </valuelist> | ||
1633 | 177 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
1634 | 178 | <value type="QString">*</value> | ||
1635 | 179 | </valuelist> | ||
1636 | 180 | <value key="abstractProcess.command" type="QString">/bin/rm</value> | ||
1637 | 181 | <value key="abstractProcess.enabled" type="bool">false</value> | ||
1638 | 182 | <value key="abstractProcess.workingDirectory" type="QString">BUILDDIR</value> | ||
1639 | 183 | <value key="workingDirectory" type="QString">BUILDDIR</value> | ||
1640 | 184 | </valuemap> | ||
1641 | 185 | </data> | ||
1642 | 186 | <data> | ||
1643 | 187 | <variable>buildconfiguration-Release-buildstep0</variable> | ||
1644 | 188 | <valuemap type="QVariantMap"> | ||
1645 | 189 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | ||
1646 | 190 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
1647 | 191 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> | ||
1648 | 192 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
1649 | 193 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> | ||
1650 | 194 | <value type="QString">HOME=/Users/jcman912</value> | ||
1651 | 195 | <value type="QString">LOGNAME=jcman912</value> | ||
1652 | 196 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
1653 | 197 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
1654 | 198 | <value type="QString">SHELL=/bin/bash</value> | ||
1655 | 199 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> | ||
1656 | 200 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
1657 | 201 | <value type="QString">USER=jcman912</value> | ||
1658 | 202 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
1659 | 203 | </valuelist> | ||
1660 | 204 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
1661 | 205 | <value type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/Common/JrKerr/src/src.pro</value> | ||
1662 | 206 | <value type="QString">-spec</value> | ||
1663 | 207 | <value type="QString">macx-g++</value> | ||
1664 | 208 | <value type="QString">-r</value> | ||
1665 | 209 | <value type="QString">CONFIG+=release</value> | ||
1666 | 210 | </valuelist> | ||
1667 | 211 | <value key="abstractProcess.command" type="QString">/usr/bin/qmake</value> | ||
1668 | 212 | <value key="abstractProcess.enabled" type="bool">true</value> | ||
1669 | 213 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/Common/JrKerr/src</value> | ||
1670 | 214 | <valuelist key="qmakeArgs" type="QVariantList"> | ||
1671 | 215 | <value type="QString">CONFIG+=release</value> | ||
1672 | 216 | </valuelist> | ||
1673 | 217 | </valuemap> | ||
1674 | 218 | </data> | ||
1675 | 219 | <data> | ||
1676 | 220 | <variable>buildconfiguration-Release-buildstep1</variable> | ||
1677 | 221 | <valuemap type="QVariantMap"> | ||
1678 | 222 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | ||
1679 | 223 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
1680 | 224 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> | ||
1681 | 225 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
1682 | 226 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> | ||
1683 | 227 | <value type="QString">HOME=/Users/jcman912</value> | ||
1684 | 228 | <value type="QString">LOGNAME=jcman912</value> | ||
1685 | 229 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
1686 | 230 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
1687 | 231 | <value type="QString">SHELL=/bin/bash</value> | ||
1688 | 232 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> | ||
1689 | 233 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
1690 | 234 | <value type="QString">USER=jcman912</value> | ||
1691 | 235 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
1692 | 236 | </valuelist> | ||
1693 | 237 | <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value> | ||
1694 | 238 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
1695 | 239 | <value type="QString">-w</value> | ||
1696 | 240 | </valuelist> | ||
1697 | 241 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | ||
1698 | 242 | <value key="abstractProcess.enabled" type="bool">true</value> | ||
1699 | 243 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/Common/JrKerr/src</value> | ||
1700 | 244 | </valuemap> | ||
1701 | 245 | </data> | ||
1702 | 246 | <data> | ||
1703 | 247 | <variable>buildconfiguration-Release-cleanstep0</variable> | ||
1704 | 248 | <valuemap type="QVariantMap"> | ||
1705 | 249 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | ||
1706 | 250 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
1707 | 251 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> | ||
1708 | 252 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
1709 | 253 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> | ||
1710 | 254 | <value type="QString">HOME=/Users/jcman912</value> | ||
1711 | 255 | <value type="QString">LOGNAME=jcman912</value> | ||
1712 | 256 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
1713 | 257 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
1714 | 258 | <value type="QString">SHELL=/bin/bash</value> | ||
1715 | 259 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> | ||
1716 | 260 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
1717 | 261 | <value type="QString">USER=jcman912</value> | ||
1718 | 262 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
1719 | 263 | </valuelist> | ||
1720 | 264 | <value key="abstractProcess.IgnoreReturnValue" type="bool">true</value> | ||
1721 | 265 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
1722 | 266 | <value type="QString">clean</value> | ||
1723 | 267 | <value type="QString">-w</value> | ||
1724 | 268 | </valuelist> | ||
1725 | 269 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | ||
1726 | 270 | <value key="abstractProcess.enabled" type="bool">true</value> | ||
1727 | 271 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/Common/JrKerr/src</value> | ||
1728 | 272 | <value key="cleanConfig" type="bool">true</value> | ||
1729 | 273 | <valuelist key="makeargs" type="QVariantList"> | ||
1730 | 274 | <value type="QString">clean</value> | ||
1731 | 275 | </valuelist> | ||
1732 | 276 | </valuemap> | ||
1733 | 277 | </data> | ||
1734 | 278 | <data> | ||
1735 | 279 | <variable>buildconfiguration-Release-cleanstep1</variable> | ||
1736 | 280 | <valuemap type="QVariantMap"> | ||
1737 | 281 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | ||
1738 | 149 | </valuemap> | 282 | </valuemap> |
1739 | 150 | </data> | 283 | </data> |
1740 | 151 | <data> | 284 | <data> |
1741 | 152 | <variable>buildconfigurations</variable> | 285 | <variable>buildconfigurations</variable> |
1742 | 153 | <valuelist type="QVariantList"> | 286 | <valuelist type="QVariantList"> |
1743 | 154 | <value type="QString">Debug</value> | 287 | <value type="QString">Debug</value> |
1744 | 288 | <value type="QString">Release</value> | ||
1745 | 155 | </valuelist> | 289 | </valuelist> |
1746 | 156 | </data> | 290 | </data> |
1747 | 157 | <data> | 291 | <data> |
1748 | @@ -182,9 +316,16 @@ | |||
1749 | 182 | </valuemap> | 316 | </valuemap> |
1750 | 183 | </data> | 317 | </data> |
1751 | 184 | <data> | 318 | <data> |
1752 | 319 | <variable>cleanstep1</variable> | ||
1753 | 320 | <valuemap type="QVariantMap"> | ||
1754 | 321 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value> | ||
1755 | 322 | </valuemap> | ||
1756 | 323 | </data> | ||
1757 | 324 | <data> | ||
1758 | 185 | <variable>cleansteps</variable> | 325 | <variable>cleansteps</variable> |
1759 | 186 | <valuelist type="QVariantList"> | 326 | <valuelist type="QVariantList"> |
1760 | 187 | <value type="QString">trolltech.qt4projectmanager.make</value> | 327 | <value type="QString">trolltech.qt4projectmanager.make</value> |
1761 | 328 | <value type="QString">projectexplorer.processstep</value> | ||
1762 | 188 | </valuelist> | 329 | </valuelist> |
1763 | 189 | </data> | 330 | </data> |
1764 | 190 | <data> | 331 | <data> |
1765 | 191 | 332 | ||
1766 | === added file 'software/Common/POSIX LIBNMC.zip' | |||
1767 | 192 | Binary files software/Common/POSIX LIBNMC.zip 1970-01-01 00:00:00 +0000 and software/Common/POSIX LIBNMC.zip 2010-08-07 00:08:43 +0000 differ | 333 | Binary files software/Common/POSIX LIBNMC.zip 1970-01-01 00:00:00 +0000 and software/Common/POSIX LIBNMC.zip 2010-08-07 00:08:43 +0000 differ |
1768 | === added file 'software/Duel Syringe - Model 2.config' | |||
1769 | --- software/Duel Syringe - Model 2.config 1970-01-01 00:00:00 +0000 | |||
1770 | +++ software/Duel Syringe - Model 2.config 2010-08-07 00:08:43 +0000 | |||
1771 | @@ -0,0 +1,197 @@ | |||
1772 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | ||
1773 | 2 | <fabAtHomePrinter> | ||
1774 | 3 | <!--Unit of distance is mm for all values.--> | ||
1775 | 4 | <axis> | ||
1776 | 5 | <!--The name of the axis. Must be unique among axes. Must be X.--> | ||
1777 | 6 | <name>X</name> | ||
1778 | 7 | <!--The name of the motor that controls this axis.--> | ||
1779 | 8 | <motorName>motor0</motorName> | ||
1780 | 9 | </axis> | ||
1781 | 10 | <axis> | ||
1782 | 11 | <!--The name of the axis. Must be unique among axes. Must be Y.--> | ||
1783 | 12 | <name>Y</name> | ||
1784 | 13 | <!--The name of the motor that controls this axis.--> | ||
1785 | 14 | <motorName>motor1</motorName> | ||
1786 | 15 | </axis> | ||
1787 | 16 | <axis> | ||
1788 | 17 | <!--The name of the axis. Must be unique among axes. Must be Z.--> | ||
1789 | 18 | <name>Z</name> | ||
1790 | 19 | <!--The name of the motor that controls this axis.--> | ||
1791 | 20 | <motorName>motor2</motorName> | ||
1792 | 21 | </axis> | ||
1793 | 22 | <tool> | ||
1794 | 23 | <bay> | ||
1795 | 24 | <!--The name of the bay. Must be unique among bays. Must be Bay 0.--> | ||
1796 | 25 | <name>Bay 0</name> | ||
1797 | 26 | <!--The name of the motor that controls this bay or blank if no motor controls this bay.--> | ||
1798 | 27 | <motorName>motor3</motorName> | ||
1799 | 28 | <location> | ||
1800 | 29 | <x>0</x> | ||
1801 | 30 | <y>0</y> | ||
1802 | 31 | <z>0</z> | ||
1803 | 32 | </location> | ||
1804 | 33 | </bay> | ||
1805 | 34 | <bay> | ||
1806 | 35 | <!--The name of the bay. Must be unique among bays. Must be Bay 0.--> | ||
1807 | 36 | <name>Bay 1</name> | ||
1808 | 37 | <!--The name of the motor that controls this bay or blank if no motor controls this bay.--> | ||
1809 | 38 | <motorName>motor4</motorName> | ||
1810 | 39 | <location> | ||
1811 | 40 | <x>0</x> | ||
1812 | 41 | <y>33</y> | ||
1813 | 42 | <z>0</z> | ||
1814 | 43 | </location> | ||
1815 | 44 | </bay> | ||
1816 | 45 | </tool> | ||
1817 | 46 | <motion> | ||
1818 | 47 | <!--Distance that platform moves downwards when pause, cancel, or complete print.--> | ||
1819 | 48 | <platformDelta>40</platformDelta> | ||
1820 | 49 | <!--Magic constant from line 58 of FabAtHomeParameters.h in model 1 code. Used to calculate values for pushout and suckback.--> | ||
1821 | 50 | <oldMsps>5000</oldMsps> | ||
1822 | 51 | </motion> | ||
1823 | 52 | <electronics> | ||
1824 | 53 | <!--Number of modules that are connected to printer.--> | ||
1825 | 54 | <numModules>5</numModules> | ||
1826 | 55 | <!--COM port that printer is connected to.--> | ||
1827 | 56 | <comPort>4</comPort> | ||
1828 | 57 | <!--Baud rate.--> | ||
1829 | 58 | <baudRate>19200</baudRate> | ||
1830 | 59 | <!--Group address of motors that control axes.--> | ||
1831 | 60 | <xyzGroupAddress>128</xyzGroupAddress> | ||
1832 | 61 | <motor> | ||
1833 | 62 | <name>motor0</name> | ||
1834 | 63 | <!--Address of the motor.--> | ||
1835 | 64 | <address>1</address> | ||
1836 | 65 | <!--Counts to move one unit of distance.--> | ||
1837 | 66 | <countsPerDistanceUnit>236.239</countsPerDistanceUnit> | ||
1838 | 67 | <!--Kp value of motor gains.--> | ||
1839 | 68 | <kp>2200</kp> | ||
1840 | 69 | <!--Kd value of motor gains.--> | ||
1841 | 70 | <kd>30000</kd> | ||
1842 | 71 | <!--Ki value of motor gains.--> | ||
1843 | 72 | <ki>0</ki> | ||
1844 | 73 | <!--IL value of motor gains.--> | ||
1845 | 74 | <il>16000</il> | ||
1846 | 75 | <!--OL value of motor gains.--> | ||
1847 | 76 | <ol>255</ol> | ||
1848 | 77 | <!--CL value of motor gains.--> | ||
1849 | 78 | <cl>0</cl> | ||
1850 | 79 | <!--EL value of motor gains.--> | ||
1851 | 80 | <el>32767</el> | ||
1852 | 81 | <!--SR value of motor gains.--> | ||
1853 | 82 | <sr>1</sr> | ||
1854 | 83 | <!--DB value of motor gains.--> | ||
1855 | 84 | <db>0</db> | ||
1856 | 85 | <!--Ticks per second.--> | ||
1857 | 86 | <ticksPerSecond>1953.125</ticksPerSecond> | ||
1858 | 87 | </motor> | ||
1859 | 88 | <motor> | ||
1860 | 89 | <name>motor1</name> | ||
1861 | 90 | <!--Address of the motor.--> | ||
1862 | 91 | <address>2</address> | ||
1863 | 92 | <!--Counts to move one unit of distance.--> | ||
1864 | 93 | <countsPerDistanceUnit>285.714</countsPerDistanceUnit> | ||
1865 | 94 | <!--Kp value of motor gains.--> | ||
1866 | 95 | <kp>1200</kp> | ||
1867 | 96 | <!--Kd value of motor gains.--> | ||
1868 | 97 | <kd>23000</kd> | ||
1869 | 98 | <!--Ki value of motor gains.--> | ||
1870 | 99 | <ki>0</ki> | ||
1871 | 100 | <!--IL value of motor gains.--> | ||
1872 | 101 | <il>16000</il> | ||
1873 | 102 | <!--OL value of motor gains.--> | ||
1874 | 103 | <ol>255</ol> | ||
1875 | 104 | <!--CL value of motor gains.--> | ||
1876 | 105 | <cl>0</cl> | ||
1877 | 106 | <!--EL value of motor gains.--> | ||
1878 | 107 | <el>32767</el> | ||
1879 | 108 | <!--SR value of motor gains.--> | ||
1880 | 109 | <sr>1</sr> | ||
1881 | 110 | <!--DB value of motor gains.--> | ||
1882 | 111 | <db>0</db> | ||
1883 | 112 | <!--Ticks per second.--> | ||
1884 | 113 | <ticksPerSecond>1953.125</ticksPerSecond> | ||
1885 | 114 | </motor> | ||
1886 | 115 | <motor> | ||
1887 | 116 | <name>motor2</name> | ||
1888 | 117 | <!--Address of the motor.--> | ||
1889 | 118 | <address>3</address> | ||
1890 | 119 | <!--Counts to move one unit of distance.--> | ||
1891 | 120 | <countsPerDistanceUnit>284.900</countsPerDistanceUnit> | ||
1892 | 121 | <!--Kp value of motor gains.--> | ||
1893 | 122 | <kp>1000</kp> | ||
1894 | 123 | <!--Kd value of motor gains.--> | ||
1895 | 124 | <kd>20000</kd> | ||
1896 | 125 | <!--Ki value of motor gains.--> | ||
1897 | 126 | <ki>0</ki> | ||
1898 | 127 | <!--IL value of motor gains.--> | ||
1899 | 128 | <il>16000</il> | ||
1900 | 129 | <!--OL value of motor gains.--> | ||
1901 | 130 | <ol>255</ol> | ||
1902 | 131 | <!--CL value of motor gains.--> | ||
1903 | 132 | <cl>0</cl> | ||
1904 | 133 | <!--EL value of motor gains.--> | ||
1905 | 134 | <el>32767</el> | ||
1906 | 135 | <!--SR value of motor gains.--> | ||
1907 | 136 | <sr>1</sr> | ||
1908 | 137 | <!--DB value of motor gains.--> | ||
1909 | 138 | <db>0</db> | ||
1910 | 139 | <!--Ticks per second.--> | ||
1911 | 140 | <ticksPerSecond>1953.125</ticksPerSecond> | ||
1912 | 141 | </motor> | ||
1913 | 142 | <motor> | ||
1914 | 143 | <name>motor3</name> | ||
1915 | 144 | <!--Address of the motor.--> | ||
1916 | 145 | <address>4</address> | ||
1917 | 146 | <!--Counts to move one unit of distance.--> | ||
1918 | 147 | <countsPerDistanceUnit>17409.1142</countsPerDistanceUnit> | ||
1919 | 148 | <!--Kp value of motor gains.--> | ||
1920 | 149 | <kp>1800</kp> | ||
1921 | 150 | <!--Kd value of motor gains.--> | ||
1922 | 151 | <kd>16000</kd> | ||
1923 | 152 | <!--Ki value of motor gains.--> | ||
1924 | 153 | <ki>0</ki> | ||
1925 | 154 | <!--IL value of motor gains.--> | ||
1926 | 155 | <il>0</il> | ||
1927 | 156 | <!--OL value of motor gains.--> | ||
1928 | 157 | <ol>255</ol> | ||
1929 | 158 | <!--CL value of motor gains.--> | ||
1930 | 159 | <cl>0</cl> | ||
1931 | 160 | <!--EL value of motor gains.--> | ||
1932 | 161 | <el>32767</el> | ||
1933 | 162 | <!--SR value of motor gains.--> | ||
1934 | 163 | <sr>1</sr> | ||
1935 | 164 | <!--DB value of motor gains.--> | ||
1936 | 165 | <db>0</db> | ||
1937 | 166 | <!--Ticks per second.--> | ||
1938 | 167 | <ticksPerSecond>1953.125</ticksPerSecond> | ||
1939 | 168 | </motor> | ||
1940 | 169 | <motor> | ||
1941 | 170 | <name>motor4</name> | ||
1942 | 171 | <!--Address of the motor.--> | ||
1943 | 172 | <address>5</address> | ||
1944 | 173 | <!--Counts to move one unit of distance.--> | ||
1945 | 174 | <countsPerDistanceUnit>17409.1142</countsPerDistanceUnit> | ||
1946 | 175 | <!--Kp value of motor gains.--> | ||
1947 | 176 | <kp>1800</kp> | ||
1948 | 177 | <!--Kd value of motor gains.--> | ||
1949 | 178 | <kd>16000</kd> | ||
1950 | 179 | <!--Ki value of motor gains.--> | ||
1951 | 180 | <ki>0</ki> | ||
1952 | 181 | <!--IL value of motor gains.--> | ||
1953 | 182 | <il>0</il> | ||
1954 | 183 | <!--OL value of motor gains.--> | ||
1955 | 184 | <ol>255</ol> | ||
1956 | 185 | <!--CL value of motor gains.--> | ||
1957 | 186 | <cl>0</cl> | ||
1958 | 187 | <!--EL value of motor gains.--> | ||
1959 | 188 | <el>32767</el> | ||
1960 | 189 | <!--SR value of motor gains.--> | ||
1961 | 190 | <sr>1</sr> | ||
1962 | 191 | <!--DB value of motor gains.--> | ||
1963 | 192 | <db>0</db> | ||
1964 | 193 | <!--Ticks per second.--> | ||
1965 | 194 | <ticksPerSecond>1953.125</ticksPerSecond> | ||
1966 | 195 | </motor> | ||
1967 | 196 | </electronics> | ||
1968 | 197 | </fabAtHomePrinter> | ||
1969 | 0 | \ No newline at end of file | 198 | \ No newline at end of file |
1970 | 1 | 199 | ||
1971 | === modified file 'software/FabInterpreter/.DS_Store' | |||
1972 | 2 | Binary files software/FabInterpreter/.DS_Store 2010-07-12 23:00:59 +0000 and software/FabInterpreter/.DS_Store 2010-08-07 00:08:43 +0000 differ | 200 | Binary files software/FabInterpreter/.DS_Store 2010-07-12 23:00:59 +0000 and software/FabInterpreter/.DS_Store 2010-08-07 00:08:43 +0000 differ |
1973 | === modified file 'software/FabInterpreter/FabAtHomePrinter.cpp' | |||
1974 | --- software/FabInterpreter/FabAtHomePrinter.cpp 2010-07-23 20:12:14 +0000 | |||
1975 | +++ software/FabInterpreter/FabAtHomePrinter.cpp 2010-08-07 00:08:43 +0000 | |||
1976 | @@ -1,5 +1,4 @@ | |||
1977 | 1 | #include "FabAtHomePrinter.h" | 1 | #include "FabAtHomePrinter.h" |
1978 | 2 | #include <QDebug> | ||
1979 | 3 | 2 | ||
1980 | 4 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 3 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
1981 | 5 | FabAtHomePrinter::FabAtHomePrinter(): | 4 | FabAtHomePrinter::FabAtHomePrinter(): |
1982 | @@ -9,6 +8,7 @@ | |||
1983 | 9 | initialized(false), | 8 | initialized(false), |
1984 | 10 | printing(false), | 9 | printing(false), |
1985 | 11 | paused(false), | 10 | paused(false), |
1986 | 11 | pauseSemaphore(0), | ||
1987 | 12 | displayText((string)"") | 12 | displayText((string)"") |
1988 | 13 | { | 13 | { |
1989 | 14 | } | 14 | } |
1990 | @@ -26,8 +26,6 @@ | |||
1991 | 26 | //Connect to printer. | 26 | //Connect to printer. |
1992 | 27 | stringstream ss; | 27 | stringstream ss; |
1993 | 28 | 28 | ||
1994 | 29 | //TODO: change this so you can read in from posix | ||
1995 | 30 | //ss << "COM" << COM_PORT; | ||
1996 | 31 | ss << portLocation; | 29 | ss << portLocation; |
1997 | 32 | unsigned int numModulesFound = NmcInit(const_cast<char*>(ss.str().c_str()), BAUD_RATE); | 30 | unsigned int numModulesFound = NmcInit(const_cast<char*>(ss.str().c_str()), BAUD_RATE); |
1998 | 33 | if(numModulesFound < NUM_MODULES) | 31 | if(numModulesFound < NUM_MODULES) |
1999 | @@ -52,7 +50,10 @@ | |||
2000 | 52 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 50 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2001 | 53 | void FabAtHomePrinter::pausePrint() | 51 | void FabAtHomePrinter::pausePrint() |
2002 | 54 | { | 52 | { |
2004 | 55 | pausePrintFlag = true; | 53 | if (this->state().compare("PAUSED") == 0) |
2005 | 54 | pauseSemaphore.release(); | ||
2006 | 55 | else | ||
2007 | 56 | pausePrintFlag = true; | ||
2008 | 56 | } | 57 | } |
2009 | 57 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 58 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2010 | 58 | void FabAtHomePrinter::cancelPrint() | 59 | void FabAtHomePrinter::cancelPrint() |
2011 | @@ -94,7 +95,6 @@ | |||
2012 | 94 | { | 95 | { |
2013 | 95 | i->second.resetPosition(); | 96 | i->second.resetPosition(); |
2014 | 96 | } | 97 | } |
2015 | 97 | qDebug() << "acceleration: " << (float) PRINT_ACCELERATION; | ||
2016 | 98 | return | 98 | return |
2017 | 99 | axes["X"].motor->setGroup(X_Y_Z_GROUP_ADDRESS, true) | 99 | axes["X"].motor->setGroup(X_Y_Z_GROUP_ADDRESS, true) |
2018 | 100 | && axes["Y"].motor->setGroup(X_Y_Z_GROUP_ADDRESS, false) | 100 | && axes["Y"].motor->setGroup(X_Y_Z_GROUP_ADDRESS, false) |
2019 | @@ -165,11 +165,18 @@ | |||
2020 | 165 | string base = "fabAtHomePrinter 0\\axis "+Util::toString(i)+"\\"; | 165 | string base = "fabAtHomePrinter 0\\axis "+Util::toString(i)+"\\"; |
2021 | 166 | string name = parser.text(base+"name 0"); | 166 | string name = parser.text(base+"name 0"); |
2022 | 167 | string motorName = parser.text(base+"motorName 0"); | 167 | string motorName = parser.text(base+"motorName 0"); |
2023 | 168 | map<string, Motor, LessThanString>::iterator motor = motors.find(motorName); | ||
2024 | 168 | if(motors.find(motorName) == motors.end()) | 169 | if(motors.find(motorName) == motors.end()) |
2025 | 169 | { | 170 | { |
2026 | 170 | return "Axis "+name+" references motor "+motorName+" which has not been loaded."; | 171 | return "Axis "+name+" references motor "+motorName+" which has not been loaded."; |
2027 | 171 | } | 172 | } |
2029 | 172 | axes[name] = Axis(name,&(motors.find(motorName)->second)); | 173 | |
2030 | 174 | //THIS IS WHERE YOU REVERSE THE AXIS | ||
2031 | 175 | if(name.compare("Y") == 0 /*|| name.compare("Z") == 0 */) //CHANGE MADE in v0.1 z should now be pos for down neg for up | ||
2032 | 176 | { | ||
2033 | 177 | motor->second.setReversed(true); | ||
2034 | 178 | } | ||
2035 | 179 | axes[name] = Axis(name,&(motor->second)); | ||
2036 | 173 | } | 180 | } |
2037 | 174 | 181 | ||
2038 | 175 | //Check that axes named X, Y, and Z were loaded. | 182 | //Check that axes named X, Y, and Z were loaded. |
2039 | @@ -209,6 +216,10 @@ | |||
2040 | 209 | return "Must load at least one bay."; | 216 | return "Must load at least one bay."; |
2041 | 210 | } | 217 | } |
2042 | 211 | 218 | ||
2043 | 219 | //if the total number of axis motors and bay motors does not equal NUM_MODULES declared in the config file | ||
2044 | 220 | if (tool.bays.size() + axes.size() != NUM_MODULES) | ||
2045 | 221 | return "Invalid number of motors"; | ||
2046 | 222 | |||
2047 | 212 | return ""; | 223 | return ""; |
2048 | 213 | } | 224 | } |
2049 | 214 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 225 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2050 | @@ -241,66 +252,7 @@ | |||
2051 | 241 | PRINT_ACCELERATION = Util::assertType<double>(child->FirstChild()->Value()); | 252 | PRINT_ACCELERATION = Util::assertType<double>(child->FirstChild()->Value()); |
2052 | 242 | } | 253 | } |
2053 | 243 | } | 254 | } |
2054 | 244 | |||
2055 | 245 | return ""; | 255 | return ""; |
2056 | 246 | /* | ||
2057 | 247 | XMLParser parser; | ||
2058 | 248 | string result = parser.load(filePath); | ||
2059 | 249 | if(result.compare("") != 0) | ||
2060 | 250 | { | ||
2061 | 251 | return result; | ||
2062 | 252 | } | ||
2063 | 253 | |||
2064 | 254 | //Clear previously loaded data. | ||
2065 | 255 | materialCalibrations.clear(); | ||
2066 | 256 | model.paths.clear(); | ||
2067 | 257 | |||
2068 | 258 | PRINT_ACCELERATION = Util::assertType<double>(parser.text("fabAtHomePrinter 0\\printAcceleration 0")); | ||
2069 | 259 | |||
2070 | 260 | //Load material calibrations. | ||
2071 | 261 | unsigned int count = parser.count("fabAtHomePrinter 0\\materialCalibration"); | ||
2072 | 262 | for(unsigned int i = 0; i < count; ++i) | ||
2073 | 263 | { | ||
2074 | 264 | string base = "fabAtHomePrinter 0\\materialCalibration "+Util::toString(i)+"\\"; | ||
2075 | 265 | string name = parser.text(base+"name 0"); | ||
2076 | 266 | double pathSpeed = Util::assertType<double>(parser.text(base+"pathSpeed 0")); | ||
2077 | 267 | double pathWidth = Util::assertType<double>(parser.text(base+"pathWidth 0")); | ||
2078 | 268 | double depositionRate = Util::assertType<double>(parser.text(base+"depositionRate 0")); | ||
2079 | 269 | double pushout = Util::assertType<double>(parser.text(base+"pushout 0")); | ||
2080 | 270 | double suckback = Util::assertType<double>(parser.text(base+"suckback 0")); | ||
2081 | 271 | double suckbackDelay = Util::assertType<double>(parser.text(base+"suckbackDelay 0")); | ||
2082 | 272 | double clearance = Util::assertType<double>(parser.text(base+"clearance 0")); | ||
2083 | 273 | int pausePaths = Util::assertType<int>(parser.text(base+"pausePaths 0")); | ||
2084 | 274 | double pitch = Util::assertType<double>(parser.text(base+"pitch 0")); | ||
2085 | 275 | materialCalibrations[name] = MaterialCalibration(name,pathSpeed,pathWidth,depositionRate,pushout,suckback,suckbackDelay,clearance,pausePaths,pitch); | ||
2086 | 276 | } | ||
2087 | 277 | |||
2088 | 278 | //Load paths. | ||
2089 | 279 | unsigned int pathCount = parser.count("fabAtHomePrinter 0\\path"); | ||
2090 | 280 | for(unsigned int i = 0; i < pathCount; ++i) | ||
2091 | 281 | { | ||
2092 | 282 | string iBase = "fabAtHomePrinter 0\\path "+Util::toString(i)+"\\"; | ||
2093 | 283 | string materialCalibrationName = parser.text(iBase+"materialCalibrationName 0"); | ||
2094 | 284 | if(materialCalibrations.find(materialCalibrationName) == materialCalibrations.end()) | ||
2095 | 285 | { | ||
2096 | 286 | return "A path references material calibration "+materialCalibrationName+" which has not been loaded."; | ||
2097 | 287 | } | ||
2098 | 288 | vector<Point> points; | ||
2099 | 289 | unsigned int pointCount = parser.count(iBase+"point"); | ||
2100 | 290 | for(unsigned int j = 0; j < pointCount; ++j) | ||
2101 | 291 | { | ||
2102 | 292 | string jBase = iBase+"point "+Util::toString(j)+"\\"; | ||
2103 | 293 | double x = Util::assertType<double>(parser.text(jBase+"x 0")); | ||
2104 | 294 | double y = Util::assertType<double>(parser.text(jBase+"y 0")); | ||
2105 | 295 | double z = Util::assertType<double>(parser.text(jBase+"z 0")); | ||
2106 | 296 | points.push_back(Point(x,y,z)); | ||
2107 | 297 | } | ||
2108 | 298 | model.paths.push_back(Path(&(materialCalibrations[materialCalibrationName]),points)); | ||
2109 | 299 | } | ||
2110 | 300 | |||
2111 | 301 | return ""; | ||
2112 | 302 | */ | ||
2113 | 303 | |||
2114 | 304 | } | 256 | } |
2115 | 305 | string FabAtHomePrinter::state() | 257 | string FabAtHomePrinter::state() |
2116 | 306 | { | 258 | { |
2117 | @@ -362,7 +314,7 @@ | |||
2118 | 362 | if(strcmp(child->Value(), "point") == 0) | 314 | if(strcmp(child->Value(), "point") == 0) |
2119 | 363 | { | 315 | { |
2120 | 364 | double x = Util::assertType<double>(child->FirstChild("x")->FirstChild()->Value()); | 316 | double x = Util::assertType<double>(child->FirstChild("x")->FirstChild()->Value()); |
2122 | 365 | double y = Util::assertType<double>(child->FirstChild("y")->FirstChild()->Value()); | 317 | double y = -Util::assertType<double>(child->FirstChild("y")->FirstChild()->Value()); |
2123 | 366 | double z = Util::assertType<double>(child->FirstChild("z")->FirstChild()->Value()); | 318 | double z = Util::assertType<double>(child->FirstChild("z")->FirstChild()->Value()); |
2124 | 367 | points.push_back(Point(x,y,z)); | 319 | points.push_back(Point(x,y,z)); |
2125 | 368 | } | 320 | } |
2126 | @@ -392,7 +344,10 @@ | |||
2127 | 392 | pausePathPoints.push_back(Point(start.x, start.y, start.z + PLATFORM_DELTA)); | 344 | pausePathPoints.push_back(Point(start.x, start.y, start.z + PLATFORM_DELTA)); |
2128 | 393 | executePath(Path(NULL,pausePathPoints),NULL,false); | 345 | executePath(Path(NULL,pausePathPoints),NULL,false); |
2129 | 394 | paused = true; | 346 | paused = true; |
2130 | 347 | printing = false; | ||
2131 | 395 | callWarning("Execution has been paused. Press OK to resume execution."); | 348 | callWarning("Execution has been paused. Press OK to resume execution."); |
2132 | 349 | pauseSemaphore.acquire(); | ||
2133 | 350 | printing = true; | ||
2134 | 396 | paused = false; | 351 | paused = false; |
2135 | 397 | //Move the platform up. | 352 | //Move the platform up. |
2136 | 398 | pausePathPoints.clear(); | 353 | pausePathPoints.clear(); |
2137 | @@ -415,21 +370,20 @@ | |||
2138 | 415 | 370 | ||
2139 | 416 | void FabAtHomePrinter::print() | 371 | void FabAtHomePrinter::print() |
2140 | 417 | { | 372 | { |
2142 | 418 | paused = false; | 373 | //Timer t; |
2143 | 374 | //t.start(); | ||
2144 | 419 | printing = true; | 375 | printing = true; |
2145 | 420 | pausePrintFlag = false; | 376 | pausePrintFlag = false; |
2146 | 421 | cancelPrintFlag = false; | 377 | cancelPrintFlag = false; |
2147 | 422 | redoPathFlag = false; | 378 | redoPathFlag = false; |
2153 | 423 | if (!initializePathMode()) | 379 | initializePathMode(); |
2154 | 424 | qDebug() << "failed to initialize path parameters"; | 380 | int currentPath = 0; |
2155 | 425 | unsigned int i = 0; | 381 | reportProgress(currentPath, displayText.c_str()); |
2151 | 426 | reportProgress(i, displayText.c_str()); | ||
2152 | 427 | |||
2156 | 428 | 382 | ||
2157 | 429 | //Iterate through the loaded paths and execute them. | 383 | //Iterate through the loaded paths and execute them. |
2159 | 430 | while(i < model.paths.size()) | 384 | while(currentPath < model.paths.size()) |
2160 | 431 | { | 385 | { |
2162 | 432 | Path path = model.paths[i]; //Copy construct the path to be executed. | 386 | Path path = model.paths[currentPath]; //Copy construct the path to be executed. |
2163 | 433 | 387 | ||
2164 | 434 | 388 | ||
2165 | 435 | //Find a bay with the required material calibration. | 389 | //Find a bay with the required material calibration. |
2166 | @@ -454,7 +408,7 @@ | |||
2167 | 454 | //Update the display text. | 408 | //Update the display text. |
2168 | 455 | 409 | ||
2169 | 456 | displayText = "Executing setup path."; | 410 | displayText = "Executing setup path."; |
2171 | 457 | reportProgress(i, displayText.c_str()); | 411 | reportProgress(currentPath, displayText.c_str()); |
2172 | 458 | 412 | ||
2173 | 459 | //Move from the current position to the beginning of the current path. | 413 | //Move from the current position to the beginning of the current path. |
2174 | 460 | Point start(axes["X"].motor->getPosition(), axes["Y"].motor->getPosition(), axes["Z"].motor->getPosition()); //The current position. | 414 | Point start(axes["X"].motor->getPosition(), axes["Y"].motor->getPosition(), axes["Z"].motor->getPosition()); //The current position. |
2175 | @@ -463,8 +417,8 @@ | |||
2176 | 463 | 417 | ||
2177 | 464 | //Update the display text. | 418 | //Update the display text. |
2178 | 465 | 419 | ||
2181 | 466 | displayText = "Executing path "+Util::toString<int>(i+1)+" of "+Util::toString<int>(model.paths.size())+"."; | 420 | displayText = "Executing path "+Util::toString<int>(currentPath+1)+" of "+Util::toString<int>(model.paths.size())+"."; |
2182 | 467 | reportProgress(i, displayText.c_str()); | 421 | reportProgress(currentPath, displayText.c_str()); |
2183 | 468 | 422 | ||
2184 | 469 | 423 | ||
2185 | 470 | //Execute the current path. | 424 | //Execute the current path. |
2186 | @@ -496,8 +450,8 @@ | |||
2187 | 496 | else | 450 | else |
2188 | 497 | { | 451 | { |
2189 | 498 | //Move on to the next path. | 452 | //Move on to the next path. |
2192 | 499 | ++i; | 453 | currentPath++; |
2193 | 500 | reportProgress(i, displayText.c_str()); | 454 | reportProgress(currentPath, displayText.c_str()); |
2194 | 501 | } | 455 | } |
2195 | 502 | } | 456 | } |
2196 | 503 | 457 | ||
2197 | @@ -511,18 +465,22 @@ | |||
2198 | 511 | { | 465 | { |
2199 | 512 | displayText = "Fabrication successfully completed."; | 466 | displayText = "Fabrication successfully completed."; |
2200 | 513 | } | 467 | } |
2202 | 514 | reportProgress(i, displayText.c_str()); | 468 | reportProgress(currentPath, displayText.c_str()); |
2203 | 515 | //Execution has stopped. Move the platform down. | 469 | //Execution has stopped. Move the platform down. |
2204 | 516 | Point start(axes["X"].motor->getPosition(), axes["Y"].motor->getPosition(), axes["Z"].motor->getPosition()); //The current position. | 470 | Point start(axes["X"].motor->getPosition(), axes["Y"].motor->getPosition(), axes["Z"].motor->getPosition()); //The current position. |
2205 | 517 | Point end(start.x, start.y, start.z + PLATFORM_DELTA); | 471 | Point end(start.x, start.y, start.z + PLATFORM_DELTA); |
2206 | 518 | executeSetupPath(start,end,0); | 472 | executeSetupPath(start,end,0); |
2207 | 519 | printing = false; | 473 | printing = false; |
2208 | 474 | resetPos(); | ||
2209 | 475 | finishedPrinting(); | ||
2210 | 476 | //clock_t endTime = std::clock(); | ||
2211 | 477 | //t.stop(); | ||
2212 | 478 | //qDebug() << t.getTime() << " seconds"; | ||
2213 | 520 | } | 479 | } |
2214 | 521 | 480 | ||
2215 | 522 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 481 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2216 | 523 | void FabAtHomePrinter::executePath(const Path& path, Bay* bay, const bool flowDuringPath) | 482 | void FabAtHomePrinter::executePath(const Path& path, Bay* bay, const bool flowDuringPath) |
2217 | 524 | { | 483 | { |
2218 | 525 | qDebug() << "executing path"; | ||
2219 | 526 | if(flowDuringPath) | 484 | if(flowDuringPath) |
2220 | 527 | { | 485 | { |
2221 | 528 | //Want to achieve a steady state during path execution so scale the path speed if necessary. Copied from model 1 code. | 486 | //Want to achieve a steady state during path execution so scale the path speed if necessary. Copied from model 1 code. |
2222 | @@ -588,12 +546,10 @@ | |||
2223 | 588 | axes["Y"].motor->waitMove(); | 546 | axes["Y"].motor->waitMove(); |
2224 | 589 | axes["Z"].motor->waitMove(); | 547 | axes["Z"].motor->waitMove(); |
2225 | 590 | } | 548 | } |
2226 | 591 | qDebug() << "done executing path"; | ||
2227 | 592 | } | 549 | } |
2228 | 593 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 550 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2229 | 594 | void FabAtHomePrinter::executePoints(const vector<Point>& points, Bay* bay, const bool flowDuringPath, double pushoutDistance, double pushoutVelocity, double standardDistance, double standardVelocity, double suckbackDistance, double suckbackVelocity, const Point& suckbackPoint) | 551 | void FabAtHomePrinter::executePoints(const vector<Point>& points, Bay* bay, const bool flowDuringPath, double pushoutDistance, double pushoutVelocity, double standardDistance, double standardVelocity, double suckbackDistance, double suckbackVelocity, const Point& suckbackPoint) |
2230 | 595 | { | 552 | { |
2231 | 596 | qDebug() << "executing points"; | ||
2232 | 597 | int currIndex = 0; | 553 | int currIndex = 0; |
2233 | 598 | int res = -1; | 554 | int res = -1; |
2234 | 599 | bool flowStarted = false; | 555 | bool flowStarted = false; |
2235 | @@ -608,7 +564,6 @@ | |||
2236 | 608 | //The next index to be added to the segment list is the most recent index that was added to the segment list. | 564 | //The next index to be added to the segment list is the most recent index that was added to the segment list. |
2237 | 609 | currIndex = res; | 565 | currIndex = res; |
2238 | 610 | } | 566 | } |
2239 | 611 | qDebug() << "done executing points"; | ||
2240 | 612 | } | 567 | } |
2241 | 613 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 568 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2242 | 614 | int FabAtHomePrinter::fillSegmentList(const vector<Point>& points, const int startIndex) | 569 | int FabAtHomePrinter::fillSegmentList(const vector<Point>& points, const int startIndex) |
2243 | @@ -637,40 +592,9 @@ | |||
2244 | 637 | return points.size()-1; | 592 | return points.size()-1; |
2245 | 638 | } | 593 | } |
2246 | 639 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 594 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2247 | 640 | //TODO: change mode so that the motor is set to "pathing" mode | ||
2248 | 641 | void FabAtHomePrinter::downloadSegmentList(Bay* bay, const bool startFlow, bool startSuckback, double pushoutDistance, double pushoutVelocity, double standardDistance, double standardVelocity, double suckbackDistance, double suckbackVelocity, const Point& suckbackPoint) | 595 | void FabAtHomePrinter::downloadSegmentList(Bay* bay, const bool startFlow, bool startSuckback, double pushoutDistance, double pushoutVelocity, double standardDistance, double standardVelocity, double suckbackDistance, double suckbackVelocity, const Point& suckbackPoint) |
2249 | 642 | { | 596 | { |
2281 | 643 | qDebug() << "downloading seg list"; | 597 | |
2251 | 644 | /* | ||
2252 | 645 | InitPath(); | ||
2253 | 646 | if(startFlow) | ||
2254 | 647 | { | ||
2255 | 648 | bay->motor->moveAbsolute(bay->motor->getCommandedPosition()-pushoutDistance,pushoutVelocity,PRINT_ACCELERATION); //Start pushout. | ||
2256 | 649 | } | ||
2257 | 650 | while(AddPathPoints() == -2) //Start movement. | ||
2258 | 651 | { | ||
2259 | 652 | } | ||
2260 | 653 | if(startFlow) | ||
2261 | 654 | { | ||
2262 | 655 | bay->motor->waitMove(); //Wait for bay movement to finish. | ||
2263 | 656 | bay->motor->moveAbsolute(bay->motor->getCommandedPosition()-standardDistance,standardVelocity,PRINT_ACCELERATION); //Start standard flow. | ||
2264 | 657 | } | ||
2265 | 658 | double xDiff, yDiff; | ||
2266 | 659 | //Move points to the path pointer buffer while handling suckback. | ||
2267 | 660 | while(AddPathPoints() != -1 || startSuckback) | ||
2268 | 661 | { | ||
2269 | 662 | if(startSuckback) | ||
2270 | 663 | { | ||
2271 | 664 | xDiff = suckbackPoint.x - axes["X"].motor->getPosition(); | ||
2272 | 665 | yDiff = suckbackPoint.y - axes["Y"].motor->getPosition(); | ||
2273 | 666 | if(xDiff*xDiff+yDiff*yDiff < 0.25) | ||
2274 | 667 | { | ||
2275 | 668 | bay->motor->moveAbsolute(bay->motor->getCommandedPosition()+suckbackDistance,suckbackVelocity,PRINT_ACCELERATION); //Start suckback. | ||
2276 | 669 | startSuckback = false; | ||
2277 | 670 | } | ||
2278 | 671 | } | ||
2279 | 672 | } | ||
2280 | 673 | */ | ||
2282 | 674 | InitPath(); | 598 | InitPath(); |
2283 | 675 | if(startFlow) | 599 | if(startFlow) |
2284 | 676 | { | 600 | { |
2285 | @@ -687,13 +611,11 @@ | |||
2286 | 687 | //Move points to the path pointer buffer while handling suckback. | 611 | //Move points to the path pointer buffer while handling suckback. |
2287 | 688 | double currX, currY, xDiff, yDiff; | 612 | double currX, currY, xDiff, yDiff; |
2288 | 689 | bool doneAddingPoints = false; | 613 | bool doneAddingPoints = false; |
2289 | 690 | qDebug() << "adding points "; | ||
2290 | 691 | while(!doneAddingPoints || startSuckback) | 614 | while(!doneAddingPoints || startSuckback) |
2291 | 692 | { | 615 | { |
2292 | 693 | if(!doneAddingPoints && AddPathPoints() == -1) | 616 | if(!doneAddingPoints && AddPathPoints() == -1) |
2293 | 694 | { | 617 | { |
2294 | 695 | doneAddingPoints = true; | 618 | doneAddingPoints = true; |
2295 | 696 | qDebug() << "done adding points"; | ||
2296 | 697 | } | 619 | } |
2297 | 698 | if(startSuckback) | 620 | if(startSuckback) |
2298 | 699 | { | 621 | { |
2299 | @@ -701,23 +623,22 @@ | |||
2300 | 701 | currY = axes["Y"].motor->getPosition(); | 623 | currY = axes["Y"].motor->getPosition(); |
2301 | 702 | xDiff = suckbackPoint.x - currX; | 624 | xDiff = suckbackPoint.x - currX; |
2302 | 703 | yDiff = suckbackPoint.y - currY; | 625 | yDiff = suckbackPoint.y - currY; |
2303 | 626 | |||
2304 | 704 | if(xDiff*xDiff+yDiff*yDiff < 0.25) | 627 | if(xDiff*xDiff+yDiff*yDiff < 0.25) |
2305 | 705 | { | 628 | { |
2306 | 706 | bay->motor->moveAbsolute(bay->motor->getCommandedPosition()+suckbackDistance,suckbackVelocity,PRINT_ACCELERATION); //Start suckback. | 629 | bay->motor->moveAbsolute(bay->motor->getCommandedPosition()+suckbackDistance,suckbackVelocity,PRINT_ACCELERATION); //Start suckback. |
2307 | 707 | startSuckback = false; | 630 | startSuckback = false; |
2308 | 708 | qDebug() << "suckback done"; | ||
2309 | 709 | } | 631 | } |
2310 | 632 | |||
2311 | 710 | } | 633 | } |
2312 | 711 | if(startSuckback && !axes["X"].motor->moving() && !axes["Y"].motor->moving() && !axes["Z"].motor->moving()) | 634 | if(startSuckback && !axes["X"].motor->moving() && !axes["Y"].motor->moving() && !axes["Z"].motor->moving()) |
2313 | 712 | { | 635 | { |
2314 | 713 | //We have not started suckback and have reached end of path so we may have tunneled through the suckback circle. Just do the suckback now. | 636 | //We have not started suckback and have reached end of path so we may have tunneled through the suckback circle. Just do the suckback now. |
2315 | 714 | bay->motor->moveAbsolute(bay->motor->getCommandedPosition()+suckbackDistance,suckbackVelocity,PRINT_ACCELERATION); //Start suckback. | 637 | bay->motor->moveAbsolute(bay->motor->getCommandedPosition()+suckbackDistance,suckbackVelocity,PRINT_ACCELERATION); //Start suckback. |
2316 | 715 | startSuckback = false; | 638 | startSuckback = false; |
2317 | 716 | qDebug() << "suckback done"; | ||
2318 | 717 | } | 639 | } |
2319 | 718 | 640 | ||
2320 | 719 | } | 641 | } |
2321 | 720 | qDebug() << "done download segment"; | ||
2322 | 721 | } | 642 | } |
2323 | 722 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 643 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2324 | 723 | bool FabAtHomePrinter::cleanUp() | 644 | bool FabAtHomePrinter::cleanUp() |
2325 | @@ -733,6 +654,7 @@ | |||
2326 | 733 | } | 654 | } |
2327 | 734 | if(result) | 655 | if(result) |
2328 | 735 | { | 656 | { |
2329 | 657 | NmcShutdown(); | ||
2330 | 736 | initialized = false; | 658 | initialized = false; |
2331 | 737 | } | 659 | } |
2332 | 738 | } | 660 | } |
2333 | @@ -792,7 +714,7 @@ | |||
2334 | 792 | } | 714 | } |
2335 | 793 | void FabAtHomePrinter::reset() | 715 | void FabAtHomePrinter::reset() |
2336 | 794 | { | 716 | { |
2338 | 795 | NmcHardReset(0xFF); | 717 | NmcHardReset(X_Y_Z_GROUP_ADDRESS); |
2339 | 796 | } | 718 | } |
2340 | 797 | 719 | ||
2341 | 798 | bool FabAtHomePrinter::isInitialized() | 720 | bool FabAtHomePrinter::isInitialized() |
2342 | 799 | 721 | ||
2343 | === modified file 'software/FabInterpreter/FabAtHomePrinter.h' | |||
2344 | --- software/FabInterpreter/FabAtHomePrinter.h 2010-07-23 20:12:14 +0000 | |||
2345 | +++ software/FabInterpreter/FabAtHomePrinter.h 2010-08-07 00:08:43 +0000 | |||
2346 | @@ -8,10 +8,13 @@ | |||
2347 | 8 | #include "Tool.h" | 8 | #include "Tool.h" |
2348 | 9 | //PIC-SERVO path header files | 9 | //PIC-SERVO path header files |
2349 | 10 | #include "path.h" | 10 | #include "path.h" |
2350 | 11 | #include "qdebug.h" | ||
2351 | 12 | #include <QSemaphore> | ||
2352 | 11 | 13 | ||
2353 | 12 | class FabAtHomePrinter : public QObject | 14 | class FabAtHomePrinter : public QObject |
2354 | 13 | { | 15 | { |
2355 | 14 | Q_OBJECT | 16 | Q_OBJECT |
2356 | 17 | |||
2357 | 15 | //CONSTANTS///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 18 | //CONSTANTS///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2358 | 16 | private: | 19 | private: |
2359 | 17 | byte X_Y_Z_GROUP_ADDRESS; | 20 | byte X_Y_Z_GROUP_ADDRESS; |
2360 | @@ -20,6 +23,7 @@ | |||
2361 | 20 | double PLATFORM_DELTA; | 23 | double PLATFORM_DELTA; |
2362 | 21 | double PRINT_ACCELERATION; //The acceleration that is used while printing. The unit of PRINT_ACCELERATION is U/(second^2). | 24 | double PRINT_ACCELERATION; //The acceleration that is used while printing. The unit of PRINT_ACCELERATION is U/(second^2). |
2363 | 22 | double OLD_MSPS; //Magic constant from line 58 of FabAtHomeParameters.h in model 1 code. Used to calculate values for pushout and suckback. | 25 | double OLD_MSPS; //Magic constant from line 58 of FabAtHomeParameters.h in model 1 code. Used to calculate values for pushout and suckback. |
2364 | 26 | QSemaphore pauseSemaphore; //A QSemaphore that is triggered once the current path has ended and the pause button was pressed | ||
2365 | 23 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 27 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2366 | 24 | private: | 28 | private: |
2367 | 25 | Model model; | 29 | Model model; |
2368 | @@ -97,8 +101,12 @@ | |||
2369 | 97 | //Returns: "" iff successful or an error message. | 101 | //Returns: "" iff successful or an error message. |
2370 | 98 | string loadFabFile(string filePath); | 102 | string loadFabFile(string filePath); |
2371 | 99 | 103 | ||
2372 | 104 | /** | ||
2373 | 105 | Returns the current state the printer is in out of "PRINTING," "IDLE," and "PAUSED" | ||
2374 | 106 | */ | ||
2375 | 100 | string state(); | 107 | string state(); |
2376 | 101 | 108 | ||
2377 | 109 | |||
2378 | 102 | //Initialize the printer. | 110 | //Initialize the printer. |
2379 | 103 | //Returns: "" if successful or an error message if failed. | 111 | //Returns: "" if successful or an error message if failed. |
2380 | 104 | string initialize(const string& configFilePath, string portLocation); | 112 | string initialize(const string& configFilePath, string portLocation); |
2381 | @@ -117,12 +125,19 @@ | |||
2382 | 117 | //Returns: True iff successful. | 125 | //Returns: True iff successful. |
2383 | 118 | bool cleanUp(void); | 126 | bool cleanUp(void); |
2384 | 119 | 127 | ||
2385 | 128 | /** | ||
2386 | 129 | Performs a "hard reset" with the current motors under the XYZ group address | ||
2387 | 130 | */ | ||
2388 | 120 | void reset(); | 131 | void reset(); |
2389 | 121 | 132 | ||
2390 | 133 | /** | ||
2391 | 134 | Checks to see if the current printer configuration is initialized with a valid configuration | ||
2392 | 135 | @return true if initialized, false otherwise | ||
2393 | 136 | */ | ||
2394 | 122 | bool isInitialized(); | 137 | bool isInitialized(); |
2395 | 123 | 138 | ||
2396 | 124 | //The destructor. | 139 | //The destructor. |
2398 | 125 | ~FabAtHomePrinter(void); | 140 | ~FabAtHomePrinter(void); |
2399 | 126 | 141 | ||
2400 | 127 | public slots: | 142 | public slots: |
2401 | 128 | 143 | ||
2402 | @@ -141,17 +156,31 @@ | |||
2403 | 141 | //Force stops motors | 156 | //Force stops motors |
2404 | 142 | void stopMotors(); | 157 | void stopMotors(); |
2405 | 143 | 158 | ||
2406 | 159 | /** | ||
2407 | 160 | Resets the positions of the axis motors | ||
2408 | 161 | */ | ||
2409 | 144 | void resetPos(); | 162 | void resetPos(); |
2410 | 145 | 163 | ||
2411 | 146 | signals: | 164 | signals: |
2412 | 147 | 165 | ||
2420 | 148 | void GUI_reportProgress(); | 166 | /** |
2421 | 149 | 167 | A signal that is issued throughout the print job to update the status of the printer | |
2422 | 150 | void reportProgress(int, QString); | 168 | @param i The current path |
2423 | 151 | 169 | @param str The current status of the printer to be printed to the screen | |
2424 | 152 | void callWarning(QString); | 170 | */ |
2425 | 153 | 171 | void reportProgress(int i, QString str); | |
2426 | 154 | friend class GUIComponentsThread; | 172 | |
2427 | 173 | /** | ||
2428 | 174 | Triggers a signal to call a message box to the screen | ||
2429 | 175 | @param str The text to be displayed in the message box | ||
2430 | 176 | */ | ||
2431 | 177 | void callWarning(QString str); | ||
2432 | 178 | |||
2433 | 179 | /** | ||
2434 | 180 | Issues a signal to mainwindow.cpp when done printing | ||
2435 | 181 | */ | ||
2436 | 182 | void finishedPrinting(); | ||
2437 | 183 | |||
2438 | 155 | }; | 184 | }; |
2439 | 156 | 185 | ||
2440 | 157 | #endif //ndef FABATHOMEPRINTER_H | 186 | #endif //ndef FABATHOMEPRINTER_H |
2441 | 158 | 187 | ||
2442 | === added file 'software/FabInterpreter/Interpreter' | |||
2443 | 159 | Binary files software/FabInterpreter/Interpreter 1970-01-01 00:00:00 +0000 and software/FabInterpreter/Interpreter 2010-08-07 00:08:43 +0000 differ | 188 | Binary files software/FabInterpreter/Interpreter 1970-01-01 00:00:00 +0000 and software/FabInterpreter/Interpreter 2010-08-07 00:08:43 +0000 differ |
2444 | === modified file 'software/FabInterpreter/Interpreter.app/Contents/MacOS/Interpreter' | |||
2445 | 160 | Binary files software/FabInterpreter/Interpreter.app/Contents/MacOS/Interpreter 2010-07-23 20:12:14 +0000 and software/FabInterpreter/Interpreter.app/Contents/MacOS/Interpreter 2010-08-07 00:08:43 +0000 differ | 189 | Binary files software/FabInterpreter/Interpreter.app/Contents/MacOS/Interpreter 2010-07-23 20:12:14 +0000 and software/FabInterpreter/Interpreter.app/Contents/MacOS/Interpreter 2010-08-07 00:08:43 +0000 differ |
2446 | === modified file 'software/FabInterpreter/Interpreter.pro' | |||
2447 | --- software/FabInterpreter/Interpreter.pro 2010-07-23 20:12:14 +0000 | |||
2448 | +++ software/FabInterpreter/Interpreter.pro 2010-08-07 00:08:43 +0000 | |||
2449 | @@ -3,9 +3,10 @@ | |||
2450 | 3 | # ------------------------------------------------- | 3 | # ------------------------------------------------- |
2451 | 4 | TARGET = Interpreter | 4 | TARGET = Interpreter |
2452 | 5 | TEMPLATE = app | 5 | TEMPLATE = app |
2456 | 6 | INCLUDEPATH += ../Common/JrKerr | 6 | INCLUDEPATH += ../Common/JrKerr \ |
2457 | 7 | TARGETDEPS = | 7 | ../Common/tinyxml |
2458 | 8 | #UI_DIR = ../ | 8 | DESTDIR = . |
2459 | 9 | # UI_DIR = ../ | ||
2460 | 9 | HEADERS += mainwindow.h \ | 10 | HEADERS += mainwindow.h \ |
2461 | 10 | Point.h \ | 11 | Point.h \ |
2462 | 11 | InterpreterPath.h \ | 12 | InterpreterPath.h \ |
2463 | @@ -34,5 +35,6 @@ | |||
2464 | 34 | printthread.cpp \ | 35 | printthread.cpp \ |
2465 | 35 | guicomponentsthread.cpp | 36 | guicomponentsthread.cpp |
2466 | 36 | FORMS += mainwindow.ui | 37 | FORMS += mainwindow.ui |
2467 | 38 | include("win_jrkerr.pro") | ||
2468 | 37 | include("jrkerr.pro") | 39 | include("jrkerr.pro") |
2469 | 38 | include("tinyxml.pro") | 40 | include("tinyxml.pro") |
2470 | 39 | 41 | ||
2471 | === modified file 'software/FabInterpreter/Interpreter.pro.user' | |||
2472 | --- software/FabInterpreter/Interpreter.pro.user 2010-07-23 20:12:14 +0000 | |||
2473 | +++ software/FabInterpreter/Interpreter.pro.user 2010-08-07 00:08:43 +0000 | |||
2474 | @@ -1,20 +1,24 @@ | |||
2475 | 1 | <!DOCTYPE QtCreatorProject> | 1 | <!DOCTYPE QtCreatorProject> |
2476 | 2 | <qtcreator> | 2 | <qtcreator> |
2477 | 3 | <data> | 3 | <data> |
2478 | 4 | <variable>RunConfiguration0-Arguments</variable> | ||
2479 | 5 | <valuelist type="QVariantList"/> | ||
2480 | 6 | </data> | ||
2481 | 7 | <data> | ||
2482 | 8 | <variable>RunConfiguration0-BaseEnvironmentBase</variable> | 4 | <variable>RunConfiguration0-BaseEnvironmentBase</variable> |
2488 | 9 | <value type="int">1</value> | 5 | <value type="int">2</value> |
2489 | 10 | </data> | 6 | </data> |
2490 | 11 | <data> | 7 | <data> |
2491 | 12 | <variable>RunConfiguration0-Executable</variable> | 8 | <variable>RunConfiguration0-CommandLineArguments</variable> |
2492 | 13 | <value type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/FabInterpreter/Interpreter.app</value> | 9 | <valuelist type="QVariantList"/> |
2493 | 10 | </data> | ||
2494 | 11 | <data> | ||
2495 | 12 | <variable>RunConfiguration0-ProFile</variable> | ||
2496 | 13 | <value type="QString">Interpreter.pro</value> | ||
2497 | 14 | </data> | 14 | </data> |
2498 | 15 | <data> | 15 | <data> |
2499 | 16 | <variable>RunConfiguration0-RunConfiguration.name</variable> | 16 | <variable>RunConfiguration0-RunConfiguration.name</variable> |
2501 | 17 | <value type="QString">Run /Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/FabInterpreter/Interpreter.app</value> | 17 | <value type="QString">Interpreter</value> |
2502 | 18 | </data> | ||
2503 | 19 | <data> | ||
2504 | 20 | <variable>RunConfiguration0-UseDyldImageSuffix</variable> | ||
2505 | 21 | <value type="bool">false</value> | ||
2506 | 18 | </data> | 22 | </data> |
2507 | 19 | <data> | 23 | <data> |
2508 | 20 | <variable>RunConfiguration0-UseTerminal</variable> | 24 | <variable>RunConfiguration0-UseTerminal</variable> |
2509 | @@ -23,69 +27,23 @@ | |||
2510 | 23 | <data> | 27 | <data> |
2511 | 24 | <variable>RunConfiguration0-UserEnvironmentChanges</variable> | 28 | <variable>RunConfiguration0-UserEnvironmentChanges</variable> |
2512 | 25 | <valuelist type="QVariantList"> | 29 | <valuelist type="QVariantList"> |
2514 | 26 | <value type="QString">DYLD_LIBRARY_PATH=/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/Common/JrKerr/src/build/</value> | 30 | <value type="QString">DYLD_LIBRARY_PATH=/Users/jcman912/Documents/Fab@Home/Interpreter/software/Common/JrKerr/src/build/</value> |
2515 | 27 | </valuelist> | 31 | </valuelist> |
2516 | 28 | </data> | 32 | </data> |
2517 | 29 | <data> | 33 | <data> |
2518 | 30 | <variable>RunConfiguration0-UserName</variable> | ||
2519 | 31 | <value type="QString"></value> | ||
2520 | 32 | </data> | ||
2521 | 33 | <data> | ||
2522 | 34 | <variable>RunConfiguration0-UserSetName</variable> | 34 | <variable>RunConfiguration0-UserSetName</variable> |
2523 | 35 | <value type="bool">false</value> | 35 | <value type="bool">false</value> |
2524 | 36 | </data> | 36 | </data> |
2525 | 37 | <data> | 37 | <data> |
2528 | 38 | <variable>RunConfiguration0-WorkingDirectory</variable> | 38 | <variable>RunConfiguration0-UserSetWorkingDirectory</variable> |
2529 | 39 | <value type="QString">$BUILDDIR</value> | 39 | <value type="bool">false</value> |
2530 | 40 | </data> | ||
2531 | 41 | <data> | ||
2532 | 42 | <variable>RunConfiguration0-UserWorkingDirectory</variable> | ||
2533 | 43 | <value type="QString"></value> | ||
2534 | 40 | </data> | 44 | </data> |
2535 | 41 | <data> | 45 | <data> |
2536 | 42 | <variable>RunConfiguration0-type</variable> | 46 | <variable>RunConfiguration0-type</variable> |
2537 | 43 | <value type="QString">ProjectExplorer.CustomExecutableRunConfiguration</value> | ||
2538 | 44 | </data> | ||
2539 | 45 | <data> | ||
2540 | 46 | <variable>RunConfiguration1-BaseEnvironmentBase</variable> | ||
2541 | 47 | <value type="int">2</value> | ||
2542 | 48 | </data> | ||
2543 | 49 | <data> | ||
2544 | 50 | <variable>RunConfiguration1-CommandLineArguments</variable> | ||
2545 | 51 | <valuelist type="QVariantList"/> | ||
2546 | 52 | </data> | ||
2547 | 53 | <data> | ||
2548 | 54 | <variable>RunConfiguration1-ProFile</variable> | ||
2549 | 55 | <value type="QString">Interpreter.pro</value> | ||
2550 | 56 | </data> | ||
2551 | 57 | <data> | ||
2552 | 58 | <variable>RunConfiguration1-RunConfiguration.name</variable> | ||
2553 | 59 | <value type="QString">Interpreter</value> | ||
2554 | 60 | </data> | ||
2555 | 61 | <data> | ||
2556 | 62 | <variable>RunConfiguration1-UseDyldImageSuffix</variable> | ||
2557 | 63 | <value type="bool">false</value> | ||
2558 | 64 | </data> | ||
2559 | 65 | <data> | ||
2560 | 66 | <variable>RunConfiguration1-UseTerminal</variable> | ||
2561 | 67 | <value type="bool">false</value> | ||
2562 | 68 | </data> | ||
2563 | 69 | <data> | ||
2564 | 70 | <variable>RunConfiguration1-UserEnvironmentChanges</variable> | ||
2565 | 71 | <valuelist type="QVariantList"> | ||
2566 | 72 | <value type="QString">DYLD_LIBRARY_PATH=/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/Common/JrKerr/src/build</value> | ||
2567 | 73 | </valuelist> | ||
2568 | 74 | </data> | ||
2569 | 75 | <data> | ||
2570 | 76 | <variable>RunConfiguration1-UserSetName</variable> | ||
2571 | 77 | <value type="bool">false</value> | ||
2572 | 78 | </data> | ||
2573 | 79 | <data> | ||
2574 | 80 | <variable>RunConfiguration1-UserSetWorkingDirectory</variable> | ||
2575 | 81 | <value type="bool">false</value> | ||
2576 | 82 | </data> | ||
2577 | 83 | <data> | ||
2578 | 84 | <variable>RunConfiguration1-UserWorkingDirectory</variable> | ||
2579 | 85 | <value type="QString"></value> | ||
2580 | 86 | </data> | ||
2581 | 87 | <data> | ||
2582 | 88 | <variable>RunConfiguration1-type</variable> | ||
2583 | 89 | <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value> | 47 | <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value> |
2584 | 90 | </data> | 48 | </data> |
2585 | 91 | <data> | 49 | <data> |
2586 | @@ -122,28 +80,28 @@ | |||
2587 | 122 | <valuemap type="QVariantMap"> | 80 | <valuemap type="QVariantMap"> |
2588 | 123 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | 81 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> |
2589 | 124 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | 82 | <valuelist key="abstractProcess.Environment" type="QVariantList"> |
2591 | 125 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-Qfrwoi/Render</value> | 83 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> |
2592 | 126 | <value type="QString">COMMAND_MODE=unix2003</value> | 84 | <value type="QString">COMMAND_MODE=unix2003</value> |
2594 | 127 | <value type="QString">DISPLAY=/tmp/launch-KgZP25/:0</value> | 85 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> |
2595 | 128 | <value type="QString">HOME=/Users/jcman912</value> | 86 | <value type="QString">HOME=/Users/jcman912</value> |
2596 | 129 | <value type="QString">LOGNAME=jcman912</value> | 87 | <value type="QString">LOGNAME=jcman912</value> |
2597 | 130 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | 88 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> |
2598 | 131 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | 89 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> |
2599 | 132 | <value type="QString">SHELL=/bin/bash</value> | 90 | <value type="QString">SHELL=/bin/bash</value> |
2601 | 133 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-baFiI1/Listeners</value> | 91 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> |
2602 | 134 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | 92 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> |
2603 | 135 | <value type="QString">USER=jcman912</value> | 93 | <value type="QString">USER=jcman912</value> |
2604 | 136 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | 94 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> |
2605 | 137 | </valuelist> | 95 | </valuelist> |
2606 | 138 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | 96 | <valuelist key="abstractProcess.arguments" type="QVariantList"> |
2608 | 139 | <value type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/FabInterpreter/Interpreter.pro</value> | 97 | <value type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter/Interpreter.pro</value> |
2609 | 140 | <value type="QString">-spec</value> | 98 | <value type="QString">-spec</value> |
2610 | 141 | <value type="QString">macx-g++</value> | 99 | <value type="QString">macx-g++</value> |
2611 | 142 | <value type="QString">-r</value> | 100 | <value type="QString">-r</value> |
2612 | 143 | </valuelist> | 101 | </valuelist> |
2613 | 144 | <value key="abstractProcess.command" type="QString">/usr/bin/qmake</value> | 102 | <value key="abstractProcess.command" type="QString">/usr/bin/qmake</value> |
2614 | 145 | <value key="abstractProcess.enabled" type="bool">false</value> | 103 | <value key="abstractProcess.enabled" type="bool">false</value> |
2616 | 146 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/FabInterpreter</value> | 104 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter</value> |
2617 | 147 | <valuelist key="qmakeArgs" type="QVariantList"/> | 105 | <valuelist key="qmakeArgs" type="QVariantList"/> |
2618 | 148 | </valuemap> | 106 | </valuemap> |
2619 | 149 | </data> | 107 | </data> |
2620 | @@ -152,15 +110,15 @@ | |||
2621 | 152 | <valuemap type="QVariantMap"> | 110 | <valuemap type="QVariantMap"> |
2622 | 153 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | 111 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> |
2623 | 154 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | 112 | <valuelist key="abstractProcess.Environment" type="QVariantList"> |
2625 | 155 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-Qfrwoi/Render</value> | 113 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> |
2626 | 156 | <value type="QString">COMMAND_MODE=unix2003</value> | 114 | <value type="QString">COMMAND_MODE=unix2003</value> |
2628 | 157 | <value type="QString">DISPLAY=/tmp/launch-KgZP25/:0</value> | 115 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> |
2629 | 158 | <value type="QString">HOME=/Users/jcman912</value> | 116 | <value type="QString">HOME=/Users/jcman912</value> |
2630 | 159 | <value type="QString">LOGNAME=jcman912</value> | 117 | <value type="QString">LOGNAME=jcman912</value> |
2631 | 160 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | 118 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> |
2632 | 161 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | 119 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> |
2633 | 162 | <value type="QString">SHELL=/bin/bash</value> | 120 | <value type="QString">SHELL=/bin/bash</value> |
2635 | 163 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-baFiI1/Listeners</value> | 121 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> |
2636 | 164 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | 122 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> |
2637 | 165 | <value type="QString">USER=jcman912</value> | 123 | <value type="QString">USER=jcman912</value> |
2638 | 166 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | 124 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> |
2639 | @@ -172,7 +130,7 @@ | |||
2640 | 172 | </valuelist> | 130 | </valuelist> |
2641 | 173 | <value key="abstractProcess.command" type="QString">/Developer/Tools/Qt/uic</value> | 131 | <value key="abstractProcess.command" type="QString">/Developer/Tools/Qt/uic</value> |
2642 | 174 | <value key="abstractProcess.enabled" type="bool">true</value> | 132 | <value key="abstractProcess.enabled" type="bool">true</value> |
2644 | 175 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/FabInterpreter</value> | 133 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter</value> |
2645 | 176 | <value key="workingDirectory" type="QString">$BUILDDIR</value> | 134 | <value key="workingDirectory" type="QString">$BUILDDIR</value> |
2646 | 177 | </valuemap> | 135 | </valuemap> |
2647 | 178 | </data> | 136 | </data> |
2648 | @@ -181,15 +139,15 @@ | |||
2649 | 181 | <valuemap type="QVariantMap"> | 139 | <valuemap type="QVariantMap"> |
2650 | 182 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | 140 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> |
2651 | 183 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | 141 | <valuelist key="abstractProcess.Environment" type="QVariantList"> |
2653 | 184 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-Qfrwoi/Render</value> | 142 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> |
2654 | 185 | <value type="QString">COMMAND_MODE=unix2003</value> | 143 | <value type="QString">COMMAND_MODE=unix2003</value> |
2656 | 186 | <value type="QString">DISPLAY=/tmp/launch-KgZP25/:0</value> | 144 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> |
2657 | 187 | <value type="QString">HOME=/Users/jcman912</value> | 145 | <value type="QString">HOME=/Users/jcman912</value> |
2658 | 188 | <value type="QString">LOGNAME=jcman912</value> | 146 | <value type="QString">LOGNAME=jcman912</value> |
2659 | 189 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | 147 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> |
2660 | 190 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | 148 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> |
2661 | 191 | <value type="QString">SHELL=/bin/bash</value> | 149 | <value type="QString">SHELL=/bin/bash</value> |
2663 | 192 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-baFiI1/Listeners</value> | 150 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> |
2664 | 193 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | 151 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> |
2665 | 194 | <value type="QString">USER=jcman912</value> | 152 | <value type="QString">USER=jcman912</value> |
2666 | 195 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | 153 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> |
2667 | @@ -200,7 +158,7 @@ | |||
2668 | 200 | </valuelist> | 158 | </valuelist> |
2669 | 201 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | 159 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> |
2670 | 202 | <value key="abstractProcess.enabled" type="bool">true</value> | 160 | <value key="abstractProcess.enabled" type="bool">true</value> |
2672 | 203 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/FabInterpreter</value> | 161 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter</value> |
2673 | 204 | <valuelist key="makeargs" type="QVariantList"/> | 162 | <valuelist key="makeargs" type="QVariantList"/> |
2674 | 205 | </valuemap> | 163 | </valuemap> |
2675 | 206 | </data> | 164 | </data> |
2676 | @@ -209,15 +167,15 @@ | |||
2677 | 209 | <valuemap type="QVariantMap"> | 167 | <valuemap type="QVariantMap"> |
2678 | 210 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | 168 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> |
2679 | 211 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | 169 | <valuelist key="abstractProcess.Environment" type="QVariantList"> |
2681 | 212 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-Qfrwoi/Render</value> | 170 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> |
2682 | 213 | <value type="QString">COMMAND_MODE=unix2003</value> | 171 | <value type="QString">COMMAND_MODE=unix2003</value> |
2684 | 214 | <value type="QString">DISPLAY=/tmp/launch-KgZP25/:0</value> | 172 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> |
2685 | 215 | <value type="QString">HOME=/Users/jcman912</value> | 173 | <value type="QString">HOME=/Users/jcman912</value> |
2686 | 216 | <value type="QString">LOGNAME=jcman912</value> | 174 | <value type="QString">LOGNAME=jcman912</value> |
2687 | 217 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | 175 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> |
2688 | 218 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | 176 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> |
2689 | 219 | <value type="QString">SHELL=/bin/bash</value> | 177 | <value type="QString">SHELL=/bin/bash</value> |
2691 | 220 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-baFiI1/Listeners</value> | 178 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> |
2692 | 221 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | 179 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> |
2693 | 222 | <value type="QString">USER=jcman912</value> | 180 | <value type="QString">USER=jcman912</value> |
2694 | 223 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | 181 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> |
2695 | @@ -229,7 +187,7 @@ | |||
2696 | 229 | </valuelist> | 187 | </valuelist> |
2697 | 230 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | 188 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> |
2698 | 231 | <value key="abstractProcess.enabled" type="bool">true</value> | 189 | <value key="abstractProcess.enabled" type="bool">true</value> |
2700 | 232 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/FabInterpreter</value> | 190 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter</value> |
2701 | 233 | <value key="makeCmd" type="QString"></value> | 191 | <value key="makeCmd" type="QString"></value> |
2702 | 234 | <valuelist key="makeargs" type="QVariantList"> | 192 | <valuelist key="makeargs" type="QVariantList"> |
2703 | 235 | <value type="QString">clean</value> | 193 | <value type="QString">clean</value> |
2704 | @@ -237,61 +195,121 @@ | |||
2705 | 237 | </valuemap> | 195 | </valuemap> |
2706 | 238 | </data> | 196 | </data> |
2707 | 239 | <data> | 197 | <data> |
2708 | 240 | <variable>buildconfiguration-Debug-cleanstep1</variable> | ||
2709 | 241 | <valuemap type="QVariantMap"> | ||
2710 | 242 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | ||
2711 | 243 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
2712 | 244 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-Qfrwoi/Render</value> | ||
2713 | 245 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
2714 | 246 | <value type="QString">DISPLAY=/tmp/launch-KgZP25/:0</value> | ||
2715 | 247 | <value type="QString">HOME=/Users/jcman912</value> | ||
2716 | 248 | <value type="QString">LOGNAME=jcman912</value> | ||
2717 | 249 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
2718 | 250 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
2719 | 251 | <value type="QString">SHELL=/bin/bash</value> | ||
2720 | 252 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-baFiI1/Listeners</value> | ||
2721 | 253 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
2722 | 254 | <value type="QString">USER=jcman912</value> | ||
2723 | 255 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
2724 | 256 | </valuelist> | ||
2725 | 257 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
2726 | 258 | <value type="QString">-f</value> | ||
2727 | 259 | <value type="QString">*</value> | ||
2728 | 260 | </valuelist> | ||
2729 | 261 | <value key="abstractProcess.command" type="QString">/bin/rm</value> | ||
2730 | 262 | <value key="abstractProcess.enabled" type="bool">true</value> | ||
2731 | 263 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/Common/JrKerr/src/build</value> | ||
2732 | 264 | <value key="workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Updated/Interpreter/software/Common/JrKerr/src/build</value> | ||
2733 | 265 | </valuemap> | ||
2734 | 266 | </data> | ||
2735 | 267 | <data> | ||
2736 | 268 | <variable>buildconfiguration-Release-buildstep0</variable> | 198 | <variable>buildconfiguration-Release-buildstep0</variable> |
2737 | 269 | <valuemap type="QVariantMap"> | 199 | <valuemap type="QVariantMap"> |
2738 | 270 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | 200 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> |
2739 | 201 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
2740 | 202 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> | ||
2741 | 203 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
2742 | 204 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> | ||
2743 | 205 | <value type="QString">HOME=/Users/jcman912</value> | ||
2744 | 206 | <value type="QString">LOGNAME=jcman912</value> | ||
2745 | 207 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
2746 | 208 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
2747 | 209 | <value type="QString">SHELL=/bin/bash</value> | ||
2748 | 210 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> | ||
2749 | 211 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
2750 | 212 | <value type="QString">USER=jcman912</value> | ||
2751 | 213 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
2752 | 214 | </valuelist> | ||
2753 | 215 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
2754 | 216 | <value type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter/Interpreter.pro</value> | ||
2755 | 217 | <value type="QString">-spec</value> | ||
2756 | 218 | <value type="QString">macx-g++</value> | ||
2757 | 219 | <value type="QString">-r</value> | ||
2758 | 220 | <value type="QString">CONFIG+=release</value> | ||
2759 | 221 | </valuelist> | ||
2760 | 222 | <value key="abstractProcess.command" type="QString">/usr/bin/qmake</value> | ||
2761 | 223 | <value key="abstractProcess.enabled" type="bool">false</value> | ||
2762 | 224 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter</value> | ||
2763 | 271 | </valuemap> | 225 | </valuemap> |
2764 | 272 | </data> | 226 | </data> |
2765 | 273 | <data> | 227 | <data> |
2766 | 274 | <variable>buildconfiguration-Release-buildstep1</variable> | 228 | <variable>buildconfiguration-Release-buildstep1</variable> |
2767 | 275 | <valuemap type="QVariantMap"> | 229 | <valuemap type="QVariantMap"> |
2768 | 276 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | 230 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> |
2769 | 231 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
2770 | 232 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> | ||
2771 | 233 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
2772 | 234 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> | ||
2773 | 235 | <value type="QString">HOME=/Users/jcman912</value> | ||
2774 | 236 | <value type="QString">LOGNAME=jcman912</value> | ||
2775 | 237 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
2776 | 238 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
2777 | 239 | <value type="QString">SHELL=/bin/bash</value> | ||
2778 | 240 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> | ||
2779 | 241 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
2780 | 242 | <value type="QString">USER=jcman912</value> | ||
2781 | 243 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
2782 | 244 | </valuelist> | ||
2783 | 245 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
2784 | 246 | <value type="QString">mainwindow.ui</value> | ||
2785 | 247 | <value type="QString">-o</value> | ||
2786 | 248 | <value type="QString">ui_mainwindow.h</value> | ||
2787 | 249 | </valuelist> | ||
2788 | 250 | <value key="abstractProcess.command" type="QString">/Developer/Tools/Qt/uic</value> | ||
2789 | 251 | <value key="abstractProcess.enabled" type="bool">true</value> | ||
2790 | 252 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter</value> | ||
2791 | 253 | <value key="workingDirectory" type="QString">$BUILDDIR</value> | ||
2792 | 277 | </valuemap> | 254 | </valuemap> |
2793 | 278 | </data> | 255 | </data> |
2794 | 279 | <data> | 256 | <data> |
2795 | 280 | <variable>buildconfiguration-Release-buildstep2</variable> | 257 | <variable>buildconfiguration-Release-buildstep2</variable> |
2796 | 281 | <valuemap type="QVariantMap"> | 258 | <valuemap type="QVariantMap"> |
2797 | 282 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | 259 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> |
2798 | 260 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
2799 | 261 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-2ujASn/Render</value> | ||
2800 | 262 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
2801 | 263 | <value type="QString">DISPLAY=/tmp/launch-G50hon/:0</value> | ||
2802 | 264 | <value type="QString">HOME=/Users/jcman912</value> | ||
2803 | 265 | <value type="QString">LOGNAME=jcman912</value> | ||
2804 | 266 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
2805 | 267 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
2806 | 268 | <value type="QString">SHELL=/bin/bash</value> | ||
2807 | 269 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-tnIbII/Listeners</value> | ||
2808 | 270 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
2809 | 271 | <value type="QString">USER=jcman912</value> | ||
2810 | 272 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
2811 | 273 | </valuelist> | ||
2812 | 274 | <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value> | ||
2813 | 275 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
2814 | 276 | <value type="QString">-w</value> | ||
2815 | 277 | </valuelist> | ||
2816 | 278 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | ||
2817 | 279 | <value key="abstractProcess.enabled" type="bool">true</value> | ||
2818 | 280 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter</value> | ||
2819 | 283 | </valuemap> | 281 | </valuemap> |
2820 | 284 | </data> | 282 | </data> |
2821 | 285 | <data> | 283 | <data> |
2822 | 286 | <variable>buildconfiguration-Release-cleanstep0</variable> | 284 | <variable>buildconfiguration-Release-cleanstep0</variable> |
2823 | 287 | <valuemap type="QVariantMap"> | 285 | <valuemap type="QVariantMap"> |
2824 | 288 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | 286 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> |
2831 | 289 | </valuemap> | 287 | <valuelist key="abstractProcess.Environment" type="QVariantList"> |
2832 | 290 | </data> | 288 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-yszs7Y/Render</value> |
2833 | 291 | <data> | 289 | <value type="QString">COMMAND_MODE=unix2003</value> |
2834 | 292 | <variable>buildconfiguration-Release-cleanstep1</variable> | 290 | <value type="QString">DISPLAY=/tmp/launch-KnoFzX/:0</value> |
2835 | 293 | <valuemap type="QVariantMap"> | 291 | <value type="QString">HOME=/Users/jcman912</value> |
2836 | 294 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | 292 | <value type="QString">LOGNAME=jcman912</value> |
2837 | 293 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
2838 | 294 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
2839 | 295 | <value type="QString">SHELL=/bin/bash</value> | ||
2840 | 296 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-qLeScv/Listeners</value> | ||
2841 | 297 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
2842 | 298 | <value type="QString">USER=jcman912</value> | ||
2843 | 299 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
2844 | 300 | </valuelist> | ||
2845 | 301 | <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value> | ||
2846 | 302 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
2847 | 303 | <value type="QString">clean</value> | ||
2848 | 304 | <value type="QString">-w</value> | ||
2849 | 305 | </valuelist> | ||
2850 | 306 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | ||
2851 | 307 | <value key="abstractProcess.enabled" type="bool">true</value> | ||
2852 | 308 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter/software/FabInterpreter</value> | ||
2853 | 309 | <value key="makeCmd" type="QString"></value> | ||
2854 | 310 | <valuelist key="makeargs" type="QVariantList"> | ||
2855 | 311 | <value type="QString">clean</value> | ||
2856 | 312 | </valuelist> | ||
2857 | 295 | </valuemap> | 313 | </valuemap> |
2858 | 296 | </data> | 314 | </data> |
2859 | 297 | <data> | 315 | <data> |
2860 | @@ -336,16 +354,9 @@ | |||
2861 | 336 | </valuemap> | 354 | </valuemap> |
2862 | 337 | </data> | 355 | </data> |
2863 | 338 | <data> | 356 | <data> |
2864 | 339 | <variable>cleanstep1</variable> | ||
2865 | 340 | <valuemap type="QVariantMap"> | ||
2866 | 341 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value> | ||
2867 | 342 | </valuemap> | ||
2868 | 343 | </data> | ||
2869 | 344 | <data> | ||
2870 | 345 | <variable>cleansteps</variable> | 357 | <variable>cleansteps</variable> |
2871 | 346 | <valuelist type="QVariantList"> | 358 | <valuelist type="QVariantList"> |
2872 | 347 | <value type="QString">trolltech.qt4projectmanager.make</value> | 359 | <value type="QString">trolltech.qt4projectmanager.make</value> |
2873 | 348 | <value type="QString">projectexplorer.processstep</value> | ||
2874 | 349 | </valuelist> | 360 | </valuelist> |
2875 | 350 | </data> | 361 | </data> |
2876 | 351 | <data> | 362 | <data> |
2877 | 352 | 363 | ||
2878 | === modified file 'software/FabInterpreter/Makefile' | |||
2879 | --- software/FabInterpreter/Makefile 2010-07-23 20:12:14 +0000 | |||
2880 | +++ software/FabInterpreter/Makefile 2010-08-07 00:08:43 +0000 | |||
2881 | @@ -1,6 +1,6 @@ | |||
2882 | 1 | ############################################################################# | 1 | ############################################################################# |
2883 | 2 | # Makefile for building: Interpreter.app/Contents/MacOS/Interpreter | 2 | # Makefile for building: Interpreter.app/Contents/MacOS/Interpreter |
2885 | 3 | # Generated by qmake (2.01a) (Qt 4.6.3) on: Fri Jul 23 10:28:33 2010 | 3 | # Generated by qmake (2.01a) (Qt 4.6.3) on: Thu Aug 5 14:50:42 2010 |
2886 | 4 | # Project: Interpreter.pro | 4 | # Project: Interpreter.pro |
2887 | 5 | # Template: app | 5 | # Template: app |
2888 | 6 | # Command: /usr/bin/qmake -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile Interpreter.pro | 6 | # Command: /usr/bin/qmake -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile Interpreter.pro |
2889 | @@ -13,7 +13,7 @@ | |||
2890 | 13 | DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED | 13 | DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED |
2891 | 14 | CFLAGS = -pipe -g -gdwarf-2 -arch i386 -Wall -W $(DEFINES) | 14 | CFLAGS = -pipe -g -gdwarf-2 -arch i386 -Wall -W $(DEFINES) |
2892 | 15 | CXXFLAGS = -pipe -g -gdwarf-2 -arch i386 -Wall -W $(DEFINES) | 15 | CXXFLAGS = -pipe -g -gdwarf-2 -arch i386 -Wall -W $(DEFINES) |
2894 | 16 | INCPATH = -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I../Common/JrKerr -I../Common/JrKerr/src -I. -I. -F/Library/Frameworks | 16 | INCPATH = -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I../Common/JrKerr -I../Common/tinyxml -I../Common/JrKerr/src -I. -I. -F/Library/Frameworks |
2895 | 17 | LINK = g++ | 17 | LINK = g++ |
2896 | 18 | LFLAGS = -headerpad_max_install_names -arch i386 | 18 | LFLAGS = -headerpad_max_install_names -arch i386 |
2897 | 19 | LIBS = $(SUBLIBS) -F/Library/Frameworks -L../Common/JrKerr/src/build -L/Library/Frameworks -lqextserialportd -framework QtGui -framework QtCore | 19 | LIBS = $(SUBLIBS) -F/Library/Frameworks -L../Common/JrKerr/src/build -L/Library/Frameworks -lqextserialportd -framework QtGui -framework QtCore |
2898 | @@ -66,7 +66,8 @@ | |||
2899 | 66 | ../Common/tinyxml/tinyxml.cpp \ | 66 | ../Common/tinyxml/tinyxml.cpp \ |
2900 | 67 | ../Common/tinyxml/tinyxmlerror.cpp \ | 67 | ../Common/tinyxml/tinyxmlerror.cpp \ |
2901 | 68 | ../Common/tinyxml/tinyxmlparser.cpp moc_mainwindow.cpp \ | 68 | ../Common/tinyxml/tinyxmlparser.cpp moc_mainwindow.cpp \ |
2903 | 69 | moc_FabAtHomePrinter.cpp | 69 | moc_FabAtHomePrinter.cpp \ |
2904 | 70 | moc_guicomponentsthread.cpp | ||
2905 | 70 | OBJECTS = main.o \ | 71 | OBJECTS = main.o \ |
2906 | 71 | Point.o \ | 72 | Point.o \ |
2907 | 72 | InterpreterPath.o \ | 73 | InterpreterPath.o \ |
2908 | @@ -90,7 +91,8 @@ | |||
2909 | 90 | tinyxmlerror.o \ | 91 | tinyxmlerror.o \ |
2910 | 91 | tinyxmlparser.o \ | 92 | tinyxmlparser.o \ |
2911 | 92 | moc_mainwindow.o \ | 93 | moc_mainwindow.o \ |
2913 | 93 | moc_FabAtHomePrinter.o | 94 | moc_FabAtHomePrinter.o \ |
2914 | 95 | moc_guicomponentsthread.o | ||
2915 | 94 | DIST = /usr/local/Qt4.6/mkspecs/common/unix.conf \ | 96 | DIST = /usr/local/Qt4.6/mkspecs/common/unix.conf \ |
2916 | 95 | /usr/local/Qt4.6/mkspecs/common/mac.conf \ | 97 | /usr/local/Qt4.6/mkspecs/common/mac.conf \ |
2917 | 96 | /usr/local/Qt4.6/mkspecs/common/mac-g++.conf \ | 98 | /usr/local/Qt4.6/mkspecs/common/mac-g++.conf \ |
2918 | @@ -263,13 +265,11 @@ | |||
2919 | 263 | 265 | ||
2920 | 264 | compiler_objective_c_make_all: | 266 | compiler_objective_c_make_all: |
2921 | 265 | compiler_objective_c_clean: | 267 | compiler_objective_c_clean: |
2923 | 266 | compiler_moc_header_make_all: moc_mainwindow.cpp moc_FabAtHomePrinter.cpp | 268 | compiler_moc_header_make_all: moc_mainwindow.cpp moc_FabAtHomePrinter.cpp moc_guicomponentsthread.cpp |
2924 | 267 | compiler_moc_header_clean: | 269 | compiler_moc_header_clean: |
2926 | 268 | -$(DEL_FILE) moc_mainwindow.cpp moc_FabAtHomePrinter.cpp | 270 | -$(DEL_FILE) moc_mainwindow.cpp moc_FabAtHomePrinter.cpp moc_guicomponentsthread.cpp |
2927 | 269 | moc_mainwindow.cpp: Util.h \ | 271 | moc_mainwindow.cpp: Util.h \ |
2928 | 270 | ../Common/JrKerr/nmccom.h \ | 272 | ../Common/JrKerr/nmccom.h \ |
2929 | 271 | ../Common/tinyxml/tinyxml.h \ | ||
2930 | 272 | ../Common/tinyxml/tinystr.h \ | ||
2931 | 273 | Axis.h \ | 273 | Axis.h \ |
2932 | 274 | Motor.h \ | 274 | Motor.h \ |
2933 | 275 | ../Common/JrKerr/path.h \ | 275 | ../Common/JrKerr/path.h \ |
2934 | @@ -291,8 +291,6 @@ | |||
2935 | 291 | Motor.h \ | 291 | Motor.h \ |
2936 | 292 | Util.h \ | 292 | Util.h \ |
2937 | 293 | ../Common/JrKerr/nmccom.h \ | 293 | ../Common/JrKerr/nmccom.h \ |
2938 | 294 | ../Common/tinyxml/tinyxml.h \ | ||
2939 | 295 | ../Common/tinyxml/tinystr.h \ | ||
2940 | 296 | ../Common/JrKerr/path.h \ | 294 | ../Common/JrKerr/path.h \ |
2941 | 297 | ../Common/JrKerr/picservo.h \ | 295 | ../Common/JrKerr/picservo.h \ |
2942 | 298 | Model.h \ | 296 | Model.h \ |
2943 | @@ -304,6 +302,22 @@ | |||
2944 | 304 | FabAtHomePrinter.h | 302 | FabAtHomePrinter.h |
2945 | 305 | /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ FabAtHomePrinter.h -o moc_FabAtHomePrinter.cpp | 303 | /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ FabAtHomePrinter.h -o moc_FabAtHomePrinter.cpp |
2946 | 306 | 304 | ||
2947 | 305 | moc_guicomponentsthread.cpp: FabAtHomePrinter.h \ | ||
2948 | 306 | Axis.h \ | ||
2949 | 307 | Motor.h \ | ||
2950 | 308 | Util.h \ | ||
2951 | 309 | ../Common/JrKerr/nmccom.h \ | ||
2952 | 310 | ../Common/JrKerr/path.h \ | ||
2953 | 311 | ../Common/JrKerr/picservo.h \ | ||
2954 | 312 | Model.h \ | ||
2955 | 313 | InterpreterPath.h \ | ||
2956 | 314 | Point.h \ | ||
2957 | 315 | Tool.h \ | ||
2958 | 316 | Bay.h \ | ||
2959 | 317 | MaterialCalibration.h \ | ||
2960 | 318 | guicomponentsthread.h | ||
2961 | 319 | /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ guicomponentsthread.h -o moc_guicomponentsthread.cpp | ||
2962 | 320 | |||
2963 | 307 | compiler_rcc_make_all: | 321 | compiler_rcc_make_all: |
2964 | 308 | compiler_rcc_clean: | 322 | compiler_rcc_clean: |
2965 | 309 | compiler_image_collection_make_all: qmake_image_collection.cpp | 323 | compiler_image_collection_make_all: qmake_image_collection.cpp |
2966 | @@ -332,8 +346,6 @@ | |||
2967 | 332 | main.o: main.cpp mainwindow.h \ | 346 | main.o: main.cpp mainwindow.h \ |
2968 | 333 | Util.h \ | 347 | Util.h \ |
2969 | 334 | ../Common/JrKerr/nmccom.h \ | 348 | ../Common/JrKerr/nmccom.h \ |
2970 | 335 | ../Common/tinyxml/tinyxml.h \ | ||
2971 | 336 | ../Common/tinyxml/tinystr.h \ | ||
2972 | 337 | Axis.h \ | 349 | Axis.h \ |
2973 | 338 | Motor.h \ | 350 | Motor.h \ |
2974 | 339 | ../Common/JrKerr/path.h \ | 351 | ../Common/JrKerr/path.h \ |
2975 | @@ -352,16 +364,12 @@ | |||
2976 | 352 | 364 | ||
2977 | 353 | Point.o: Point.cpp Point.h \ | 365 | Point.o: Point.cpp Point.h \ |
2978 | 354 | Util.h \ | 366 | Util.h \ |
2982 | 355 | ../Common/JrKerr/nmccom.h \ | 367 | ../Common/JrKerr/nmccom.h |
2980 | 356 | ../Common/tinyxml/tinyxml.h \ | ||
2981 | 357 | ../Common/tinyxml/tinystr.h | ||
2983 | 358 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Point.o Point.cpp | 368 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Point.o Point.cpp |
2984 | 359 | 369 | ||
2985 | 360 | InterpreterPath.o: InterpreterPath.cpp InterpreterPath.h \ | 370 | InterpreterPath.o: InterpreterPath.cpp InterpreterPath.h \ |
2986 | 361 | Util.h \ | 371 | Util.h \ |
2987 | 362 | ../Common/JrKerr/nmccom.h \ | 372 | ../Common/JrKerr/nmccom.h \ |
2988 | 363 | ../Common/tinyxml/tinyxml.h \ | ||
2989 | 364 | ../Common/tinyxml/tinystr.h \ | ||
2990 | 365 | Point.h \ | 373 | Point.h \ |
2991 | 366 | Tool.h \ | 374 | Tool.h \ |
2992 | 367 | Bay.h \ | 375 | Bay.h \ |
2993 | @@ -374,8 +382,6 @@ | |||
2994 | 374 | Motor.o: Motor.cpp Motor.h \ | 382 | Motor.o: Motor.cpp Motor.h \ |
2995 | 375 | Util.h \ | 383 | Util.h \ |
2996 | 376 | ../Common/JrKerr/nmccom.h \ | 384 | ../Common/JrKerr/nmccom.h \ |
2997 | 377 | ../Common/tinyxml/tinyxml.h \ | ||
2998 | 378 | ../Common/tinyxml/tinystr.h \ | ||
2999 | 379 | ../Common/JrKerr/path.h \ | 385 | ../Common/JrKerr/path.h \ |
3000 | 380 | ../Common/JrKerr/picservo.h | 386 | ../Common/JrKerr/picservo.h |
3001 | 381 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Motor.o Motor.cpp | 387 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Motor.o Motor.cpp |
3002 | @@ -383,8 +389,6 @@ | |||
3003 | 383 | Model.o: Model.cpp Model.h \ | 389 | Model.o: Model.cpp Model.h \ |
3004 | 384 | Util.h \ | 390 | Util.h \ |
3005 | 385 | ../Common/JrKerr/nmccom.h \ | 391 | ../Common/JrKerr/nmccom.h \ |
3006 | 386 | ../Common/tinyxml/tinyxml.h \ | ||
3007 | 387 | ../Common/tinyxml/tinystr.h \ | ||
3008 | 388 | InterpreterPath.h \ | 392 | InterpreterPath.h \ |
3009 | 389 | Point.h \ | 393 | Point.h \ |
3010 | 390 | Tool.h \ | 394 | Tool.h \ |
3011 | @@ -397,9 +401,7 @@ | |||
3012 | 397 | 401 | ||
3013 | 398 | MaterialCalibration.o: MaterialCalibration.cpp MaterialCalibration.h \ | 402 | MaterialCalibration.o: MaterialCalibration.cpp MaterialCalibration.h \ |
3014 | 399 | Util.h \ | 403 | Util.h \ |
3018 | 400 | ../Common/JrKerr/nmccom.h \ | 404 | ../Common/JrKerr/nmccom.h |
3016 | 401 | ../Common/tinyxml/tinyxml.h \ | ||
3017 | 402 | ../Common/tinyxml/tinystr.h | ||
3019 | 403 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o MaterialCalibration.o MaterialCalibration.cpp | 405 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o MaterialCalibration.o MaterialCalibration.cpp |
3020 | 404 | 406 | ||
3021 | 405 | FabAtHomePrinter.o: FabAtHomePrinter.cpp FabAtHomePrinter.h \ | 407 | FabAtHomePrinter.o: FabAtHomePrinter.cpp FabAtHomePrinter.h \ |
3022 | @@ -407,8 +409,6 @@ | |||
3023 | 407 | Motor.h \ | 409 | Motor.h \ |
3024 | 408 | Util.h \ | 410 | Util.h \ |
3025 | 409 | ../Common/JrKerr/nmccom.h \ | 411 | ../Common/JrKerr/nmccom.h \ |
3026 | 410 | ../Common/tinyxml/tinyxml.h \ | ||
3027 | 411 | ../Common/tinyxml/tinystr.h \ | ||
3028 | 412 | ../Common/JrKerr/path.h \ | 412 | ../Common/JrKerr/path.h \ |
3029 | 413 | ../Common/JrKerr/picservo.h \ | 413 | ../Common/JrKerr/picservo.h \ |
3030 | 414 | Model.h \ | 414 | Model.h \ |
3031 | @@ -423,8 +423,6 @@ | |||
3032 | 423 | Motor.h \ | 423 | Motor.h \ |
3033 | 424 | Util.h \ | 424 | Util.h \ |
3034 | 425 | ../Common/JrKerr/nmccom.h \ | 425 | ../Common/JrKerr/nmccom.h \ |
3035 | 426 | ../Common/tinyxml/tinyxml.h \ | ||
3036 | 427 | ../Common/tinyxml/tinystr.h \ | ||
3037 | 428 | ../Common/JrKerr/path.h \ | 426 | ../Common/JrKerr/path.h \ |
3038 | 429 | ../Common/JrKerr/picservo.h \ | 427 | ../Common/JrKerr/picservo.h \ |
3039 | 430 | Point.h \ | 428 | Point.h \ |
3040 | @@ -435,8 +433,6 @@ | |||
3041 | 435 | Motor.h \ | 433 | Motor.h \ |
3042 | 436 | Util.h \ | 434 | Util.h \ |
3043 | 437 | ../Common/JrKerr/nmccom.h \ | 435 | ../Common/JrKerr/nmccom.h \ |
3044 | 438 | ../Common/tinyxml/tinyxml.h \ | ||
3045 | 439 | ../Common/tinyxml/tinystr.h \ | ||
3046 | 440 | ../Common/JrKerr/path.h \ | 436 | ../Common/JrKerr/path.h \ |
3047 | 441 | ../Common/JrKerr/picservo.h | 437 | ../Common/JrKerr/picservo.h |
3048 | 442 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Axis.o Axis.cpp | 438 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Axis.o Axis.cpp |
3049 | @@ -444,8 +440,6 @@ | |||
3050 | 444 | Tool.o: Tool.cpp Tool.h \ | 440 | Tool.o: Tool.cpp Tool.h \ |
3051 | 445 | Util.h \ | 441 | Util.h \ |
3052 | 446 | ../Common/JrKerr/nmccom.h \ | 442 | ../Common/JrKerr/nmccom.h \ |
3053 | 447 | ../Common/tinyxml/tinyxml.h \ | ||
3054 | 448 | ../Common/tinyxml/tinystr.h \ | ||
3055 | 449 | Bay.h \ | 443 | Bay.h \ |
3056 | 450 | Motor.h \ | 444 | Motor.h \ |
3057 | 451 | ../Common/JrKerr/path.h \ | 445 | ../Common/JrKerr/path.h \ |
3058 | @@ -457,8 +451,6 @@ | |||
3059 | 457 | mainwindow.o: mainwindow.cpp mainwindow.h \ | 451 | mainwindow.o: mainwindow.cpp mainwindow.h \ |
3060 | 458 | Util.h \ | 452 | Util.h \ |
3061 | 459 | ../Common/JrKerr/nmccom.h \ | 453 | ../Common/JrKerr/nmccom.h \ |
3062 | 460 | ../Common/tinyxml/tinyxml.h \ | ||
3063 | 461 | ../Common/tinyxml/tinystr.h \ | ||
3064 | 462 | Axis.h \ | 454 | Axis.h \ |
3065 | 463 | Motor.h \ | 455 | Motor.h \ |
3066 | 464 | ../Common/JrKerr/path.h \ | 456 | ../Common/JrKerr/path.h \ |
3067 | @@ -481,8 +473,6 @@ | |||
3068 | 481 | Motor.h \ | 473 | Motor.h \ |
3069 | 482 | Util.h \ | 474 | Util.h \ |
3070 | 483 | ../Common/JrKerr/nmccom.h \ | 475 | ../Common/JrKerr/nmccom.h \ |
3071 | 484 | ../Common/tinyxml/tinyxml.h \ | ||
3072 | 485 | ../Common/tinyxml/tinystr.h \ | ||
3073 | 486 | ../Common/JrKerr/path.h \ | 476 | ../Common/JrKerr/path.h \ |
3074 | 487 | ../Common/JrKerr/picservo.h \ | 477 | ../Common/JrKerr/picservo.h \ |
3075 | 488 | Model.h \ | 478 | Model.h \ |
3076 | @@ -499,8 +489,6 @@ | |||
3077 | 499 | Motor.h \ | 489 | Motor.h \ |
3078 | 500 | Util.h \ | 490 | Util.h \ |
3079 | 501 | ../Common/JrKerr/nmccom.h \ | 491 | ../Common/JrKerr/nmccom.h \ |
3080 | 502 | ../Common/tinyxml/tinyxml.h \ | ||
3081 | 503 | ../Common/tinyxml/tinystr.h \ | ||
3082 | 504 | ../Common/JrKerr/path.h \ | 492 | ../Common/JrKerr/path.h \ |
3083 | 505 | ../Common/JrKerr/picservo.h \ | 493 | ../Common/JrKerr/picservo.h \ |
3084 | 506 | Model.h \ | 494 | Model.h \ |
3085 | @@ -555,6 +543,9 @@ | |||
3086 | 555 | moc_FabAtHomePrinter.o: moc_FabAtHomePrinter.cpp | 543 | moc_FabAtHomePrinter.o: moc_FabAtHomePrinter.cpp |
3087 | 556 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_FabAtHomePrinter.o moc_FabAtHomePrinter.cpp | 544 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_FabAtHomePrinter.o moc_FabAtHomePrinter.cpp |
3088 | 557 | 545 | ||
3089 | 546 | moc_guicomponentsthread.o: moc_guicomponentsthread.cpp | ||
3090 | 547 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_guicomponentsthread.o moc_guicomponentsthread.cpp | ||
3091 | 548 | |||
3092 | 558 | ####### Install | 549 | ####### Install |
3093 | 559 | 550 | ||
3094 | 560 | install: FORCE | 551 | install: FORCE |
3095 | 561 | 552 | ||
3096 | === modified file 'software/FabInterpreter/Motor.cpp' | |||
3097 | --- software/FabInterpreter/Motor.cpp 2010-07-23 20:12:14 +0000 | |||
3098 | +++ software/FabInterpreter/Motor.cpp 2010-08-07 00:08:43 +0000 | |||
3099 | @@ -1,194 +1,192 @@ | |||
3100 | 1 | #include "Motor.h" | 1 | #include "Motor.h" |
3101 | 2 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 2 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3102 | 3 | Motor::Motor(string name,const byte& address, const double countsPerU, const double ticksPerSecond, short kp, short kd, short ki, short il, byte ol, byte cl, short int el, byte sr, byte db): | 3 | Motor::Motor(string name,const byte& address, const double countsPerU, const double ticksPerSecond, short kp, short kd, short ki, short il, byte ol, byte cl, short int el, byte sr, byte db): |
3125 | 4 | initialized(false), | 4 | initialized(false), |
3126 | 5 | commandedPosition(0.0), | 5 | commandedPosition(0.0), |
3127 | 6 | isReversed(false), | 6 | isReversed(false), |
3128 | 7 | NAME(name), | 7 | NAME(name), |
3129 | 8 | ADDRESS(address), | 8 | ADDRESS(address), |
3130 | 9 | COUNTS_PER_U(countsPerU), | 9 | COUNTS_PER_U(countsPerU), |
3131 | 10 | TICKS_PER_SECOND(ticksPerSecond), | 10 | TICKS_PER_SECOND(ticksPerSecond), |
3132 | 11 | KP(kp), | 11 | KP(kp), |
3133 | 12 | KD(kd), | 12 | KD(kd), |
3134 | 13 | KI(ki), | 13 | KI(ki), |
3135 | 14 | IL(il), | 14 | IL(il), |
3136 | 15 | OL(ol), | 15 | OL(ol), |
3137 | 16 | CL(cl), | 16 | CL(cl), |
3138 | 17 | EL(el), | 17 | EL(el), |
3139 | 18 | SR(sr), | 18 | SR(sr), |
3140 | 19 | DB(db), | 19 | DB(db), |
3141 | 20 | MIN_COMMANDED_POSITION(-2147483648.0/countsPerU), | 20 | MIN_COMMANDED_POSITION(-2147483648.0/countsPerU), |
3142 | 21 | MAX_COMMANDED_POSITION(2147483647.0/countsPerU), | 21 | MAX_COMMANDED_POSITION(2147483647.0/countsPerU), |
3143 | 22 | MIN_COMMANDED_VELOCITY(0.0), | 22 | MIN_COMMANDED_VELOCITY(0.0), |
3144 | 23 | MAX_COMMANDED_VELOCITY(2500000.0/countsPerU), | 23 | MAX_COMMANDED_VELOCITY(2500000.0/countsPerU), |
3145 | 24 | MIN_COMMANDED_ACCELERATION(0.0), | 24 | MIN_COMMANDED_ACCELERATION(0.0), |
3146 | 25 | MAX_COMMANDED_ACCELERATION(125000000000.0/countsPerU) | 25 | MAX_COMMANDED_ACCELERATION(125000000000.0/countsPerU) |
3147 | 26 | { | 26 | { |
3148 | 27 | } | 27 | } |
3149 | 28 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 28 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3150 | 29 | Motor::Motor(): | 29 | Motor::Motor(): |
3152 | 30 | initialized(false) | 30 | initialized(false) |
3153 | 31 | { | 31 | { |
3154 | 32 | } | 32 | } |
3155 | 33 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 33 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3156 | 34 | void Motor::updateData() | 34 | void Motor::updateData() |
3157 | 35 | { | 35 | { |
3159 | 36 | NmcNoOp(ADDRESS); | 36 | NmcNoOp(ADDRESS); |
3160 | 37 | } | 37 | } |
3161 | 38 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 38 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3162 | 39 | void Motor::setReversed(bool isReversed) | 39 | void Motor::setReversed(bool isReversed) |
3163 | 40 | { | 40 | { |
3165 | 41 | this->isReversed = isReversed; | 41 | this->isReversed = isReversed; |
3166 | 42 | } | 42 | } |
3167 | 43 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 43 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3168 | 44 | double Motor::getPosition() | 44 | double Motor::getPosition() |
3169 | 45 | { | 45 | { |
3172 | 46 | updateData(); | 46 | updateData(); |
3173 | 47 | return (isReversed ? -1 : 1) * ServoGetPos(ADDRESS) / COUNTS_PER_U; //Translate count to U. | 47 | return (isReversed ? -1 : 1) * ServoGetPos(ADDRESS) / COUNTS_PER_U; //Translate count to U. |
3174 | 48 | } | 48 | } |
3175 | 49 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 49 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3176 | 50 | double Motor::getCommandedPosition() | 50 | double Motor::getCommandedPosition() |
3177 | 51 | { | 51 | { |
3179 | 52 | return commandedPosition; | 52 | return commandedPosition; |
3180 | 53 | } | 53 | } |
3181 | 54 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 54 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3182 | 55 | bool Motor::moveAbsolute(double position, double velocity, double acceleration) | 55 | bool Motor::moveAbsolute(double position, double velocity, double acceleration) |
3183 | 56 | { | 56 | { |
3215 | 57 | //if reversed then switches position | 57 | //if reversed then switches position |
3216 | 58 | if(isReversed) | 58 | if(isReversed) |
3217 | 59 | { | 59 | { |
3218 | 60 | position *= -1; | 60 | position *= -1; |
3219 | 61 | } | 61 | } |
3220 | 62 | 62 | ||
3221 | 63 | //Checks command againsts given constraints | 63 | //Checks command againsts given constraints |
3222 | 64 | Util::assertTrue | 64 | Util::assertTrue |
3223 | 65 | ( | 65 | ( |
3224 | 66 | position >= MIN_COMMANDED_POSITION | 66 | position >= MIN_COMMANDED_POSITION |
3225 | 67 | && position <= MAX_COMMANDED_POSITION | 67 | && position <= MAX_COMMANDED_POSITION |
3226 | 68 | && velocity >= MIN_COMMANDED_VELOCITY | 68 | && velocity >= MIN_COMMANDED_VELOCITY |
3227 | 69 | && velocity <= MAX_COMMANDED_VELOCITY | 69 | && velocity <= MAX_COMMANDED_VELOCITY |
3228 | 70 | && acceleration >= MIN_COMMANDED_ACCELERATION | 70 | && acceleration >= MIN_COMMANDED_ACCELERATION |
3229 | 71 | && acceleration <= MAX_COMMANDED_ACCELERATION, | 71 | && acceleration <= MAX_COMMANDED_ACCELERATION, |
3230 | 72 | "Tried to issue a movement command with arguments that are out of bounds.", | 72 | "Tried to issue a movement command with arguments that are out of bounds.", |
3231 | 73 | __LINE__,__FILE__ | 73 | __LINE__,__FILE__ |
3232 | 74 | ); | 74 | ); |
3233 | 75 | 75 | ||
3234 | 76 | //sets the commanded position to the given position | 76 | //sets the commanded position to the given position |
3235 | 77 | commandedPosition = position; | 77 | commandedPosition = position; |
3236 | 78 | 78 | ||
3237 | 79 | return ServoLoadTraj | 79 | return ServoLoadTraj |
3238 | 80 | ( | 80 | ( |
3239 | 81 | ADDRESS, | 81 | ADDRESS, |
3240 | 82 | LOAD_POS | LOAD_VEL | LOAD_ACC | ENABLE_SERVO | START_NOW, | 82 | LOAD_POS | LOAD_VEL | LOAD_ACC | ENABLE_SERVO | START_NOW, |
3241 | 83 | (long)(position * COUNTS_PER_U), //Translate U to count. | 83 | (int)(position * COUNTS_PER_U), //Translate U to count. |
3242 | 84 | (long)(velocity * COUNTS_PER_U / TICKS_PER_SECOND * 65536), //Translate U/second to count/tick * 2^16. | 84 | (int)(velocity * COUNTS_PER_U / TICKS_PER_SECOND * 65536), //Translate U/second to count/tick * 2^16. |
3243 | 85 | (long)(acceleration * COUNTS_PER_U / (TICKS_PER_SECOND * TICKS_PER_SECOND) * 65536), //Translate U/(second^2) to count/(ticks^2) * 2^16. | 85 | (int)(acceleration * COUNTS_PER_U / (TICKS_PER_SECOND * TICKS_PER_SECOND) * 65536), //Translate U/(second^2) to count/(ticks^2) * 2^16. |
3244 | 86 | 0 //pwm (no effect if not in pwm mode) | 86 | 0 //pwm (no effect if not in pwm mode) |
3245 | 87 | ) == 1; | 87 | ) == 1; |
3246 | 88 | } | 88 | } |
3247 | 89 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 89 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3248 | 90 | bool Motor::moveRelative(double positionDelta, double velocity, double acceleration) | 90 | bool Motor::moveRelative(double positionDelta, double velocity, double acceleration) |
3249 | 91 | { | 91 | { |
3251 | 92 | return moveAbsolute(getPosition()+positionDelta, velocity, acceleration); | 92 | return moveAbsolute(getPosition()+positionDelta, velocity, acceleration); |
3252 | 93 | } | 93 | } |
3253 | 94 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 94 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3254 | 95 | bool Motor::stop() | 95 | bool Motor::stop() |
3255 | 96 | { | 96 | { |
3257 | 97 | return cleanUp(); | 97 | return cleanUp(); |
3258 | 98 | } | 98 | } |
3259 | 99 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 99 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3260 | 100 | bool Motor::setGroup(byte groupAddress, bool isLeader) | 100 | bool Motor::setGroup(byte groupAddress, bool isLeader) |
3261 | 101 | { | 101 | { |
3263 | 102 | return NmcSetGroupAddr(ADDRESS, groupAddress, isLeader) == 1; | 102 | return NmcSetGroupAddr(ADDRESS, groupAddress, isLeader) == 1; |
3264 | 103 | } | 103 | } |
3265 | 104 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 104 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3266 | 105 | bool Motor::resetPosition() | 105 | bool Motor::resetPosition() |
3267 | 106 | { | 106 | { |
3271 | 107 | ServoResetPos(ADDRESS); | 107 | ServoResetPos(ADDRESS); |
3272 | 108 | commandedPosition = 0.0; | 108 | commandedPosition = 0.0; |
3273 | 109 | return true; | 109 | return true; |
3274 | 110 | } | 110 | } |
3275 | 111 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 111 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3276 | 112 | bool Motor::moving() | 112 | bool Motor::moving() |
3277 | 113 | { | 113 | { |
3284 | 114 | updateData(); //updates the motor info | 114 | updateData(); //updates the motor info |
3285 | 115 | byte auxByte = ServoGetAux(ADDRESS); | 115 | byte auxByte = ServoGetAux(ADDRESS); |
3286 | 116 | bool pathMoving = (auxByte & PATH_MODE) != (char)0; | 116 | bool pathMoving = (auxByte & PATH_MODE) != 0; |
3287 | 117 | byte statbyte = NmcGetStat(ADDRESS); | 117 | byte statbyte = NmcGetStat(ADDRESS); |
3288 | 118 | bool nonPathMoving = !(statbyte & MOVE_DONE); | 118 | bool nonPathMoving = !(statbyte & MOVE_DONE); |
3289 | 119 | return pathMoving || nonPathMoving; | 119 | return pathMoving || nonPathMoving; |
3290 | 120 | } | 120 | } |
3291 | 121 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 121 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3292 | 122 | void Motor::waitMove() | 122 | void Motor::waitMove() |
3293 | 123 | { | 123 | { |
3298 | 124 | qDebug() << "waiting on " << ADDRESS; | 124 | while(moving()) |
3299 | 125 | while(moving()) | 125 | { |
3300 | 126 | { | 126 | } |
3297 | 127 | } | ||
3301 | 128 | } | 127 | } |
3302 | 129 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 128 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3303 | 130 | string Motor::initialize() | 129 | string Motor::initialize() |
3304 | 131 | { | 130 | { |
3305 | 132 | 131 | ||
3332 | 133 | if(!initialized) | 132 | if(!initialized) |
3333 | 134 | { | 133 | { |
3334 | 135 | stringstream ss; | 134 | stringstream ss; |
3335 | 136 | if(NmcGetModType(ADDRESS) != SERVOMODTYPE) | 135 | if(NmcGetModType(ADDRESS) != SERVOMODTYPE) |
3336 | 137 | { | 136 | { |
3337 | 138 | ss << "Motor with address " << ADDRESS << " is not a PIC-SERVO motor."; | 137 | ss << "Motor with address " << ADDRESS << " is not a PIC-SERVO motor."; |
3338 | 139 | return ss.str(); | 138 | return ss.str(); |
3339 | 140 | } | 139 | } |
3340 | 141 | usleep(51000); | 140 | if(ServoSetGain(ADDRESS,KP,KD,KI,IL,OL,CL,EL,SR,DB) != 1) |
3341 | 142 | if(ServoSetGain(ADDRESS,KP,KD,KI,IL,OL,CL,EL,SR,DB) != 1) | 141 | { |
3342 | 143 | { | 142 | ss << "Failed to set gains for motor with address " << ADDRESS << "."; |
3343 | 144 | ss << "Failed to set gains for motor with address " << ADDRESS << "."; | 143 | return ss.str(); |
3344 | 145 | return ss.str(); | 144 | } |
3345 | 146 | } | 145 | |
3346 | 147 | 146 | ServoStopMotor(ADDRESS, AMP_ENABLE | STOP_ABRUPT | ADV_FEATURE); | |
3347 | 148 | ServoStopMotor(ADDRESS, AMP_ENABLE | STOP_ABRUPT | ADV_FEATURE); | 147 | NmcDefineStatus(ADDRESS, SEND_POS | SEND_NPOINTS | SEND_PERROR | SEND_AUX); |
3348 | 149 | NmcDefineStatus(ADDRESS, SEND_POS | SEND_NPOINTS | SEND_PERROR | SEND_AUX); | 148 | |
3349 | 150 | 149 | if(!resetPosition()) | |
3350 | 151 | if(!resetPosition()) | 150 | { |
3351 | 152 | { | 151 | ss << "Could not reset position for motor with address " << ADDRESS << "."; |
3352 | 153 | ss << "Could not reset position for motor with address " << ADDRESS << "."; | 152 | return ss.str(); |
3353 | 154 | return ss.str(); | 153 | } |
3354 | 155 | } | 154 | initialized = true; |
3355 | 156 | initialized = true; | 155 | } |
3356 | 157 | } | 156 | return ""; |
3331 | 158 | return ""; | ||
3357 | 159 | } | 157 | } |
3358 | 160 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 158 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3359 | 161 | bool Motor::cleanUp() | 159 | bool Motor::cleanUp() |
3360 | 162 | { | 160 | { |
3375 | 163 | bool result; | 161 | bool result; |
3376 | 164 | if(initialized) | 162 | if(initialized) |
3377 | 165 | { | 163 | { |
3378 | 166 | result = ServoStopMotor(ADDRESS, STOP_ABRUPT | MOTOR_OFF) == 1 && NmcHardReset(ADDRESS) == 1; | 164 | result = ServoStopMotor(ADDRESS, STOP_ABRUPT | MOTOR_OFF) == 1 && NmcHardReset(ADDRESS) == 1; |
3379 | 167 | if(result) | 165 | if(result) |
3380 | 168 | { | 166 | { |
3381 | 169 | initialized = false; | 167 | initialized = false; |
3382 | 170 | } | 168 | } |
3383 | 171 | } | 169 | } |
3384 | 172 | else | 170 | else |
3385 | 173 | { | 171 | { |
3386 | 174 | result = true; | 172 | result = true; |
3387 | 175 | } | 173 | } |
3388 | 176 | return result; | 174 | return result; |
3389 | 177 | } | 175 | } |
3390 | 178 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 176 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3391 | 179 | byte Motor::getAddress(void) | 177 | byte Motor::getAddress(void) |
3392 | 180 | { | 178 | { |
3394 | 181 | return ADDRESS; | 179 | return ADDRESS; |
3395 | 182 | } | 180 | } |
3396 | 183 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 181 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3397 | 184 | double Motor::getCountsPerU(void) | 182 | double Motor::getCountsPerU(void) |
3398 | 185 | { | 183 | { |
3400 | 186 | return (isReversed ? -1 : 1) * COUNTS_PER_U; | 184 | return (isReversed ? -1 : 1) * COUNTS_PER_U; |
3401 | 187 | } | 185 | } |
3402 | 188 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 186 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3403 | 189 | Motor::~Motor() | 187 | Motor::~Motor() |
3404 | 190 | { | 188 | { |
3406 | 191 | cleanUp(); | 189 | cleanUp(); |
3407 | 192 | } | 190 | } |
3408 | 193 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 191 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3409 | 194 | double Motor::getMinPosition() | 192 | double Motor::getMinPosition() |
3410 | 195 | 193 | ||
3411 | === modified file 'software/FabInterpreter/Motor.h' | |||
3412 | --- software/FabInterpreter/Motor.h 2010-07-23 20:12:14 +0000 | |||
3413 | +++ software/FabInterpreter/Motor.h 2010-08-07 00:08:43 +0000 | |||
3414 | @@ -6,94 +6,92 @@ | |||
3415 | 6 | #include "path.h" | 6 | #include "path.h" |
3416 | 7 | #include "picservo.h" | 7 | #include "picservo.h" |
3417 | 8 | 8 | ||
3418 | 9 | #include <QDebug> | ||
3419 | 10 | |||
3420 | 11 | 9 | ||
3421 | 12 | class Motor | 10 | class Motor |
3422 | 13 | { | 11 | { |
3424 | 14 | //CONSTANTS///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 12 | //CONSTANTS///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3425 | 15 | private: | 13 | private: |
3428 | 16 | string NAME; | 14 | string NAME; |
3429 | 17 | byte ADDRESS; //The number of the motor port that this motor is plugged in. | 15 | byte ADDRESS; //The number of the motor port that this motor is plugged in. |
3430 | 18 | double COUNTS_PER_U; //Number of counts for 1 U of motion. | 16 | double COUNTS_PER_U; //Number of counts for 1 U of motion. |
3432 | 19 | double TICKS_PER_SECOND; //Number of ticks that a motor makes per second. | 17 | double TICKS_PER_SECOND; //Number of ticks that a motor makes per second. |
3433 | 20 | double MIN_COMMANDED_POSITION; //The minimum position that the motor can go to | 18 | double MIN_COMMANDED_POSITION; //The minimum position that the motor can go to |
3442 | 21 | double MAX_COMMANDED_POSITION; //The maxiumum position that the motor can go to | 19 | double MAX_COMMANDED_POSITION; //The maxiumum position that the motor can go to |
3443 | 22 | double MIN_COMMANDED_VELOCITY; //The minumum velocity the motor can travel at | 20 | double MIN_COMMANDED_VELOCITY; //The minumum velocity the motor can travel at |
3444 | 23 | double MAX_COMMANDED_VELOCITY; //The maximum velocity the motor can travel at | 21 | double MAX_COMMANDED_VELOCITY; //The maximum velocity the motor can travel at |
3445 | 24 | double MIN_COMMANDED_ACCELERATION; //The minimum acceleration of the motor | 22 | double MIN_COMMANDED_ACCELERATION; //The minimum acceleration of the motor |
3446 | 25 | double MAX_COMMANDED_ACCELERATION; //The maxiumum acceleration of the motor | 23 | double MAX_COMMANDED_ACCELERATION; //The maxiumum acceleration of the motor |
3447 | 26 | short KP, KD, KI, IL, EL; //Damping contraints (look up procedure for critically damping motors for more details, also JKerr has documentation) | 24 | short KP, KD, KI, IL, EL; //Damping contraints (look up procedure for critically damping motors for more details, also JKerr has documentation) |
3448 | 27 | byte OL, CL, SR, DB; //See JKerr's Document for more details on his motor bytes | 25 | byte OL, CL, SR, DB; //See JKerr's Document for more details on his motor bytes |
3449 | 28 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 26 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
3450 | 29 | private: | 27 | private: |
3454 | 30 | double commandedPosition; //desired position of the motor | 28 | double commandedPosition; //desired position of the motor |
3455 | 31 | bool initialized; //true is motor is initialized and ready for us, false otherwise | 29 | bool initialized; //true is motor is initialized and ready for us, false otherwise |
3456 | 32 | bool isReversed; //true if motor direction is to be reversed from default values on controller board | 30 | bool isReversed; //true if motor direction is to be reversed from default values on controller board |
3457 | 33 | 31 | ||
3460 | 34 | //Tell hardware to send updated data for this motor to the DLL. | 32 | //Tell hardware to send updated data for this motor to the DLL. |
3461 | 35 | void updateData(void); | 33 | void updateData(void); |
3462 | 36 | 34 | ||
3463 | 37 | public: | 35 | public: |
3523 | 38 | Motor(void); | 36 | Motor(void); |
3524 | 39 | 37 | ||
3525 | 40 | //Creates a motor with all of the given values (described above) | 38 | //Creates a motor with all of the given values (described above) |
3526 | 41 | Motor(string name,const byte& address, const double countsPerU, const double ticksPerSecond, short kp, short kd, short ki, short il, byte ol, byte cl, short int el, byte sr, byte db); | 39 | Motor(string name,const byte& address, const double countsPerU, const double ticksPerSecond, short kp, short kd, short ki, short il, byte ol, byte cl, short int el, byte sr, byte db); |
3527 | 42 | 40 | ||
3528 | 43 | //Returns: The current position of the motor. The unit of position is U. | 41 | //Returns: The current position of the motor. The unit of position is U. |
3529 | 44 | double getPosition(void); | 42 | double getPosition(void); |
3530 | 45 | 43 | ||
3531 | 46 | double getMinPosition(); | 44 | double getMinPosition(); |
3532 | 47 | 45 | ||
3533 | 48 | double getMaxPosition(); | 46 | double getMaxPosition(); |
3534 | 49 | 47 | ||
3535 | 50 | //Returns: The most recent position that the motor was commanded to move to by moveAbsolute, moveRelative, and resetPosition functions. The unit of position is U. | 48 | //Returns: The most recent position that the motor was commanded to move to by moveAbsolute, moveRelative, and resetPosition functions. The unit of position is U. |
3536 | 51 | double getCommandedPosition(void); | 49 | double getCommandedPosition(void); |
3537 | 52 | 50 | ||
3538 | 53 | //Move to a position at a specified velocity and acceleration. | 51 | //Move to a position at a specified velocity and acceleration. |
3539 | 54 | //The unit of position is U, the unit of velocity is U/second, and the unit of acceleration is U/(second^2). | 52 | //The unit of position is U, the unit of velocity is U/second, and the unit of acceleration is U/(second^2). |
3540 | 55 | //Requires MIN_COMMANDED_POSITION <= position <= MAX_COMMANDED_POSITION, MIN_COMMANDED_VELOCITY <= velocity <= MAX_COMMANDED_VELOCITY, MIN_COMMANDED_ACCELERATION <= acceleration <= MAX_COMMANDED_ACCELERATION | 53 | //Requires MIN_COMMANDED_POSITION <= position <= MAX_COMMANDED_POSITION, MIN_COMMANDED_VELOCITY <= velocity <= MAX_COMMANDED_VELOCITY, MIN_COMMANDED_ACCELERATION <= acceleration <= MAX_COMMANDED_ACCELERATION |
3541 | 56 | //Returns true iff command was issued successfully. | 54 | //Returns true iff command was issued successfully. |
3542 | 57 | bool moveAbsolute(double position, double velocity, double acceleration); | 55 | bool moveAbsolute(double position, double velocity, double acceleration); |
3543 | 58 | 56 | ||
3544 | 59 | //Move relative to the current position at a specified velocity and acceleration. | 57 | //Move relative to the current position at a specified velocity and acceleration. |
3545 | 60 | //Returns true iff command was issued successfully. | 58 | //Returns true iff command was issued successfully. |
3546 | 61 | bool moveRelative(double positionDelta, double velocity, double acceleration); | 59 | bool moveRelative(double positionDelta, double velocity, double acceleration); |
3547 | 62 | 60 | ||
3548 | 63 | //Returns: True iff motor is currently moving. | 61 | //Returns: True iff motor is currently moving. |
3549 | 64 | bool moving(void); | 62 | bool moving(void); |
3550 | 65 | 63 | ||
3551 | 66 | //This function returns as soon as possible after the motor has finished moving. | 64 | //This function returns as soon as possible after the motor has finished moving. |
3552 | 67 | void waitMove(void); | 65 | void waitMove(void); |
3553 | 68 | 66 | ||
3554 | 69 | //Stops the motor | 67 | //Stops the motor |
3555 | 70 | bool stop(void); | 68 | bool stop(void); |
3556 | 71 | 69 | ||
3557 | 72 | //Set whether this motor is reversed. If a motor is reversed, movement commands will cause the motor to move in the opposite direction. | 70 | //Set whether this motor is reversed. If a motor is reversed, movement commands will cause the motor to move in the opposite direction. |
3558 | 73 | void setReversed(bool); | 71 | void setReversed(bool); |
3559 | 74 | 72 | ||
3560 | 75 | //sets the address of the motor on the controller board, see JKerr documentation for more details | 73 | //sets the address of the motor on the controller board, see JKerr documentation for more details |
3561 | 76 | bool setGroup(byte groupAddress, bool isLeader); | 74 | bool setGroup(byte groupAddress, bool isLeader); |
3562 | 77 | 75 | ||
3563 | 78 | //The motors current position is considered to be 0 and the motors commanded position is set to 0. | 76 | //The motors current position is considered to be 0 and the motors commanded position is set to 0. |
3564 | 79 | bool resetPosition(void); | 77 | bool resetPosition(void); |
3565 | 80 | 78 | ||
3566 | 81 | //Initialize the motor. | 79 | //Initialize the motor. |
3567 | 82 | //Returns: "" if successful or an error message if failed. | 80 | //Returns: "" if successful or an error message if failed. |
3568 | 83 | string initialize(void); | 81 | string initialize(void); |
3569 | 84 | 82 | ||
3570 | 85 | //gets the motor address from the controller board | 83 | //gets the motor address from the controller board |
3571 | 86 | byte getAddress(void); | 84 | byte getAddress(void); |
3572 | 87 | 85 | ||
3573 | 88 | //gets the ratio of counts of motor movement per real unit of measurement | 86 | //gets the ratio of counts of motor movement per real unit of measurement |
3574 | 89 | double getCountsPerU(void); | 87 | double getCountsPerU(void); |
3575 | 90 | 88 | ||
3576 | 91 | //Perform cleanup when done using motor. | 89 | //Perform cleanup when done using motor. |
3577 | 92 | //Returns: True iff successful. | 90 | //Returns: True iff successful. |
3578 | 93 | bool cleanUp(void); | 91 | bool cleanUp(void); |
3579 | 94 | 92 | ||
3580 | 95 | //The destructor. | 93 | //The destructor. |
3581 | 96 | ~Motor(void); | 94 | ~Motor(void); |
3582 | 97 | 95 | ||
3583 | 98 | }; | 96 | }; |
3584 | 99 | 97 | ||
3585 | 100 | 98 | ||
3586 | === added directory 'software/FabInterpreter/Path_Tester' | |||
3587 | === added file 'software/FabInterpreter/Path_Tester/.DS_Store' | |||
3588 | 101 | Binary files software/FabInterpreter/Path_Tester/.DS_Store 1970-01-01 00:00:00 +0000 and software/FabInterpreter/Path_Tester/.DS_Store 2010-08-07 00:08:43 +0000 differ | 99 | Binary files software/FabInterpreter/Path_Tester/.DS_Store 1970-01-01 00:00:00 +0000 and software/FabInterpreter/Path_Tester/.DS_Store 2010-08-07 00:08:43 +0000 differ |
3589 | === added file 'software/FabInterpreter/Path_Tester/Makefile' | |||
3590 | --- software/FabInterpreter/Path_Tester/Makefile 1970-01-01 00:00:00 +0000 | |||
3591 | +++ software/FabInterpreter/Path_Tester/Makefile 2010-08-07 00:08:43 +0000 | |||
3592 | @@ -0,0 +1,271 @@ | |||
3593 | 1 | ############################################################################# | ||
3594 | 2 | # Makefile for building: Path_Tester | ||
3595 | 3 | # Generated by qmake (2.01a) (Qt 4.6.3) on: Wed Jul 28 14:08:54 2010 | ||
3596 | 4 | # Project: Path_Tester.pro | ||
3597 | 5 | # Template: app | ||
3598 | 6 | # Command: /usr/bin/qmake -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile Path_Tester.pro | ||
3599 | 7 | ############################################################################# | ||
3600 | 8 | |||
3601 | 9 | ####### Compiler, tools and options | ||
3602 | 10 | |||
3603 | 11 | CC = gcc | ||
3604 | 12 | CXX = g++ | ||
3605 | 13 | DEFINES = -DQT_CORE_LIB -DQT_SHARED | ||
3606 | 14 | CFLAGS = -pipe -g -gdwarf-2 -arch i386 -Wall -W $(DEFINES) | ||
3607 | 15 | CXXFLAGS = -pipe -g -gdwarf-2 -arch i386 -Wall -W $(DEFINES) | ||
3608 | 16 | INCPATH = -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/usr/include -I../../Common/JrKerr -I../../Common/JrKerr/src -I. -F/Library/Frameworks | ||
3609 | 17 | LINK = g++ | ||
3610 | 18 | LFLAGS = -headerpad_max_install_names -arch i386 | ||
3611 | 19 | LIBS = $(SUBLIBS) -F/Library/Frameworks -L../../Common/JrKerr/src/build -L/Library/Frameworks -lqextserialportd -framework QtCore | ||
3612 | 20 | AR = ar cq | ||
3613 | 21 | RANLIB = ranlib -s | ||
3614 | 22 | QMAKE = /usr/bin/qmake | ||
3615 | 23 | TAR = tar -cf | ||
3616 | 24 | COMPRESS = gzip -9f | ||
3617 | 25 | COPY = cp -f | ||
3618 | 26 | SED = sed | ||
3619 | 27 | COPY_FILE = cp -f | ||
3620 | 28 | COPY_DIR = cp -f -R | ||
3621 | 29 | STRIP = | ||
3622 | 30 | INSTALL_FILE = $(COPY_FILE) | ||
3623 | 31 | INSTALL_DIR = $(COPY_DIR) | ||
3624 | 32 | INSTALL_PROGRAM = $(COPY_FILE) | ||
3625 | 33 | DEL_FILE = rm -f | ||
3626 | 34 | SYMLINK = ln -f -s | ||
3627 | 35 | DEL_DIR = rmdir | ||
3628 | 36 | MOVE = mv -f | ||
3629 | 37 | CHK_DIR_EXISTS= test -d | ||
3630 | 38 | MKDIR = mkdir -p | ||
3631 | 39 | export MACOSX_DEPLOYMENT_TARGET = 10.4 | ||
3632 | 40 | |||
3633 | 41 | ####### Output directory | ||
3634 | 42 | |||
3635 | 43 | OBJECTS_DIR = ./ | ||
3636 | 44 | |||
3637 | 45 | ####### Files | ||
3638 | 46 | |||
3639 | 47 | SOURCES = main.cpp \ | ||
3640 | 48 | ../../Common/JrKerr/nmccom.cpp \ | ||
3641 | 49 | ../../Common/JrKerr/picio.cpp \ | ||
3642 | 50 | ../../Common/JrKerr/picservo.cpp \ | ||
3643 | 51 | ../../Common/JrKerr/picstep.cpp \ | ||
3644 | 52 | ../../Common/JrKerr/path.cpp | ||
3645 | 53 | OBJECTS = main.o \ | ||
3646 | 54 | nmccom.o \ | ||
3647 | 55 | picio.o \ | ||
3648 | 56 | picservo.o \ | ||
3649 | 57 | picstep.o \ | ||
3650 | 58 | path.o | ||
3651 | 59 | DIST = /usr/local/Qt4.6/mkspecs/common/unix.conf \ | ||
3652 | 60 | /usr/local/Qt4.6/mkspecs/common/mac.conf \ | ||
3653 | 61 | /usr/local/Qt4.6/mkspecs/common/mac-g++.conf \ | ||
3654 | 62 | /usr/local/Qt4.6/mkspecs/qconfig.pri \ | ||
3655 | 63 | /usr/local/Qt4.6/mkspecs/features/qt_functions.prf \ | ||
3656 | 64 | /usr/local/Qt4.6/mkspecs/features/qt_config.prf \ | ||
3657 | 65 | /usr/local/Qt4.6/mkspecs/features/exclusive_builds.prf \ | ||
3658 | 66 | /usr/local/Qt4.6/mkspecs/features/default_pre.prf \ | ||
3659 | 67 | /usr/local/Qt4.6/mkspecs/features/mac/default_pre.prf \ | ||
3660 | 68 | jrkerr.pro \ | ||
3661 | 69 | /usr/local/Qt4.6/mkspecs/features/mac/dwarf2.prf \ | ||
3662 | 70 | /usr/local/Qt4.6/mkspecs/features/debug.prf \ | ||
3663 | 71 | /usr/local/Qt4.6/mkspecs/features/default_post.prf \ | ||
3664 | 72 | /usr/local/Qt4.6/mkspecs/features/mac/default_post.prf \ | ||
3665 | 73 | /usr/local/Qt4.6/mkspecs/features/mac/x86.prf \ | ||
3666 | 74 | /usr/local/Qt4.6/mkspecs/features/mac/objective_c.prf \ | ||
3667 | 75 | /usr/local/Qt4.6/mkspecs/features/warn_on.prf \ | ||
3668 | 76 | /usr/local/Qt4.6/mkspecs/features/qt.prf \ | ||
3669 | 77 | /usr/local/Qt4.6/mkspecs/features/unix/thread.prf \ | ||
3670 | 78 | /usr/local/Qt4.6/mkspecs/features/moc.prf \ | ||
3671 | 79 | /usr/local/Qt4.6/mkspecs/features/mac/rez.prf \ | ||
3672 | 80 | /usr/local/Qt4.6/mkspecs/features/mac/sdk.prf \ | ||
3673 | 81 | /usr/local/Qt4.6/mkspecs/features/resources.prf \ | ||
3674 | 82 | /usr/local/Qt4.6/mkspecs/features/uic.prf \ | ||
3675 | 83 | /usr/local/Qt4.6/mkspecs/features/yacc.prf \ | ||
3676 | 84 | /usr/local/Qt4.6/mkspecs/features/lex.prf \ | ||
3677 | 85 | /usr/local/Qt4.6/mkspecs/features/include_source_dir.prf \ | ||
3678 | 86 | Path_Tester.pro | ||
3679 | 87 | QMAKE_TARGET = Path_Tester | ||
3680 | 88 | DESTDIR = | ||
3681 | 89 | TARGET = Path_Tester | ||
3682 | 90 | |||
3683 | 91 | ####### Custom Compiler Variables | ||
3684 | 92 | QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \ | ||
3685 | 93 | -g \ | ||
3686 | 94 | -gdwarf-2 \ | ||
3687 | 95 | -arch \ | ||
3688 | 96 | i386 \ | ||
3689 | 97 | -Wall \ | ||
3690 | 98 | -W | ||
3691 | 99 | |||
3692 | 100 | |||
3693 | 101 | first: all | ||
3694 | 102 | ####### Implicit rules | ||
3695 | 103 | |||
3696 | 104 | .SUFFIXES: .o .c .cpp .cc .cxx .C | ||
3697 | 105 | |||
3698 | 106 | .cpp.o: | ||
3699 | 107 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | ||
3700 | 108 | |||
3701 | 109 | .cc.o: | ||
3702 | 110 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | ||
3703 | 111 | |||
3704 | 112 | .cxx.o: | ||
3705 | 113 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | ||
3706 | 114 | |||
3707 | 115 | .C.o: | ||
3708 | 116 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | ||
3709 | 117 | |||
3710 | 118 | .c.o: | ||
3711 | 119 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | ||
3712 | 120 | |||
3713 | 121 | ####### Build rules | ||
3714 | 122 | |||
3715 | 123 | all: Makefile $(TARGET) | ||
3716 | 124 | |||
3717 | 125 | $(TARGET): $(OBJECTS) | ||
3718 | 126 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | ||
3719 | 127 | |||
3720 | 128 | Makefile: Path_Tester.pro /usr/local/Qt4.6/mkspecs/macx-g++/qmake.conf /usr/local/Qt4.6/mkspecs/common/unix.conf \ | ||
3721 | 129 | /usr/local/Qt4.6/mkspecs/common/mac.conf \ | ||
3722 | 130 | /usr/local/Qt4.6/mkspecs/common/mac-g++.conf \ | ||
3723 | 131 | /usr/local/Qt4.6/mkspecs/qconfig.pri \ | ||
3724 | 132 | /usr/local/Qt4.6/mkspecs/features/qt_functions.prf \ | ||
3725 | 133 | /usr/local/Qt4.6/mkspecs/features/qt_config.prf \ | ||
3726 | 134 | /usr/local/Qt4.6/mkspecs/features/exclusive_builds.prf \ | ||
3727 | 135 | /usr/local/Qt4.6/mkspecs/features/default_pre.prf \ | ||
3728 | 136 | /usr/local/Qt4.6/mkspecs/features/mac/default_pre.prf \ | ||
3729 | 137 | jrkerr.pro \ | ||
3730 | 138 | /usr/local/Qt4.6/mkspecs/features/mac/dwarf2.prf \ | ||
3731 | 139 | /usr/local/Qt4.6/mkspecs/features/debug.prf \ | ||
3732 | 140 | /usr/local/Qt4.6/mkspecs/features/default_post.prf \ | ||
3733 | 141 | /usr/local/Qt4.6/mkspecs/features/mac/default_post.prf \ | ||
3734 | 142 | /usr/local/Qt4.6/mkspecs/features/mac/x86.prf \ | ||
3735 | 143 | /usr/local/Qt4.6/mkspecs/features/mac/objective_c.prf \ | ||
3736 | 144 | /usr/local/Qt4.6/mkspecs/features/warn_on.prf \ | ||
3737 | 145 | /usr/local/Qt4.6/mkspecs/features/qt.prf \ | ||
3738 | 146 | /usr/local/Qt4.6/mkspecs/features/unix/thread.prf \ | ||
3739 | 147 | /usr/local/Qt4.6/mkspecs/features/moc.prf \ | ||
3740 | 148 | /usr/local/Qt4.6/mkspecs/features/mac/rez.prf \ | ||
3741 | 149 | /usr/local/Qt4.6/mkspecs/features/mac/sdk.prf \ | ||
3742 | 150 | /usr/local/Qt4.6/mkspecs/features/resources.prf \ | ||
3743 | 151 | /usr/local/Qt4.6/mkspecs/features/uic.prf \ | ||
3744 | 152 | /usr/local/Qt4.6/mkspecs/features/yacc.prf \ | ||
3745 | 153 | /usr/local/Qt4.6/mkspecs/features/lex.prf \ | ||
3746 | 154 | /usr/local/Qt4.6/mkspecs/features/include_source_dir.prf \ | ||
3747 | 155 | /Library/Frameworks/QtCore.framework/QtCore.prl | ||
3748 | 156 | $(QMAKE) -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile Path_Tester.pro | ||
3749 | 157 | /usr/local/Qt4.6/mkspecs/common/unix.conf: | ||
3750 | 158 | /usr/local/Qt4.6/mkspecs/common/mac.conf: | ||
3751 | 159 | /usr/local/Qt4.6/mkspecs/common/mac-g++.conf: | ||
3752 | 160 | /usr/local/Qt4.6/mkspecs/qconfig.pri: | ||
3753 | 161 | /usr/local/Qt4.6/mkspecs/features/qt_functions.prf: | ||
3754 | 162 | /usr/local/Qt4.6/mkspecs/features/qt_config.prf: | ||
3755 | 163 | /usr/local/Qt4.6/mkspecs/features/exclusive_builds.prf: | ||
3756 | 164 | /usr/local/Qt4.6/mkspecs/features/default_pre.prf: | ||
3757 | 165 | /usr/local/Qt4.6/mkspecs/features/mac/default_pre.prf: | ||
3758 | 166 | jrkerr.pro: | ||
3759 | 167 | /usr/local/Qt4.6/mkspecs/features/mac/dwarf2.prf: | ||
3760 | 168 | /usr/local/Qt4.6/mkspecs/features/debug.prf: | ||
3761 | 169 | /usr/local/Qt4.6/mkspecs/features/default_post.prf: | ||
3762 | 170 | /usr/local/Qt4.6/mkspecs/features/mac/default_post.prf: | ||
3763 | 171 | /usr/local/Qt4.6/mkspecs/features/mac/x86.prf: | ||
3764 | 172 | /usr/local/Qt4.6/mkspecs/features/mac/objective_c.prf: | ||
3765 | 173 | /usr/local/Qt4.6/mkspecs/features/warn_on.prf: | ||
3766 | 174 | /usr/local/Qt4.6/mkspecs/features/qt.prf: | ||
3767 | 175 | /usr/local/Qt4.6/mkspecs/features/unix/thread.prf: | ||
3768 | 176 | /usr/local/Qt4.6/mkspecs/features/moc.prf: | ||
3769 | 177 | /usr/local/Qt4.6/mkspecs/features/mac/rez.prf: | ||
3770 | 178 | /usr/local/Qt4.6/mkspecs/features/mac/sdk.prf: | ||
3771 | 179 | /usr/local/Qt4.6/mkspecs/features/resources.prf: | ||
3772 | 180 | /usr/local/Qt4.6/mkspecs/features/uic.prf: | ||
3773 | 181 | /usr/local/Qt4.6/mkspecs/features/yacc.prf: | ||
3774 | 182 | /usr/local/Qt4.6/mkspecs/features/lex.prf: | ||
3775 | 183 | /usr/local/Qt4.6/mkspecs/features/include_source_dir.prf: | ||
3776 | 184 | /Library/Frameworks/QtCore.framework/QtCore.prl: | ||
3777 | 185 | qmake: FORCE | ||
3778 | 186 | @$(QMAKE) -spec /usr/local/Qt4.6/mkspecs/macx-g++ -macx -o Makefile Path_Tester.pro | ||
3779 | 187 | |||
3780 | 188 | dist: | ||
3781 | 189 | @$(CHK_DIR_EXISTS) .tmp/Path_Tester1.0.0 || $(MKDIR) .tmp/Path_Tester1.0.0 | ||
3782 | 190 | $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/Path_Tester1.0.0/ && $(COPY_FILE) --parents ../../Common/JrKerr/nmccom.h ../../Common/JrKerr/picio.h ../../Common/JrKerr/picservo.h ../../Common/JrKerr/picstep.h ../../Common/JrKerr/path.h .tmp/Path_Tester1.0.0/ && $(COPY_FILE) --parents main.cpp ../../Common/JrKerr/nmccom.cpp ../../Common/JrKerr/picio.cpp ../../Common/JrKerr/picservo.cpp ../../Common/JrKerr/picstep.cpp ../../Common/JrKerr/path.cpp .tmp/Path_Tester1.0.0/ && (cd `dirname .tmp/Path_Tester1.0.0` && $(TAR) Path_Tester1.0.0.tar Path_Tester1.0.0 && $(COMPRESS) Path_Tester1.0.0.tar) && $(MOVE) `dirname .tmp/Path_Tester1.0.0`/Path_Tester1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/Path_Tester1.0.0 | ||
3783 | 191 | |||
3784 | 192 | |||
3785 | 193 | clean:compiler_clean | ||
3786 | 194 | -$(DEL_FILE) $(OBJECTS) | ||
3787 | 195 | -$(DEL_FILE) *~ core *.core | ||
3788 | 196 | |||
3789 | 197 | |||
3790 | 198 | ####### Sub-libraries | ||
3791 | 199 | |||
3792 | 200 | distclean: clean | ||
3793 | 201 | -$(DEL_FILE) $(TARGET) | ||
3794 | 202 | -$(DEL_FILE) Makefile | ||
3795 | 203 | |||
3796 | 204 | |||
3797 | 205 | check: first | ||
3798 | 206 | |||
3799 | 207 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | ||
3800 | 208 | |||
3801 | 209 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | ||
3802 | 210 | |||
3803 | 211 | compiler_objective_c_make_all: | ||
3804 | 212 | compiler_objective_c_clean: | ||
3805 | 213 | compiler_moc_header_make_all: | ||
3806 | 214 | compiler_moc_header_clean: | ||
3807 | 215 | compiler_rcc_make_all: | ||
3808 | 216 | compiler_rcc_clean: | ||
3809 | 217 | compiler_image_collection_make_all: qmake_image_collection.cpp | ||
3810 | 218 | compiler_image_collection_clean: | ||
3811 | 219 | -$(DEL_FILE) qmake_image_collection.cpp | ||
3812 | 220 | compiler_moc_source_make_all: | ||
3813 | 221 | compiler_moc_source_clean: | ||
3814 | 222 | compiler_rez_source_make_all: | ||
3815 | 223 | compiler_rez_source_clean: | ||
3816 | 224 | compiler_uic_make_all: | ||
3817 | 225 | compiler_uic_clean: | ||
3818 | 226 | compiler_yacc_decl_make_all: | ||
3819 | 227 | compiler_yacc_decl_clean: | ||
3820 | 228 | compiler_yacc_impl_make_all: | ||
3821 | 229 | compiler_yacc_impl_clean: | ||
3822 | 230 | compiler_lex_make_all: | ||
3823 | 231 | compiler_lex_clean: | ||
3824 | 232 | compiler_clean: | ||
3825 | 233 | |||
3826 | 234 | ####### Compile | ||
3827 | 235 | |||
3828 | 236 | main.o: main.cpp ../../Common/JrKerr/path.h \ | ||
3829 | 237 | ../../Common/JrKerr/picservo.h \ | ||
3830 | 238 | ../../Common/JrKerr/nmccom.h | ||
3831 | 239 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp | ||
3832 | 240 | |||
3833 | 241 | nmccom.o: ../../Common/JrKerr/nmccom.cpp ../../Common/JrKerr/nmccom.h \ | ||
3834 | 242 | ../../Common/JrKerr/picio.h \ | ||
3835 | 243 | ../../Common/JrKerr/picservo.h \ | ||
3836 | 244 | ../../Common/JrKerr/picstep.h | ||
3837 | 245 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nmccom.o ../../Common/JrKerr/nmccom.cpp | ||
3838 | 246 | |||
3839 | 247 | picio.o: ../../Common/JrKerr/picio.cpp ../../Common/JrKerr/nmccom.h \ | ||
3840 | 248 | ../../Common/JrKerr/picio.h | ||
3841 | 249 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o picio.o ../../Common/JrKerr/picio.cpp | ||
3842 | 250 | |||
3843 | 251 | picservo.o: ../../Common/JrKerr/picservo.cpp ../../Common/JrKerr/nmccom.h \ | ||
3844 | 252 | ../../Common/JrKerr/picservo.h | ||
3845 | 253 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o picservo.o ../../Common/JrKerr/picservo.cpp | ||
3846 | 254 | |||
3847 | 255 | picstep.o: ../../Common/JrKerr/picstep.cpp ../../Common/JrKerr/nmccom.h \ | ||
3848 | 256 | ../../Common/JrKerr/picstep.h | ||
3849 | 257 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o picstep.o ../../Common/JrKerr/picstep.cpp | ||
3850 | 258 | |||
3851 | 259 | path.o: ../../Common/JrKerr/path.cpp ../../Common/JrKerr/path.h \ | ||
3852 | 260 | ../../Common/JrKerr/nmccom.h \ | ||
3853 | 261 | ../../Common/JrKerr/picservo.h | ||
3854 | 262 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o path.o ../../Common/JrKerr/path.cpp | ||
3855 | 263 | |||
3856 | 264 | ####### Install | ||
3857 | 265 | |||
3858 | 266 | install: FORCE | ||
3859 | 267 | |||
3860 | 268 | uninstall: FORCE | ||
3861 | 269 | |||
3862 | 270 | FORCE: | ||
3863 | 271 | |||
3864 | 0 | 272 | ||
3865 | === added file 'software/FabInterpreter/Path_Tester/Path_Tester' | |||
3866 | 1 | Binary files software/FabInterpreter/Path_Tester/Path_Tester 1970-01-01 00:00:00 +0000 and software/FabInterpreter/Path_Tester/Path_Tester 2010-08-07 00:08:43 +0000 differ | 273 | Binary files software/FabInterpreter/Path_Tester/Path_Tester 1970-01-01 00:00:00 +0000 and software/FabInterpreter/Path_Tester/Path_Tester 2010-08-07 00:08:43 +0000 differ |
3867 | === added file 'software/FabInterpreter/Path_Tester/Path_Tester.pro' | |||
3868 | --- software/FabInterpreter/Path_Tester/Path_Tester.pro 1970-01-01 00:00:00 +0000 | |||
3869 | +++ software/FabInterpreter/Path_Tester/Path_Tester.pro 2010-08-07 00:08:43 +0000 | |||
3870 | @@ -0,0 +1,21 @@ | |||
3871 | 1 | #------------------------------------------------- | ||
3872 | 2 | # | ||
3873 | 3 | # Project created by QtCreator 2010-07-28T12:10:08 | ||
3874 | 4 | # | ||
3875 | 5 | #------------------------------------------------- | ||
3876 | 6 | |||
3877 | 7 | QT -= gui | ||
3878 | 8 | |||
3879 | 9 | TARGET = Path_Tester | ||
3880 | 10 | CONFIG += console | ||
3881 | 11 | CONFIG -= app_bundle | ||
3882 | 12 | |||
3883 | 13 | INCLUDEPATH += ../../Common/JrKerr | ||
3884 | 14 | |||
3885 | 15 | |||
3886 | 16 | TEMPLATE = app | ||
3887 | 17 | |||
3888 | 18 | |||
3889 | 19 | SOURCES += main.cpp | ||
3890 | 20 | |||
3891 | 21 | include("jrkerr.pro") | ||
3892 | 0 | 22 | ||
3893 | === added file 'software/FabInterpreter/Path_Tester/Path_Tester.pro.user' | |||
3894 | --- software/FabInterpreter/Path_Tester/Path_Tester.pro.user 1970-01-01 00:00:00 +0000 | |||
3895 | +++ software/FabInterpreter/Path_Tester/Path_Tester.pro.user 2010-08-07 00:08:43 +0000 | |||
3896 | @@ -0,0 +1,228 @@ | |||
3897 | 1 | <!DOCTYPE QtCreatorProject> | ||
3898 | 2 | <qtcreator> | ||
3899 | 3 | <data> | ||
3900 | 4 | <variable>RunConfiguration0-BaseEnvironmentBase</variable> | ||
3901 | 5 | <value type="int">2</value> | ||
3902 | 6 | </data> | ||
3903 | 7 | <data> | ||
3904 | 8 | <variable>RunConfiguration0-CommandLineArguments</variable> | ||
3905 | 9 | <valuelist type="QVariantList"/> | ||
3906 | 10 | </data> | ||
3907 | 11 | <data> | ||
3908 | 12 | <variable>RunConfiguration0-ProFile</variable> | ||
3909 | 13 | <value type="QString">Path_Tester.pro</value> | ||
3910 | 14 | </data> | ||
3911 | 15 | <data> | ||
3912 | 16 | <variable>RunConfiguration0-RunConfiguration.name</variable> | ||
3913 | 17 | <value type="QString">Path_Tester</value> | ||
3914 | 18 | </data> | ||
3915 | 19 | <data> | ||
3916 | 20 | <variable>RunConfiguration0-UseDyldImageSuffix</variable> | ||
3917 | 21 | <value type="bool">false</value> | ||
3918 | 22 | </data> | ||
3919 | 23 | <data> | ||
3920 | 24 | <variable>RunConfiguration0-UseTerminal</variable> | ||
3921 | 25 | <value type="bool">false</value> | ||
3922 | 26 | </data> | ||
3923 | 27 | <data> | ||
3924 | 28 | <variable>RunConfiguration0-UserEnvironmentChanges</variable> | ||
3925 | 29 | <valuelist type="QVariantList"> | ||
3926 | 30 | <value type="QString">DYLD_LIBRARY_PATH=/Users/jcman912/Documents/Fab@Home/Interpreter_Experimental/software/Common/JrKerr/src/build/</value> | ||
3927 | 31 | </valuelist> | ||
3928 | 32 | </data> | ||
3929 | 33 | <data> | ||
3930 | 34 | <variable>RunConfiguration0-UserSetName</variable> | ||
3931 | 35 | <value type="bool">false</value> | ||
3932 | 36 | </data> | ||
3933 | 37 | <data> | ||
3934 | 38 | <variable>RunConfiguration0-UserSetWorkingDirectory</variable> | ||
3935 | 39 | <value type="bool">false</value> | ||
3936 | 40 | </data> | ||
3937 | 41 | <data> | ||
3938 | 42 | <variable>RunConfiguration0-UserWorkingDirectory</variable> | ||
3939 | 43 | <value type="QString"></value> | ||
3940 | 44 | </data> | ||
3941 | 45 | <data> | ||
3942 | 46 | <variable>RunConfiguration0-type</variable> | ||
3943 | 47 | <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value> | ||
3944 | 48 | </data> | ||
3945 | 49 | <data> | ||
3946 | 50 | <variable>activeRunConfiguration</variable> | ||
3947 | 51 | <value type="int">0</value> | ||
3948 | 52 | </data> | ||
3949 | 53 | <data> | ||
3950 | 54 | <variable>activebuildconfiguration</variable> | ||
3951 | 55 | <value type="QString">Debug</value> | ||
3952 | 56 | </data> | ||
3953 | 57 | <data> | ||
3954 | 58 | <variable>buildConfiguration-Debug</variable> | ||
3955 | 59 | <valuemap type="QVariantMap"> | ||
3956 | 60 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | ||
3957 | 61 | <value key="QtVersionId" type="int">0</value> | ||
3958 | 62 | <value key="ToolChain" type="int">0</value> | ||
3959 | 63 | <value key="buildConfiguration" type="int">2</value> | ||
3960 | 64 | </valuemap> | ||
3961 | 65 | </data> | ||
3962 | 66 | <data> | ||
3963 | 67 | <variable>buildConfiguration-Release</variable> | ||
3964 | 68 | <valuemap type="QVariantMap"> | ||
3965 | 69 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | ||
3966 | 70 | <value key="QtVersionId" type="int">0</value> | ||
3967 | 71 | <value key="buildConfiguration" type="int">0</value> | ||
3968 | 72 | </valuemap> | ||
3969 | 73 | </data> | ||
3970 | 74 | <data> | ||
3971 | 75 | <variable>buildconfiguration-Debug-buildstep0</variable> | ||
3972 | 76 | <valuemap type="QVariantMap"> | ||
3973 | 77 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | ||
3974 | 78 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
3975 | 79 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-4YVcSb/Render</value> | ||
3976 | 80 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
3977 | 81 | <value type="QString">DISPLAY=/tmp/launch-2sCJnY/:0</value> | ||
3978 | 82 | <value type="QString">HOME=/Users/jcman912</value> | ||
3979 | 83 | <value type="QString">LOGNAME=jcman912</value> | ||
3980 | 84 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
3981 | 85 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
3982 | 86 | <value type="QString">SHELL=/bin/bash</value> | ||
3983 | 87 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-CtydgP/Listeners</value> | ||
3984 | 88 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
3985 | 89 | <value type="QString">USER=jcman912</value> | ||
3986 | 90 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
3987 | 91 | </valuelist> | ||
3988 | 92 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
3989 | 93 | <value type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Experimental/software/FabInterpreter/Path_Tester/Path_Tester.pro</value> | ||
3990 | 94 | <value type="QString">-spec</value> | ||
3991 | 95 | <value type="QString">macx-g++</value> | ||
3992 | 96 | <value type="QString">-r</value> | ||
3993 | 97 | </valuelist> | ||
3994 | 98 | <value key="abstractProcess.command" type="QString">/usr/bin/qmake</value> | ||
3995 | 99 | <value key="abstractProcess.enabled" type="bool">false</value> | ||
3996 | 100 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Experimental/software/FabInterpreter/Path_Tester</value> | ||
3997 | 101 | </valuemap> | ||
3998 | 102 | </data> | ||
3999 | 103 | <data> | ||
4000 | 104 | <variable>buildconfiguration-Debug-buildstep1</variable> | ||
4001 | 105 | <valuemap type="QVariantMap"> | ||
4002 | 106 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | ||
4003 | 107 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
4004 | 108 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-4YVcSb/Render</value> | ||
4005 | 109 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
4006 | 110 | <value type="QString">DISPLAY=/tmp/launch-2sCJnY/:0</value> | ||
4007 | 111 | <value type="QString">HOME=/Users/jcman912</value> | ||
4008 | 112 | <value type="QString">LOGNAME=jcman912</value> | ||
4009 | 113 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
4010 | 114 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
4011 | 115 | <value type="QString">SHELL=/bin/bash</value> | ||
4012 | 116 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-CtydgP/Listeners</value> | ||
4013 | 117 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
4014 | 118 | <value type="QString">USER=jcman912</value> | ||
4015 | 119 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
4016 | 120 | </valuelist> | ||
4017 | 121 | <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value> | ||
4018 | 122 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
4019 | 123 | <value type="QString">-w</value> | ||
4020 | 124 | </valuelist> | ||
4021 | 125 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | ||
4022 | 126 | <value key="abstractProcess.enabled" type="bool">true</value> | ||
4023 | 127 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Experimental/software/FabInterpreter/Path_Tester</value> | ||
4024 | 128 | </valuemap> | ||
4025 | 129 | </data> | ||
4026 | 130 | <data> | ||
4027 | 131 | <variable>buildconfiguration-Debug-cleanstep0</variable> | ||
4028 | 132 | <valuemap type="QVariantMap"> | ||
4029 | 133 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value> | ||
4030 | 134 | <valuelist key="abstractProcess.Environment" type="QVariantList"> | ||
4031 | 135 | <value type="QString">Apple_PubSub_Socket_Render=/tmp/launch-4YVcSb/Render</value> | ||
4032 | 136 | <value type="QString">COMMAND_MODE=unix2003</value> | ||
4033 | 137 | <value type="QString">DISPLAY=/tmp/launch-2sCJnY/:0</value> | ||
4034 | 138 | <value type="QString">HOME=/Users/jcman912</value> | ||
4035 | 139 | <value type="QString">LOGNAME=jcman912</value> | ||
4036 | 140 | <value type="QString">PATH=/Developer/Tools/Qt:/usr/bin:/bin:/usr/sbin:/sbin</value> | ||
4037 | 141 | <value type="QString">QTDIR=/usr/local/Qt4.6</value> | ||
4038 | 142 | <value type="QString">SHELL=/bin/bash</value> | ||
4039 | 143 | <value type="QString">SSH_AUTH_SOCK=/tmp/launch-CtydgP/Listeners</value> | ||
4040 | 144 | <value type="QString">TMPDIR=/var/folders/8P/8PQFGUtFGT8ZgHC7XbQ0r++++TI/-Tmp-/</value> | ||
4041 | 145 | <value type="QString">USER=jcman912</value> | ||
4042 | 146 | <value type="QString">__CF_USER_TEXT_ENCODING=0x1F5:0:0</value> | ||
4043 | 147 | </valuelist> | ||
4044 | 148 | <value key="abstractProcess.IgnoreReturnValue" type="bool">true</value> | ||
4045 | 149 | <valuelist key="abstractProcess.arguments" type="QVariantList"> | ||
4046 | 150 | <value type="QString">clean</value> | ||
4047 | 151 | <value type="QString">-w</value> | ||
4048 | 152 | </valuelist> | ||
4049 | 153 | <value key="abstractProcess.command" type="QString">/usr/bin/make</value> | ||
4050 | 154 | <value key="abstractProcess.enabled" type="bool">true</value> | ||
4051 | 155 | <value key="abstractProcess.workingDirectory" type="QString">/Users/jcman912/Documents/Fab@Home/Interpreter_Experimental/software/FabInterpreter/Path_Tester</value> | ||
4052 | 156 | <value key="cleanConfig" type="bool">true</value> | ||
4053 | 157 | <valuelist key="makeargs" type="QVariantList"> | ||
4054 | 158 | <value type="QString">clean</value> | ||
4055 | 159 | </valuelist> | ||
4056 | 160 | </valuemap> | ||
4057 | 161 | </data> | ||
4058 | 162 | <data> | ||
4059 | 163 | <variable>buildconfiguration-Release-buildstep0</variable> | ||
4060 | 164 | <valuemap type="QVariantMap"> | ||
4061 | 165 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | ||
4062 | 166 | </valuemap> | ||
4063 | 167 | </data> | ||
4064 | 168 | <data> | ||
4065 | 169 | <variable>buildconfiguration-Release-buildstep1</variable> | ||
4066 | 170 | <valuemap type="QVariantMap"> | ||
4067 | 171 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | ||
4068 | 172 | </valuemap> | ||
4069 | 173 | </data> | ||
4070 | 174 | <data> | ||
4071 | 175 | <variable>buildconfiguration-Release-cleanstep0</variable> | ||
4072 | 176 | <valuemap type="QVariantMap"> | ||
4073 | 177 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value> | ||
4074 | 178 | </valuemap> | ||
4075 | 179 | </data> | ||
4076 | 180 | <data> | ||
4077 | 181 | <variable>buildconfigurations</variable> | ||
4078 | 182 | <valuelist type="QVariantList"> | ||
4079 | 183 | <value type="QString">Debug</value> | ||
4080 | 184 | <value type="QString">Release</value> | ||
4081 | 185 | </valuelist> | ||
4082 | 186 | </data> | ||
4083 | 187 | <data> | ||
4084 | 188 | <variable>buildstep0</variable> | ||
4085 | 189 | <valuemap type="QVariantMap"> | ||
4086 | 190 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value> | ||
4087 | 191 | <value key="mkspec" type="QString"></value> | ||
4088 | 192 | </valuemap> | ||
4089 | 193 | </data> | ||
4090 | 194 | <data> | ||
4091 | 195 | <variable>buildstep1</variable> | ||
4092 | 196 | <valuemap type="QVariantMap"> | ||
4093 | 197 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value> | ||
4094 | 198 | </valuemap> | ||
4095 | 199 | </data> | ||
4096 | 200 | <data> | ||
4097 | 201 | <variable>buildsteps</variable> | ||
4098 | 202 | <valuelist type="QVariantList"> | ||
4099 | 203 | <value type="QString">trolltech.qt4projectmanager.qmake</value> | ||
4100 | 204 | <value type="QString">trolltech.qt4projectmanager.make</value> | ||
4101 | 205 | </valuelist> | ||
4102 | 206 | </data> | ||
4103 | 207 | <data> | ||
4104 | 208 | <variable>cleanstep0</variable> | ||
4105 | 209 | <valuemap type="QVariantMap"> | ||
4106 | 210 | <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value> | ||
4107 | 211 | <value key="clean" type="bool">true</value> | ||
4108 | 212 | </valuemap> | ||
4109 | 213 | </data> | ||
4110 | 214 | <data> | ||
4111 | 215 | <variable>cleansteps</variable> | ||
4112 | 216 | <valuelist type="QVariantList"> | ||
4113 | 217 | <value type="QString">trolltech.qt4projectmanager.make</value> | ||
4114 | 218 | </valuelist> | ||
4115 | 219 | </data> | ||
4116 | 220 | <data> | ||
4117 | 221 | <variable>defaultFileEncoding</variable> | ||
4118 | 222 | <value type="QByteArray">System</value> | ||
4119 | 223 | </data> | ||
4120 | 224 | <data> | ||
4121 | 225 | <variable>project</variable> | ||
4122 | 226 | <valuemap type="QVariantMap"/> | ||
4123 | 227 | </data> | ||
4124 | 228 | </qtcreator> | ||
4125 | 0 | 229 | ||
4126 | === added file 'software/FabInterpreter/Path_Tester/jrkerr.pro' | |||
4127 | --- software/FabInterpreter/Path_Tester/jrkerr.pro 1970-01-01 00:00:00 +0000 | |||
4128 | +++ software/FabInterpreter/Path_Tester/jrkerr.pro 2010-08-07 00:08:43 +0000 | |||
4129 | @@ -0,0 +1,18 @@ | |||
4130 | 1 | DEPENDPATH += ../../Common/JrKerr | ||
4131 | 2 | INCLUDEPATH += ../../Common/JrKerr/src | ||
4132 | 3 | QMAKE_LIBDIR += ../../Common/JrKerr/src/build | ||
4133 | 4 | |||
4134 | 5 | HEADERS += ../../Common/JrKerr/nmccom.h \ | ||
4135 | 6 | ../../Common/JrKerr/picio.h \ | ||
4136 | 7 | ../../Common/JrKerr/picservo.h\ | ||
4137 | 8 | ../../Common/JrKerr/picstep.h \ | ||
4138 | 9 | ../../Common/JrKerr/path.h | ||
4139 | 10 | |||
4140 | 11 | SOURCES += ../../Common/JrKerr/nmccom.cpp \ | ||
4141 | 12 | ../../Common/JrKerr/picio.cpp \ | ||
4142 | 13 | ../../Common/JrKerr/picservo.cpp\ | ||
4143 | 14 | ../../Common/JrKerr/picstep.cpp \ | ||
4144 | 15 | ../../Common/JrKerr/path.cpp | ||
4145 | 16 | |||
4146 | 17 | CONFIG(debug, debug|release):LIBS += -lqextserialportd | ||
4147 | 18 | else:LIBS += -lqextserialport | ||
4148 | 0 | 19 | ||
4149 | === added file 'software/FabInterpreter/Path_Tester/main.cpp' | |||
4150 | --- software/FabInterpreter/Path_Tester/main.cpp 1970-01-01 00:00:00 +0000 | |||
4151 | +++ software/FabInterpreter/Path_Tester/main.cpp 2010-08-07 00:08:43 +0000 | |||
4152 | @@ -0,0 +1,177 @@ | |||
4153 | 1 | #include <QtCore/QCoreApplication> | ||
4154 | 2 | #include "path.h" | ||
4155 | 3 | #include "picservo.h" | ||
4156 | 4 | #include "nmccom.h" | ||
4157 | 5 | #include <unistd.h> | ||
4158 | 6 | #include <qdebug.h> | ||
4159 | 7 | |||
4160 | 8 | void initialize(); | ||
4161 | 9 | void execute(); | ||
4162 | 10 | void ExecutePath(); | ||
4163 | 11 | void ReportError(int); | ||
4164 | 12 | |||
4165 | 13 | void initialize() | ||
4166 | 14 | { | ||
4167 | 15 | qDebug() << "Please turn on Servo Controller Power"; | ||
4168 | 16 | |||
4169 | 17 | int nummod = NmcInit("/dev/tty.usbserial-A9003UF2", 19200); //Controllers on COM1, use 115200 baud | ||
4170 | 18 | |||
4171 | 19 | if (nummod < 2) | ||
4172 | 20 | { | ||
4173 | 21 | qDebug() << "2 servos not found"; | ||
4174 | 22 | qDebug() << "exiting..."; | ||
4175 | 23 | } | ||
4176 | 24 | |||
4177 | 25 | //Set the group address for both controllers to 128 | ||
4178 | 26 | NmcSetGroupAddr(1, 128, true); //x axis is the group leader | ||
4179 | 27 | NmcSetGroupAddr(2, 128, false); //y axis is a group member | ||
4180 | 28 | |||
4181 | 29 | ServoSetGain(2, //Axis = 2 | ||
4182 | 30 | 100, //Kp = 100 | ||
4183 | 31 | 1000, //Kd = 1000 | ||
4184 | 32 | 0, //Ki = 0 | ||
4185 | 33 | 0, //IL = 0 | ||
4186 | 34 | 255, //OL = 255 | ||
4187 | 35 | 0, //CL = 0 | ||
4188 | 36 | 2000, //EL = 2000 | ||
4189 | 37 | 1, //SR = 1 | ||
4190 | 38 | 0); //DC = 0; | ||
4191 | 39 | |||
4192 | 40 | //Initialize the servos | ||
4193 | 41 | ServoStopMotor(1, AMP_ENABLE | STOP_ABRUPT | ADV_FEATURE); | ||
4194 | 42 | ServoStopMotor(2, AMP_ENABLE | STOP_ABRUPT | ADV_FEATURE); | ||
4195 | 43 | |||
4196 | 44 | //Reset the current motor positions to zero | ||
4197 | 45 | ServoResetPos(1); | ||
4198 | 46 | ServoResetPos(2); | ||
4199 | 47 | |||
4200 | 48 | //Set the required status items for the path control module | ||
4201 | 49 | NmcDefineStatus(1, SEND_POS | SEND_NPOINTS | SEND_PERROR | SEND_AUX); | ||
4202 | 50 | NmcDefineStatus(2, SEND_POS | SEND_NPOINTS | SEND_PERROR | SEND_AUX); | ||
4203 | 51 | |||
4204 | 52 | ServoSetIoCtrl(1, THREE_PHASE); | ||
4205 | 53 | ServoSetIoCtrl(2, THREE_PHASE); | ||
4206 | 54 | |||
4207 | 55 | //Initialize path control module parameters | ||
4208 | 56 | SetPathParams2(P_30HZ, //path frequency = 30 Hz | ||
4209 | 57 | 10, //Store a minimum of 45 points in the path point buffer | ||
4210 | 58 | 1, //X axis is module address 1 | ||
4211 | 59 | 2, //Y axis is module address 2 | ||
4212 | 60 | 0, //Z axis not used = set address to 0 | ||
4213 | 61 | 128, //group address = 128 | ||
4214 | 62 | 1, //x axis is group leader | ||
4215 | 63 | 20000.0, //X scale - 20000.0 counts per inch | ||
4216 | 64 | 20000.0, //Y scale - 20000.0 counts per inch | ||
4217 | 65 | 1.0, //Z scale - 1.0 counts per inch - not used | ||
4218 | 66 | 1.0); //acceleration = 1.0 inch/second/second | ||
4219 | 67 | |||
4220 | 68 | SetOrigin(0.0, 0.0, 0.0); //set the origin to X = 0, Y = 0, Z = 0 | ||
4221 | 69 | SetFeedrate(1.0); //feedrate = 1.0 inches/second | ||
4222 | 70 | SetTangentTolerance(10.0); //continuous path tangent tolerence = 10 degrees | ||
4223 | 71 | |||
4224 | 72 | } | ||
4225 | 73 | void ExecutePath() | ||
4226 | 74 | { | ||
4227 | 75 | // | ||
4228 | 76 | //Initialize the path just before execution | ||
4229 | 77 | // | ||
4230 | 78 | InitPath(); | ||
4231 | 79 | |||
4232 | 80 | // | ||
4233 | 81 | //Download path points to the PIC-SERVO CMC modules until all points are | ||
4234 | 82 | // downloaded. Motion will begin automatically when the minimum number | ||
4235 | 83 | // of path points have been loaded. | ||
4236 | 84 | // | ||
4237 | 85 | while ( AddPathPoints() != -1 ) ; | ||
4238 | 86 | |||
4239 | 87 | // | ||
4240 | 88 | //Poll the X axis module to detect when the path is complete | ||
4241 | 89 | // | ||
4242 | 90 | do | ||
4243 | 91 | { | ||
4244 | 92 | NmcNoOp(1); //retrieve current status data | ||
4245 | 93 | } | ||
4246 | 94 | while ( ServoGetAux(1) & PATH_MODE ); //poll while still in path mode | ||
4247 | 95 | } | ||
4248 | 96 | |||
4249 | 97 | void execute() | ||
4250 | 98 | { | ||
4251 | 99 | // | ||
4252 | 100 | //Clear the segment list and initialize the starting point for the path | ||
4253 | 101 | // | ||
4254 | 102 | ClearSegList(0.0, 0.0, 0.0); //Clear the segment list and set the | ||
4255 | 103 | // starting point for the path | ||
4256 | 104 | // at X = 0, Y = 1, Z = 0 | ||
4257 | 105 | |||
4258 | 106 | // | ||
4259 | 107 | //Add line and arc segments to the path module's segment list for first move | ||
4260 | 108 | // | ||
4261 | 109 | int res = AddLineSeg(0.0, 2.0, 0.0); //Add a segment to move to x=0, y=2, z=0 | ||
4262 | 110 | if (res<0) ReportError(res); | ||
4263 | 111 | |||
4264 | 112 | res = AddArcSeg( 1.0, 3.0, 0.0, //end point of arc: x=1, y=3, z=0 | ||
4265 | 113 | 1.0, 2.0, 0.0, //center point of arc: x=1, y=2, z = 0 | ||
4266 | 114 | 0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1 | ||
4267 | 115 | if (res<0) ReportError(res); | ||
4268 | 116 | |||
4269 | 117 | res = AddLineSeg(4.0, 3.0, 0.0); //line segment endpoint: x=4, y=3, z=0 | ||
4270 | 118 | if (res<0) ReportError(res); | ||
4271 | 119 | |||
4272 | 120 | |||
4273 | 121 | res = AddArcSeg( 5.0, 2.0, 0.0, //end point of arc: x=5, y=2, z=0 | ||
4274 | 122 | 4.0, 2.0, 0.0, //center point of arc: x=4, y=2, z = 0 | ||
4275 | 123 | 0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1 | ||
4276 | 124 | if (res<0) ReportError(res); | ||
4277 | 125 | |||
4278 | 126 | res = AddLineSeg(5.0, 0.0, 0.0); //line segment endpoint: x=5, y=0, z=0 | ||
4279 | 127 | if (res<0) ReportError(res); | ||
4280 | 128 | |||
4281 | 129 | // | ||
4282 | 130 | //Run path and wait for completion | ||
4283 | 131 | // | ||
4284 | 132 | ExecutePath(); | ||
4285 | 133 | |||
4286 | 134 | // | ||
4287 | 135 | //Clear the segment list and initialize the starting point for the second path | ||
4288 | 136 | //back to the origin | ||
4289 | 137 | // | ||
4290 | 138 | ClearSegList(5.0, 0.0, 0.0); //Clear the segment list and set the | ||
4291 | 139 | // starting point for the path | ||
4292 | 140 | // at X = 5, Y = 0, Z = 0 | ||
4293 | 141 | |||
4294 | 142 | // | ||
4295 | 143 | //Add line segment to move back to the origin | ||
4296 | 144 | // | ||
4297 | 145 | res = AddLineSeg(0.0, 0.0, 0.0); //Add a segment to move to x=0, y=0, z=0 | ||
4298 | 146 | if (res<0) ReportError(res); | ||
4299 | 147 | |||
4300 | 148 | ExecutePath(); //Runs path and waits for completion | ||
4301 | 149 | } | ||
4302 | 150 | |||
4303 | 151 | void ReportError(int errnum) | ||
4304 | 152 | { | ||
4305 | 153 | switch (errnum) | ||
4306 | 154 | { | ||
4307 | 155 | case -1: qDebug() << "Segment added is not tangent to the previous segment"; | ||
4308 | 156 | break; | ||
4309 | 157 | case -2: qDebug() << "Too many segments in the segment list"; | ||
4310 | 158 | break; | ||
4311 | 159 | case -3: qDebug() << "Values given do not define a correct arc"; | ||
4312 | 160 | break; | ||
4313 | 161 | } | ||
4314 | 162 | qDebug() << "Exit now"; | ||
4315 | 163 | } | ||
4316 | 164 | |||
4317 | 165 | int main(int argc, char *argv[]) | ||
4318 | 166 | { | ||
4319 | 167 | QCoreApplication a(argc, argv); | ||
4320 | 168 | |||
4321 | 169 | initialize(); | ||
4322 | 170 | |||
4323 | 171 | sleep(1); | ||
4324 | 172 | |||
4325 | 173 | execute(); | ||
4326 | 174 | |||
4327 | 175 | |||
4328 | 176 | return a.exec(); | ||
4329 | 177 | } | ||
4330 | 0 | 178 | ||
4331 | === modified file 'software/FabInterpreter/Util.h' | |||
4332 | --- software/FabInterpreter/Util.h 2010-07-22 15:32:37 +0000 | |||
4333 | +++ software/FabInterpreter/Util.h 2010-08-07 00:08:43 +0000 | |||
4334 | @@ -12,7 +12,7 @@ | |||
4335 | 12 | #include <time.h> | 12 | #include <time.h> |
4336 | 13 | #include <algorithm> | 13 | #include <algorithm> |
4337 | 14 | #include <QMessageBox> | 14 | #include <QMessageBox> |
4339 | 15 | #include "../Common/tinyxml/tinyxml.h" | 15 | #include "tinyxml.h" |
4340 | 16 | using namespace std; | 16 | using namespace std; |
4341 | 17 | 17 | ||
4342 | 18 | 18 | ||
4343 | @@ -109,12 +109,7 @@ | |||
4344 | 109 | 109 | ||
4345 | 110 | public: static void messageBox(const string& message) | 110 | public: static void messageBox(const string& message) |
4346 | 111 | { | 111 | { |
4353 | 112 | /* | 112 | QMessageBox::warning(0, "", message.c_str()); |
4348 | 113 | QMessageBox:; | ||
4349 | 114 | QString str(message.c_str()); | ||
4350 | 115 | msgBox.setText(str); | ||
4351 | 116 | msgBox.exec(); | ||
4352 | 117 | */ | ||
4354 | 118 | printf(message.c_str()); | 113 | printf(message.c_str()); |
4355 | 119 | printf("\n"); | 114 | printf("\n"); |
4356 | 120 | } | 115 | } |
4357 | 121 | 116 | ||
4358 | === modified file 'software/FabInterpreter/guicomponentsthread.cpp' | |||
4359 | --- software/FabInterpreter/guicomponentsthread.cpp 2010-07-22 15:32:37 +0000 | |||
4360 | +++ software/FabInterpreter/guicomponentsthread.cpp 2010-08-07 00:08:43 +0000 | |||
4361 | @@ -1,24 +1,27 @@ | |||
4362 | 1 | #include "guicomponentsthread.h" | 1 | #include "guicomponentsthread.h" |
4363 | 2 | 2 | ||
4365 | 3 | GUIComponentsThread::GUIComponentsThread() | 3 | |
4366 | 4 | GUIComponentsThread::GUIComponentsThread(QObject* parent) : QThread(parent) | ||
4367 | 4 | { | 5 | { |
4368 | 5 | } | 6 | } |
4369 | 6 | 7 | ||
4373 | 7 | GUIComponentsThread::GUIComponentsThread(FabAtHomePrinter* newPrinter) : printer(newPrinter) {} | 8 | int posDisplayPeriod = 1; //Number of seconds between position updates in user interface. |
4371 | 8 | |||
4372 | 9 | long posDisplayPeriod = 1; //Number of seconds between position updates in user interface. | ||
4374 | 10 | bool enablePosDisplay; | 9 | bool enablePosDisplay; |
4375 | 11 | 10 | ||
4376 | 11 | GUIComponentsThread::~GUIComponentsThread() | ||
4377 | 12 | { | ||
4378 | 13 | } | ||
4379 | 14 | |||
4380 | 15 | |||
4381 | 12 | void GUIComponentsThread::run() | 16 | void GUIComponentsThread::run() |
4382 | 13 | { | 17 | { |
4383 | 14 | int c = 0; | ||
4384 | 15 | //updates position display | 18 | //updates position display |
4385 | 16 | while (enablePosDisplay) | 19 | while (enablePosDisplay) |
4386 | 17 | { | 20 | { |
4390 | 18 | c = (c == 0 ? 1 : 0); | 21 | reportProgress(); |
4391 | 19 | printer->GUI_reportProgress(); | 22 | sleep(posDisplayPeriod); |
4389 | 20 | sleep(posDisplayPeriod * 1000); | ||
4392 | 21 | } | 23 | } |
4393 | 24 | finished(); | ||
4394 | 22 | } | 25 | } |
4395 | 23 | 26 | ||
4396 | 24 | void GUIComponentsThread::enablePositionDisplay() | 27 | void GUIComponentsThread::enablePositionDisplay() |
4397 | @@ -31,3 +34,8 @@ | |||
4398 | 31 | { | 34 | { |
4399 | 32 | enablePosDisplay = false; | 35 | enablePosDisplay = false; |
4400 | 33 | } | 36 | } |
4401 | 37 | |||
4402 | 38 | bool GUIComponentsThread::isEnabled() | ||
4403 | 39 | { | ||
4404 | 40 | return enablePosDisplay; | ||
4405 | 41 | } | ||
4406 | 34 | 42 | ||
4407 | === modified file 'software/FabInterpreter/guicomponentsthread.h' | |||
4408 | --- software/FabInterpreter/guicomponentsthread.h 2010-07-22 15:32:37 +0000 | |||
4409 | +++ software/FabInterpreter/guicomponentsthread.h 2010-08-07 00:08:43 +0000 | |||
4410 | @@ -1,28 +1,35 @@ | |||
4411 | 1 | #ifndef GUICOMPONENTSTHREAD_H | 1 | #ifndef GUICOMPONENTSTHREAD_H |
4412 | 2 | #define GUICOMPONENTSTHREAD_H | 2 | #define GUICOMPONENTSTHREAD_H |
4413 | 3 | 3 | ||
4415 | 4 | #include <QThread> | 4 | #include <qthread.h> |
4416 | 5 | #include "FabAtHomePrinter.h" | 5 | #include "FabAtHomePrinter.h" |
4417 | 6 | 6 | ||
4418 | 7 | |||
4419 | 7 | class GUIComponentsThread : public QThread | 8 | class GUIComponentsThread : public QThread |
4439 | 8 | { | 9 | { |
4440 | 9 | 10 | ||
4441 | 10 | public: | 11 | Q_OBJECT |
4442 | 11 | GUIComponentsThread(); | 12 | |
4443 | 12 | 13 | public: | |
4444 | 13 | GUIComponentsThread(FabAtHomePrinter* newPrinter); | 14 | GUIComponentsThread(QObject* parent = 0); |
4445 | 14 | 15 | ||
4446 | 15 | void enablePositionDisplay(); | 16 | ~GUIComponentsThread(); |
4447 | 16 | 17 | ||
4448 | 17 | void disablePositionDisplay(); | 18 | void enablePositionDisplay(); |
4449 | 18 | 19 | ||
4450 | 19 | void run(); | 20 | void run(); |
4451 | 20 | 21 | ||
4452 | 21 | private: | 22 | bool isEnabled(); |
4453 | 22 | 23 | ||
4454 | 23 | FabAtHomePrinter* printer; | 24 | public slots: |
4455 | 24 | 25 | ||
4456 | 25 | }; | 26 | void disablePositionDisplay(); |
4457 | 26 | 27 | ||
4458 | 28 | signals: | ||
4459 | 29 | |||
4460 | 30 | void reportProgress(); | ||
4461 | 31 | void finished(); | ||
4462 | 32 | |||
4463 | 33 | }; | ||
4464 | 27 | 34 | ||
4465 | 28 | #endif // GUICOMPONENTSTHREAD_H | 35 | #endif // GUICOMPONENTSTHREAD_H |
4466 | 29 | 36 | ||
4467 | === modified file 'software/FabInterpreter/mainwindow.cpp' | |||
4468 | --- software/FabInterpreter/mainwindow.cpp 2010-07-23 20:12:14 +0000 | |||
4469 | +++ software/FabInterpreter/mainwindow.cpp 2010-08-07 00:08:43 +0000 | |||
4470 | @@ -4,6 +4,7 @@ | |||
4471 | 4 | MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) | 4 | MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) |
4472 | 5 | { | 5 | { |
4473 | 6 | setupUi(this); | 6 | setupUi(this); |
4474 | 7 | initialized = false; | ||
4475 | 7 | this->connectFunctions(); | 8 | this->connectFunctions(); |
4476 | 8 | } | 9 | } |
4477 | 9 | 10 | ||
4478 | @@ -15,7 +16,6 @@ | |||
4479 | 15 | void MainWindow::connectFunctions() | 16 | void MainWindow::connectFunctions() |
4480 | 16 | { | 17 | { |
4481 | 17 | connect(LoadConfigButton, SIGNAL(clicked()), this, SLOT(loadConfig())); | 18 | connect(LoadConfigButton, SIGNAL(clicked()), this, SLOT(loadConfig())); |
4482 | 18 | connect(MoveButton, SIGNAL(clicked()), this, SLOT(move())); | ||
4483 | 19 | connect(ResetPosButton, SIGNAL(clicked()), this, SLOT(resetValues())); | 19 | connect(ResetPosButton, SIGNAL(clicked()), this, SLOT(resetValues())); |
4484 | 20 | connect(LoadModelButton, SIGNAL(clicked()), this, SLOT(loadModel())); | 20 | connect(LoadModelButton, SIGNAL(clicked()), this, SLOT(loadModel())); |
4485 | 21 | connect(this, SIGNAL(destroyed()), this, SLOT(closeProgram())); | 21 | connect(this, SIGNAL(destroyed()), this, SLOT(closeProgram())); |
4486 | @@ -25,68 +25,73 @@ | |||
4487 | 25 | connect(bayCommandedPosition0, SIGNAL(editingFinished()), this, SLOT(bayCommandedPosition0_valueChanged())); | 25 | connect(bayCommandedPosition0, SIGNAL(editingFinished()), this, SLOT(bayCommandedPosition0_valueChanged())); |
4488 | 26 | connect(bayCommandedPosition1, SIGNAL(editingFinished()), this, SLOT(bayCommandedPosition1_valueChanged())); | 26 | connect(bayCommandedPosition1, SIGNAL(editingFinished()), this, SLOT(bayCommandedPosition1_valueChanged())); |
4489 | 27 | connect(bayCommandedPosition2, SIGNAL(editingFinished()), this, SLOT(bayCommandedPosition2_valueChanged())); | 27 | connect(bayCommandedPosition2, SIGNAL(editingFinished()), this, SLOT(bayCommandedPosition2_valueChanged())); |
4493 | 28 | connect( bayMaterialCalibration0, SIGNAL(currentIndexChanged(int)), this, SLOT( bayMaterialCalibration0_SelectedIndexChanged(int) ) ); | 28 | connect(bayMaterialCalibration0, SIGNAL(currentIndexChanged(int)), this, SLOT(bayMaterialCalibration0_SelectedIndexChanged(int) ) ); |
4494 | 29 | connect( bayMaterialCalibration1, SIGNAL(currentIndexChanged(int)), this, SLOT( bayMaterialCalibration1_SelectedIndexChanged(int) ) ); | 29 | connect(bayMaterialCalibration1, SIGNAL(currentIndexChanged(int)), this, SLOT(bayMaterialCalibration1_SelectedIndexChanged(int) ) ); |
4495 | 30 | connect( bayMaterialCalibration2, SIGNAL(currentIndexChanged(int)), this, SLOT( bayMaterialCalibration2_SelectedIndexChanged(int) ) ); | 30 | connect(bayMaterialCalibration2, SIGNAL(currentIndexChanged(int)), this, SLOT(bayMaterialCalibration2_SelectedIndexChanged(int) ) ); |
4496 | 31 | connect(ExecuteButton, SIGNAL(clicked()), this, SLOT(print())); | 31 | connect(ExecuteButton, SIGNAL(clicked()), this, SLOT(print())); |
4498 | 32 | initializePrinter(); | 32 | connect(LoadModelButton, SIGNAL(clicked()), this, SLOT(resetProgressBar())); |
4499 | 33 | connect(PauseFabButton, SIGNAL(clicked()), this, SLOT(pausePrintHandler())); | ||
4500 | 33 | //add move changes | 34 | //add move changes |
4507 | 34 | //connect(XCommandedField, SIGNAL()) | 35 | |
4502 | 35 | //connect(printer, SIGNAL(progressChanged()), printThread, SLOT(update())) | ||
4503 | 36 | |||
4504 | 37 | |||
4505 | 38 | //connect(XCommandedField, SIGNAL(valueChanged(double), printer, SLOT() | ||
4506 | 39 | //TO_DO: add signal/slots for position boxes | ||
4508 | 40 | } | 36 | } |
4509 | 41 | 37 | ||
4510 | 42 | void MainWindow::initializePrinter() | 38 | void MainWindow::initializePrinter() |
4511 | 43 | { | 39 | { |
4512 | 40 | //NOTE: for every connect added here you must add a disconnect to the slot | ||
4513 | 44 | printer = new FabAtHomePrinter(); | 41 | printer = new FabAtHomePrinter(); |
4514 | 45 | pThread = new PrintThread(printer); | 42 | pThread = new PrintThread(printer); |
4516 | 46 | gcThread = new GUIComponentsThread(printer); | 43 | gcThread = new GUIComponentsThread(); |
4517 | 47 | connect(PauseFabButton, SIGNAL(clicked()), printer, SLOT(pausePrint())); | 44 | connect(PauseFabButton, SIGNAL(clicked()), printer, SLOT(pausePrint())); |
4518 | 48 | connect(CancelFabButton, SIGNAL(clicked()), printer, SLOT(cancelPrint())); | 45 | connect(CancelFabButton, SIGNAL(clicked()), printer, SLOT(cancelPrint())); |
4519 | 49 | connect(RedoPathButton, SIGNAL(clicked()), printer, SLOT(redoPath())); | 46 | connect(RedoPathButton, SIGNAL(clicked()), printer, SLOT(redoPath())); |
4520 | 50 | connect(ForceStopButton, SIGNAL(clicked()), printer, SLOT(stopMotors())); | 47 | connect(ForceStopButton, SIGNAL(clicked()), printer, SLOT(stopMotors())); |
4521 | 51 | connect(ResetPosButton, SIGNAL(clicked()), printer, SLOT(resetPos())); | 48 | connect(ResetPosButton, SIGNAL(clicked()), printer, SLOT(resetPos())); |
4522 | 52 | connect(printer, SIGNAL(reportProgress(int, QString)), this, SLOT(printer_reportProgress(int, QString))); | 49 | connect(printer, SIGNAL(reportProgress(int, QString)), this, SLOT(printer_reportProgress(int, QString))); |
4524 | 53 | connect(printer, SIGNAL(GUI_reportProgress()), this, SLOT(GUI_reportProgress())); | 50 | connect(gcThread, SIGNAL(reportProgress()), this, SLOT(GUI_reportProgress())); |
4525 | 51 | connect(gcThread, SIGNAL(finished()), this, SLOT(GUI_disabled())); | ||
4526 | 54 | connect(printer, SIGNAL(callWarning(QString)), this, SLOT(callWarning(QString))); | 52 | connect(printer, SIGNAL(callWarning(QString)), this, SLOT(callWarning(QString))); |
4527 | 53 | connect(printer, SIGNAL(finishedPrinting()), this, SLOT(resetValues())); | ||
4528 | 54 | connect(DeletePrinterConfig, SIGNAL(clicked()), gcThread, SLOT(disablePositionDisplay())); | ||
4529 | 55 | } | 55 | } |
4530 | 56 | 56 | ||
4532 | 57 | void MainWindow::reconnectPrinterFunctions() | 57 | void MainWindow::disconnectPrinterFunctions() |
4533 | 58 | { | 58 | { |
4541 | 59 | disconnect(PauseFabButton, SIGNAL(clicked()), printer, SLOT(pausePrint())); | 59 | disconnect(printer, 0, 0, 0); |
4542 | 60 | disconnect(CancelFabButton, SIGNAL(clicked()), printer, SLOT(cancelPrint())); | 60 | disconnect(gcThread, 0, 0, 0); |
4543 | 61 | disconnect(RedoPathButton, SIGNAL(clicked()), printer, SLOT(redoPath())); | 61 | disconnect(printer, SLOT(cancelPrint())); |
4544 | 62 | disconnect(ForceStopButton, SIGNAL(clicked()), printer, SLOT(stopMotors())); | 62 | disconnect(printer, SLOT(deleteLater())); |
4545 | 63 | disconnect(ResetPosButton, SIGNAL(clicked()), printer, SLOT(resetPos())); | 63 | disconnect(printer, SLOT(pausePrint())); |
4546 | 64 | disconnect(printer, SIGNAL(GUI_reportProgress()), this, SLOT(GUI_reportProgress())); | 64 | disconnect(printer, SLOT(redoPath())); |
4547 | 65 | disconnect(printer, SIGNAL(reportProgress(int, QString)), this, SLOT(printer_reportProgress(int, QString))); | 65 | disconnect(printer, SLOT(resetPos())); |
4548 | 66 | disconnect(printer, SLOT(stopMotors())); | ||
4549 | 67 | disconnect(gcThread, SLOT(disablePositionDisplay())); | ||
4550 | 68 | if (gcThread != NULL) | ||
4551 | 69 | { | ||
4552 | 70 | gcThread->disablePositionDisplay(); | ||
4553 | 71 | while (gcThread->isRunning()); | ||
4554 | 72 | delete gcThread; | ||
4555 | 73 | } | ||
4556 | 74 | if (pThread != NULL) | ||
4557 | 75 | { | ||
4558 | 76 | delete pThread; | ||
4559 | 77 | } | ||
4560 | 66 | if (printer != NULL) | 78 | if (printer != NULL) |
4561 | 67 | { | 79 | { |
4566 | 68 | printer->cancelPrint(); | 80 | previousPrinter = printer; |
4567 | 69 | while (!printer->cleanUp()); | 81 | if (printer->isInitialized()) |
4568 | 70 | //if (printer->isInitialized()) | 82 | while (!printer->cleanUp()); |
4565 | 71 | //printer->reset(); | ||
4569 | 72 | delete printer; | 83 | delete printer; |
4570 | 73 | } | 84 | } |
4571 | 74 | if (pThread != NULL) | ||
4572 | 75 | { | ||
4573 | 76 | delete pThread; | ||
4574 | 77 | } | ||
4575 | 78 | if (gcThread != NULL) | ||
4576 | 79 | { | ||
4577 | 80 | delete gcThread; | ||
4578 | 81 | } | ||
4579 | 82 | initializePrinter(); | ||
4580 | 83 | } | 85 | } |
4581 | 84 | 86 | ||
4582 | 85 | void MainWindow::loadConfig() | 87 | void MainWindow::loadConfig() |
4583 | 86 | { | 88 | { |
4584 | 87 | //Open file dialog | 89 | //Open file dialog |
4587 | 88 | reconnectPrinterFunctions(); | 90 | QString str = QFileDialog::getOpenFileName(this,"Config File Loader", "/Users/jcman912/Documents/Fab@Home/Interpreter_Experimental/software", "*.config"); |
4588 | 89 | QString str = QFileDialog::getOpenFileName(this,"Config File Loader", "../../media/Printer Configs/", "*.config"); | 91 | |
4589 | 92 | if (!initialized) | ||
4590 | 93 | initialized = true; | ||
4591 | 94 | initializePrinter(); | ||
4592 | 90 | string result = printer->initialize(str.toStdString(), PortName->text().toStdString()); | 95 | string result = printer->initialize(str.toStdString(), PortName->text().toStdString()); |
4593 | 91 | if(result.compare("") == 0) | 96 | if(result.compare("") == 0) |
4594 | 92 | { | 97 | { |
4595 | @@ -109,6 +114,12 @@ | |||
4596 | 109 | XCommandedField->setValue(0); | 114 | XCommandedField->setValue(0); |
4597 | 110 | YCommandedField->setValue(0); | 115 | YCommandedField->setValue(0); |
4598 | 111 | ZCommandedField->setValue(0); | 116 | ZCommandedField->setValue(0); |
4599 | 117 | XCommandedField->setSingleStep(XIncrementField->text().toDouble()); | ||
4600 | 118 | YCommandedField->setSingleStep(YIncrementField->text().toDouble()); | ||
4601 | 119 | ZCommandedField->setSingleStep(ZIncrementField->text().toDouble()); | ||
4602 | 120 | bayCommandedPosition0->setSingleStep(bayIncrementField0->text().toDouble()); | ||
4603 | 121 | bayCommandedPosition1->setSingleStep(bayIncrementField1->text().toDouble()); | ||
4604 | 122 | bayCommandedPosition2->setSingleStep(bayIncrementField2->text().toDouble()); | ||
4605 | 112 | int numLoadedBays = printer->numLoadedBays(); | 123 | int numLoadedBays = printer->numLoadedBays(); |
4606 | 113 | if(numLoadedBays >= 1) | 124 | if(numLoadedBays >= 1) |
4607 | 114 | { | 125 | { |
4608 | @@ -135,22 +146,17 @@ | |||
4609 | 135 | 146 | ||
4610 | 136 | //FabAtHomePrinter::savePreviousConfigName(filePath); | 147 | //FabAtHomePrinter::savePreviousConfigName(filePath); |
4611 | 137 | 148 | ||
4612 | 138 | |||
4613 | 139 | //Modify buttons. | ||
4614 | 140 | |||
4615 | 141 | //LoadConfigButton->setEnabled(false); | ||
4616 | 142 | |||
4617 | 143 | //LoadModelButton->focusWidget(); | ||
4618 | 144 | //LoadModelButton->Focus(); | ||
4619 | 145 | |||
4620 | 146 | //Start live position display | 149 | //Start live position display |
4621 | 150 | LoadConfigButton->setEnabled(false); | ||
4622 | 147 | gcThread->enablePositionDisplay(); | 151 | gcThread->enablePositionDisplay(); |
4623 | 148 | } | 152 | } |
4624 | 149 | else | 153 | else |
4625 | 150 | { | 154 | { |
4626 | 155 | disconnectPrinterFunctions(); | ||
4627 | 151 | callWarning(result.c_str()); | 156 | callWarning(result.c_str()); |
4628 | 152 | } | 157 | } |
4629 | 153 | 158 | ||
4630 | 159 | previousPrinter = printer; | ||
4631 | 154 | 160 | ||
4632 | 155 | } | 161 | } |
4633 | 156 | 162 | ||
4634 | @@ -163,7 +169,7 @@ | |||
4635 | 163 | int numLoadedBays = printer->numLoadedBays(); | 169 | int numLoadedBays = printer->numLoadedBays(); |
4636 | 164 | if(numLoadedBays >= 1) | 170 | if(numLoadedBays >= 1) |
4637 | 165 | { | 171 | { |
4639 | 166 | bayCommandedPosition0->setValue(0.00000); | 172 | bayCommandedPosition0->setValue(0.000000); |
4640 | 167 | } | 173 | } |
4641 | 168 | if(numLoadedBays >= 2) | 174 | if(numLoadedBays >= 2) |
4642 | 169 | { | 175 | { |
4643 | @@ -236,11 +242,6 @@ | |||
4644 | 236 | } | 242 | } |
4645 | 237 | } | 243 | } |
4646 | 238 | 244 | ||
4647 | 239 | void MainWindow::disablePositionDisplay() | ||
4648 | 240 | { | ||
4649 | 241 | enablePosDisplay = false; | ||
4650 | 242 | } | ||
4651 | 243 | |||
4652 | 244 | void MainWindow::toggleAxes(bool enabled) | 245 | void MainWindow::toggleAxes(bool enabled) |
4653 | 245 | { | 246 | { |
4654 | 246 | XVelocityField->setEnabled(enabled); | 247 | XVelocityField->setEnabled(enabled); |
4655 | @@ -269,7 +270,7 @@ | |||
4656 | 269 | { | 270 | { |
4657 | 270 | bayVelocity0->setEnabled(enabled); | 271 | bayVelocity0->setEnabled(enabled); |
4658 | 271 | bayAcceleration0->setEnabled(enabled); | 272 | bayAcceleration0->setEnabled(enabled); |
4660 | 272 | bayPositionIncrement0->setEnabled(enabled); | 273 | bayIncrementField0->setEnabled(enabled); |
4661 | 273 | bayMotorPosition0->setEnabled(enabled); | 274 | bayMotorPosition0->setEnabled(enabled); |
4662 | 274 | bayCommandedPosition0->setEnabled(enabled); | 275 | bayCommandedPosition0->setEnabled(enabled); |
4663 | 275 | bayMaterialCalibration0->setEnabled(enabled); | 276 | bayMaterialCalibration0->setEnabled(enabled); |
4664 | @@ -280,7 +281,7 @@ | |||
4665 | 280 | { | 281 | { |
4666 | 281 | bayVelocity1->setEnabled(enabled); | 282 | bayVelocity1->setEnabled(enabled); |
4667 | 282 | bayAcceleration1->setEnabled(enabled); | 283 | bayAcceleration1->setEnabled(enabled); |
4669 | 283 | bayPositionIncrement1->setEnabled(enabled); | 284 | bayIncrementField1->setEnabled(enabled); |
4670 | 284 | bayMotorPosition1->setEnabled(enabled); | 285 | bayMotorPosition1->setEnabled(enabled); |
4671 | 285 | bayCommandedPosition1->setEnabled(enabled); | 286 | bayCommandedPosition1->setEnabled(enabled); |
4672 | 286 | bayMaterialCalibration1->setEnabled(enabled); | 287 | bayMaterialCalibration1->setEnabled(enabled); |
4673 | @@ -291,7 +292,7 @@ | |||
4674 | 291 | { | 292 | { |
4675 | 292 | bayVelocity2->setEnabled(enabled); | 293 | bayVelocity2->setEnabled(enabled); |
4676 | 293 | bayAcceleration2->setEnabled(enabled); | 294 | bayAcceleration2->setEnabled(enabled); |
4678 | 294 | bayPositionIncrement2->setEnabled(enabled); | 295 | bayIncrementField2->setEnabled(enabled); |
4679 | 295 | bayMotorPosition2->setEnabled(enabled); | 296 | bayMotorPosition2->setEnabled(enabled); |
4680 | 296 | bayCommandedPosition2->setEnabled(enabled); | 297 | bayCommandedPosition2->setEnabled(enabled); |
4681 | 297 | bayMaterialCalibration2->setEnabled(enabled); | 298 | bayMaterialCalibration2->setEnabled(enabled); |
4682 | @@ -312,6 +313,7 @@ | |||
4683 | 312 | if(numLoadedBays >= 1) | 313 | if(numLoadedBays >= 1) |
4684 | 313 | { | 314 | { |
4685 | 314 | temp = Util::toString<double>(printer->tool.bays["Bay 0"].motor->getPosition()); | 315 | temp = Util::toString<double>(printer->tool.bays["Bay 0"].motor->getPosition()); |
4686 | 316 | bayMotorPosition0->setText(temp.c_str()); | ||
4687 | 315 | } | 317 | } |
4688 | 316 | if(numLoadedBays >= 2) | 318 | if(numLoadedBays >= 2) |
4689 | 317 | { | 319 | { |
4690 | @@ -337,8 +339,6 @@ | |||
4691 | 337 | PathProgressBar->update(); | 339 | PathProgressBar->update(); |
4692 | 338 | } | 340 | } |
4693 | 339 | 341 | ||
4694 | 340 | //TODO: implement this | ||
4695 | 341 | |||
4696 | 342 | void MainWindow::GUI_reportProgress() | 342 | void MainWindow::GUI_reportProgress() |
4697 | 343 | { | 343 | { |
4698 | 344 | static string prevState; | 344 | static string prevState; |
4699 | @@ -356,11 +356,11 @@ | |||
4700 | 356 | ZCommandedField->setValue(ZDisplay->text().toDouble()); | 356 | ZCommandedField->setValue(ZDisplay->text().toDouble()); |
4701 | 357 | bayCommandedPosition0->setValue(bayMotorPosition0->text().toDouble()); | 357 | bayCommandedPosition0->setValue(bayMotorPosition0->text().toDouble()); |
4702 | 358 | bayCommandedPosition1->setValue(bayMotorPosition1->text().toDouble()); | 358 | bayCommandedPosition1->setValue(bayMotorPosition1->text().toDouble()); |
4703 | 359 | bayCommandedPosition2->setValue(bayMotorPosition2->text().toDouble()); | ||
4704 | 359 | } | 360 | } |
4705 | 360 | toggleBays(true); | 361 | toggleBays(true); |
4706 | 361 | toggleAxes(false); | 362 | toggleAxes(false); |
4707 | 362 | ResetPosButton->setEnabled(false); | 363 | ResetPosButton->setEnabled(false); |
4708 | 363 | MoveButton->setEnabled(false); | ||
4709 | 364 | LoadModelButton->setEnabled(false); | 364 | LoadModelButton->setEnabled(false); |
4710 | 365 | ExecuteButton->setEnabled(false); | 365 | ExecuteButton->setEnabled(false); |
4711 | 366 | PauseFabButton->setEnabled(true); | 366 | PauseFabButton->setEnabled(true); |
4712 | @@ -373,9 +373,9 @@ | |||
4713 | 373 | toggleBays(false); | 373 | toggleBays(false); |
4714 | 374 | toggleAxes(false); | 374 | toggleAxes(false); |
4715 | 375 | ResetPosButton->setEnabled(false); | 375 | ResetPosButton->setEnabled(false); |
4716 | 376 | MoveButton->setEnabled(false); | ||
4717 | 377 | LoadModelButton->setEnabled(false); | 376 | LoadModelButton->setEnabled(false); |
4718 | 378 | ExecuteButton->setEnabled(false); | 377 | ExecuteButton->setEnabled(false); |
4719 | 378 | DeletePrinterConfig->setEnabled(false); | ||
4720 | 379 | PauseFabButton->setEnabled(true); | 379 | PauseFabButton->setEnabled(true); |
4721 | 380 | CancelFabButton->setEnabled(true); | 380 | CancelFabButton->setEnabled(true); |
4722 | 381 | ForceStopButton->setEnabled(true); | 381 | ForceStopButton->setEnabled(true); |
4723 | @@ -391,12 +391,13 @@ | |||
4724 | 391 | XCommandedField->setValue(XDisplay->text().toDouble()); | 391 | XCommandedField->setValue(XDisplay->text().toDouble()); |
4725 | 392 | bayCommandedPosition0->setValue(bayMotorPosition0->text().toDouble()); | 392 | bayCommandedPosition0->setValue(bayMotorPosition0->text().toDouble()); |
4726 | 393 | bayCommandedPosition1->setValue(bayMotorPosition1->text().toDouble()); | 393 | bayCommandedPosition1->setValue(bayMotorPosition1->text().toDouble()); |
4727 | 394 | bayCommandedPosition2->setValue(bayMotorPosition2->text().toDouble()); | ||
4728 | 394 | } | 395 | } |
4729 | 395 | toggleBays(true); | 396 | toggleBays(true); |
4730 | 396 | toggleAxes(true); | 397 | toggleAxes(true); |
4731 | 397 | ResetPosButton->setEnabled(true); | 398 | ResetPosButton->setEnabled(true); |
4732 | 398 | MoveButton->setEnabled(true); | ||
4733 | 399 | LoadModelButton->setEnabled(true); | 399 | LoadModelButton->setEnabled(true); |
4734 | 400 | DeletePrinterConfig->setEnabled(true); | ||
4735 | 400 | PauseFabButton->setEnabled(false); | 401 | PauseFabButton->setEnabled(false); |
4736 | 401 | CancelFabButton->setEnabled(false); | 402 | CancelFabButton->setEnabled(false); |
4737 | 402 | ForceStopButton->setEnabled(false); | 403 | ForceStopButton->setEnabled(false); |
4738 | @@ -406,6 +407,34 @@ | |||
4739 | 406 | } | 407 | } |
4740 | 407 | 408 | ||
4741 | 408 | 409 | ||
4742 | 410 | void MainWindow::GUI_disabled() | ||
4743 | 411 | { | ||
4744 | 412 | toggleBays(false); | ||
4745 | 413 | toggleAxes(false); | ||
4746 | 414 | ResetPosButton->setEnabled(false); | ||
4747 | 415 | LoadModelButton->setEnabled(false); | ||
4748 | 416 | ExecuteButton->setEnabled(false); | ||
4749 | 417 | DeletePrinterConfig->setEnabled(false); | ||
4750 | 418 | PauseFabButton->setEnabled(false); | ||
4751 | 419 | CancelFabButton->setEnabled(false); | ||
4752 | 420 | ForceStopButton->setEnabled(false); | ||
4753 | 421 | RedoPathButton->setEnabled(false); | ||
4754 | 422 | LoadConfigButton->setEnabled(true); | ||
4755 | 423 | XLabel->setText("Not Loaded"); | ||
4756 | 424 | YLabel->setText("Not Loaded"); | ||
4757 | 425 | ZLabel->setText("Not Loaded"); | ||
4758 | 426 | bayLabel0->setText("Not Loaded"); | ||
4759 | 427 | bayLabel1->setText("Not Loaded"); | ||
4760 | 428 | bayLabel2->setText("Not Loaded"); | ||
4761 | 429 | resetValues(); | ||
4762 | 430 | if (printer->isInitialized()) | ||
4763 | 431 | printer->resetPos(); | ||
4764 | 432 | bayMaterialCalibration0->clear(); | ||
4765 | 433 | bayMaterialCalibration1->clear(); | ||
4766 | 434 | bayMaterialCalibration2->clear(); | ||
4767 | 435 | disconnectPrinterFunctions(); | ||
4768 | 436 | } | ||
4769 | 437 | |||
4770 | 409 | void MainWindow::print() | 438 | void MainWindow::print() |
4771 | 410 | { | 439 | { |
4772 | 411 | 440 | ||
4773 | @@ -416,65 +445,70 @@ | |||
4774 | 416 | 445 | ||
4775 | 417 | void MainWindow::bayMaterialCalibration1_SelectedIndexChanged(int i) | 446 | void MainWindow::bayMaterialCalibration1_SelectedIndexChanged(int i) |
4776 | 418 | { | 447 | { |
4780 | 419 | string materialCalibrationName = bayMaterialCalibration1->currentText().toStdString(); | 448 | if (bayMaterialCalibration1->isEnabled()) |
4781 | 420 | string bayName = bayLabel1->text().toStdString(); | 449 | { |
4782 | 421 | printer->equipBay(bayName, materialCalibrationName); | 450 | string materialCalibrationName = bayMaterialCalibration1->currentText().toStdString(); |
4783 | 451 | string bayName = bayLabel1->text().toStdString(); | ||
4784 | 452 | printer->equipBay(bayName, materialCalibrationName); | ||
4785 | 453 | } | ||
4786 | 422 | } | 454 | } |
4787 | 423 | void MainWindow::bayMaterialCalibration2_SelectedIndexChanged(int i) { | 455 | void MainWindow::bayMaterialCalibration2_SelectedIndexChanged(int i) { |
4791 | 424 | string materialCalibrationName = bayMaterialCalibration2->currentText().toStdString(); | 456 | if (bayMaterialCalibration2->isEnabled()) |
4792 | 425 | string bayName = bayLabel2->text().toStdString(); | 457 | { |
4793 | 426 | printer->equipBay(bayName, materialCalibrationName); | 458 | string materialCalibrationName = bayMaterialCalibration2->currentText().toStdString(); |
4794 | 459 | string bayName = bayLabel2->text().toStdString(); | ||
4795 | 460 | printer->equipBay(bayName, materialCalibrationName); | ||
4796 | 461 | } | ||
4797 | 427 | } | 462 | } |
4798 | 428 | 463 | ||
4799 | 429 | void MainWindow::bayMaterialCalibration0_SelectedIndexChanged(int i) | 464 | void MainWindow::bayMaterialCalibration0_SelectedIndexChanged(int i) |
4800 | 430 | { | 465 | { |
4804 | 431 | string materialCalibrationName = bayMaterialCalibration0->currentText().toStdString(); | 466 | if (bayMaterialCalibration0->isEnabled()) |
4805 | 432 | string bayName = bayLabel0->text().toStdString(); | 467 | { |
4806 | 433 | printer->equipBay(bayName, materialCalibrationName); | 468 | string materialCalibrationName = bayMaterialCalibration0->currentText().toStdString(); |
4807 | 469 | string bayName = bayLabel0->text().toStdString(); | ||
4808 | 470 | printer->equipBay(bayName, materialCalibrationName); | ||
4809 | 471 | } | ||
4810 | 434 | } | 472 | } |
4811 | 435 | 473 | ||
4812 | 436 | void MainWindow::closeProgram() | 474 | void MainWindow::closeProgram() |
4813 | 437 | { | 475 | { |
4814 | 438 | gcThread->disablePositionDisplay(); | 476 | gcThread->disablePositionDisplay(); |
4815 | 439 | printer->cleanUp(); | ||
4816 | 440 | delete pThread; | ||
4817 | 441 | delete gcThread; | ||
4818 | 442 | delete printer; | ||
4819 | 443 | } | 477 | } |
4820 | 444 | 478 | ||
4821 | 445 | void MainWindow::XCommandedField_valueChanged() | 479 | void MainWindow::XCommandedField_valueChanged() |
4822 | 446 | { | 480 | { |
4824 | 447 | if (printer->isInitialized()) | 481 | if (printer->isInitialized() && printer->state().compare("PRINTING") != 0) |
4825 | 448 | printer->axes["X"].motor->moveAbsolute(XCommandedField->value(), XVelocityField->text().toDouble(), XAccelerationField->text().toDouble()); | 482 | printer->axes["X"].motor->moveAbsolute(XCommandedField->value(), XVelocityField->text().toDouble(), XAccelerationField->text().toDouble()); |
4826 | 449 | } | 483 | } |
4827 | 450 | 484 | ||
4828 | 451 | void MainWindow::YCommandedField_valueChanged() | 485 | void MainWindow::YCommandedField_valueChanged() |
4829 | 452 | { | 486 | { |
4831 | 453 | if (printer->isInitialized()) | 487 | if (printer->isInitialized() && printer->state().compare("PRINTING") != 0) |
4832 | 454 | printer->axes["Y"].motor->moveAbsolute(YCommandedField->value(), YVelocityField->text().toDouble(), YAccelerationField->text().toDouble()); | 488 | printer->axes["Y"].motor->moveAbsolute(YCommandedField->value(), YVelocityField->text().toDouble(), YAccelerationField->text().toDouble()); |
4833 | 455 | } | 489 | } |
4834 | 456 | 490 | ||
4835 | 457 | void MainWindow::ZCommandedField_valueChanged() | 491 | void MainWindow::ZCommandedField_valueChanged() |
4836 | 458 | { | 492 | { |
4838 | 459 | if (printer->isInitialized()) | 493 | if (printer->isInitialized() && printer->state().compare("PRINTING") != 0) |
4839 | 460 | printer->axes["Z"].motor->moveAbsolute(ZCommandedField->value(), ZVelocityField->text().toDouble(), ZAccelerationField->text().toDouble()); | 494 | printer->axes["Z"].motor->moveAbsolute(ZCommandedField->value(), ZVelocityField->text().toDouble(), ZAccelerationField->text().toDouble()); |
4840 | 461 | } | 495 | } |
4841 | 462 | 496 | ||
4842 | 463 | void MainWindow::bayCommandedPosition0_valueChanged() | 497 | void MainWindow::bayCommandedPosition0_valueChanged() |
4843 | 464 | { | 498 | { |
4845 | 465 | if (printer->isInitialized()) | 499 | if (printer->isInitialized() && printer->state().compare("PRINTING") != 0) |
4846 | 466 | printer->tool.bays["Bay 0"].motor->moveAbsolute(bayCommandedPosition0->value(), bayVelocity0->text().toDouble(), bayAcceleration0->text().toDouble()); | 500 | printer->tool.bays["Bay 0"].motor->moveAbsolute(bayCommandedPosition0->value(), bayVelocity0->text().toDouble(), bayAcceleration0->text().toDouble()); |
4847 | 467 | } | 501 | } |
4848 | 468 | 502 | ||
4849 | 469 | void MainWindow::bayCommandedPosition1_valueChanged() | 503 | void MainWindow::bayCommandedPosition1_valueChanged() |
4850 | 470 | { | 504 | { |
4852 | 471 | if (printer->isInitialized()) | 505 | if (printer->isInitialized() && printer->state().compare("PRINTING") != 0) |
4853 | 472 | printer->tool.bays["Bay 1"].motor->moveAbsolute(bayCommandedPosition1->value(), bayVelocity1->text().toDouble(), bayAcceleration1->text().toDouble()); | 506 | printer->tool.bays["Bay 1"].motor->moveAbsolute(bayCommandedPosition1->value(), bayVelocity1->text().toDouble(), bayAcceleration1->text().toDouble()); |
4854 | 473 | } | 507 | } |
4855 | 474 | 508 | ||
4856 | 475 | void MainWindow::bayCommandedPosition2_valueChanged() | 509 | void MainWindow::bayCommandedPosition2_valueChanged() |
4857 | 476 | { | 510 | { |
4859 | 477 | if (printer->isInitialized()) | 511 | if (printer->isInitialized() && printer->state().compare("PRINTING") != 0) |
4860 | 478 | printer->tool.bays["Bay 2"].motor->moveAbsolute(bayCommandedPosition2->value(), bayVelocity2->text().toDouble(), bayAcceleration2->text().toDouble()); | 512 | printer->tool.bays["Bay 2"].motor->moveAbsolute(bayCommandedPosition2->value(), bayVelocity2->text().toDouble(), bayAcceleration2->text().toDouble()); |
4861 | 479 | } | 513 | } |
4862 | 480 | 514 | ||
4863 | @@ -482,3 +516,32 @@ | |||
4864 | 482 | { | 516 | { |
4865 | 483 | QMessageBox::warning(this, "Warning", msg); | 517 | QMessageBox::warning(this, "Warning", msg); |
4866 | 484 | } | 518 | } |
4867 | 519 | |||
4868 | 520 | void MainWindow::resetProgressBar() | ||
4869 | 521 | { | ||
4870 | 522 | PathProgressBar->setValue(0); | ||
4871 | 523 | } | ||
4872 | 524 | |||
4873 | 525 | void MainWindow::closeEvent(QCloseEvent *event) | ||
4874 | 526 | { | ||
4875 | 527 | if (!initialized || !printer->isInitialized()) | ||
4876 | 528 | event->accept(); | ||
4877 | 529 | else if (printer->state().compare("PRINTING") == 0) | ||
4878 | 530 | { | ||
4879 | 531 | callWarning("Cannot close during a print job."); | ||
4880 | 532 | event->ignore(); | ||
4881 | 533 | } | ||
4882 | 534 | else | ||
4883 | 535 | { | ||
4884 | 536 | closeProgram(); | ||
4885 | 537 | event->accept(); | ||
4886 | 538 | } | ||
4887 | 539 | } | ||
4888 | 540 | |||
4889 | 541 | void MainWindow::pausePrintHandler() | ||
4890 | 542 | { | ||
4891 | 543 | if (printer->state().compare("PRINTING") == 0) | ||
4892 | 544 | PauseFabButton->setText("Resume"); | ||
4893 | 545 | else | ||
4894 | 546 | PauseFabButton->setText("Pause"); | ||
4895 | 547 | } | ||
4896 | 485 | 548 | ||
4897 | === modified file 'software/FabInterpreter/mainwindow.h' | |||
4898 | --- software/FabInterpreter/mainwindow.h 2010-07-22 15:32:37 +0000 | |||
4899 | +++ software/FabInterpreter/mainwindow.h 2010-08-07 00:08:43 +0000 | |||
4900 | @@ -11,7 +11,8 @@ | |||
4901 | 11 | #include "guicomponentsthread.h" | 11 | #include "guicomponentsthread.h" |
4902 | 12 | #include <vector> | 12 | #include <vector> |
4903 | 13 | #include <QFileDialog> | 13 | #include <QFileDialog> |
4905 | 14 | 14 | #include <QMessageBox> | |
4906 | 15 | #include <QCloseEvent> | ||
4907 | 15 | 16 | ||
4908 | 16 | 17 | ||
4909 | 17 | namespace Ui | 18 | namespace Ui |
4910 | @@ -19,8 +20,6 @@ | |||
4911 | 19 | class MainWindow; | 20 | class MainWindow; |
4912 | 20 | } | 21 | } |
4913 | 21 | 22 | ||
4914 | 22 | |||
4915 | 23 | |||
4916 | 24 | class MainWindow : | 23 | class MainWindow : |
4917 | 25 | public QMainWindow, public Ui::MainWindow | 24 | public QMainWindow, public Ui::MainWindow |
4918 | 26 | { | 25 | { |
4919 | @@ -31,17 +30,16 @@ | |||
4920 | 31 | ~MainWindow(); | 30 | ~MainWindow(); |
4921 | 32 | 31 | ||
4922 | 33 | private: | 32 | private: |
4923 | 33 | |||
4924 | 34 | bool initialized; | 34 | bool initialized; |
4925 | 35 | FabAtHomePrinter* printer; //The printer. | 35 | FabAtHomePrinter* printer; //The printer. |
4926 | 36 | FabAtHomePrinter* previousPrinter; | 36 | FabAtHomePrinter* previousPrinter; |
4927 | 37 | GUIComponentsThread *gcThread; | 37 | GUIComponentsThread *gcThread; |
4928 | 38 | PrintThread *pThread; | 38 | PrintThread *pThread; |
4929 | 39 | void disablePositionDisplay(); | ||
4930 | 40 | void toggleAxes(bool); | 39 | void toggleAxes(bool); |
4931 | 41 | void toggleBays(bool); | 40 | void toggleBays(bool); |
4932 | 42 | void updatePosDisplay(); | 41 | void updatePosDisplay(); |
4933 | 43 | void connectFunctions(); | 42 | void connectFunctions(); |
4934 | 44 | void reconnectPrinterFunctions(); | ||
4935 | 45 | void initializePrinter(); | 43 | void initializePrinter(); |
4936 | 46 | 44 | ||
4937 | 47 | //variables for controller | 45 | //variables for controller |
4938 | @@ -56,12 +54,12 @@ | |||
4939 | 56 | //timer variables | 54 | //timer variables |
4940 | 57 | int numTicks; | 55 | int numTicks; |
4941 | 58 | //TODO: initialize above in constructor | 56 | //TODO: initialize above in constructor |
4944 | 59 | 57 | ||
4945 | 60 | public slots: | 58 | private slots: |
4946 | 59 | void disconnectPrinterFunctions(); | ||
4947 | 61 | void printer_reportProgress(int, QString); | 60 | void printer_reportProgress(int, QString); |
4948 | 62 | void GUI_reportProgress(); | 61 | void GUI_reportProgress(); |
4951 | 63 | 62 | void GUI_disabled(); | |
4950 | 64 | private slots: | ||
4952 | 65 | void loadConfig(); | 63 | void loadConfig(); |
4953 | 66 | void loadModel(); | 64 | void loadModel(); |
4954 | 67 | void resetValues(); | 65 | void resetValues(); |
4955 | @@ -78,6 +76,11 @@ | |||
4956 | 78 | void bayCommandedPosition1_valueChanged(); | 76 | void bayCommandedPosition1_valueChanged(); |
4957 | 79 | void bayCommandedPosition2_valueChanged(); | 77 | void bayCommandedPosition2_valueChanged(); |
4958 | 80 | void callWarning(QString); | 78 | void callWarning(QString); |
4959 | 79 | void resetProgressBar(); | ||
4960 | 80 | void pausePrintHandler(); | ||
4961 | 81 | |||
4962 | 82 | protected: | ||
4963 | 83 | void closeEvent(QCloseEvent *event); | ||
4964 | 81 | }; | 84 | }; |
4965 | 82 | 85 | ||
4966 | 83 | #endif // MAINWINDOW_H | 86 | #endif // MAINWINDOW_H |
4967 | 84 | 87 | ||
4968 | === modified file 'software/FabInterpreter/mainwindow.ui' | |||
4969 | --- software/FabInterpreter/mainwindow.ui 2010-07-23 20:12:14 +0000 | |||
4970 | +++ software/FabInterpreter/mainwindow.ui 2010-08-07 00:08:43 +0000 | |||
4971 | @@ -6,12 +6,24 @@ | |||
4972 | 6 | <rect> | 6 | <rect> |
4973 | 7 | <x>0</x> | 7 | <x>0</x> |
4974 | 8 | <y>0</y> | 8 | <y>0</y> |
4977 | 9 | <width>910</width> | 9 | <width>932</width> |
4978 | 10 | <height>461</height> | 10 | <height>467</height> |
4979 | 11 | </rect> | 11 | </rect> |
4980 | 12 | </property> | 12 | </property> |
4981 | 13 | <property name="windowTitle"> | 13 | <property name="windowTitle"> |
4983 | 14 | <string>FAB@Home Interpreter</string> | 14 | <string>Fab@Home Interpreter</string> |
4984 | 15 | </property> | ||
4985 | 16 | <property name="autoFillBackground"> | ||
4986 | 17 | <bool>false</bool> | ||
4987 | 18 | </property> | ||
4988 | 19 | <property name="animated"> | ||
4989 | 20 | <bool>true</bool> | ||
4990 | 21 | </property> | ||
4991 | 22 | <property name="dockNestingEnabled"> | ||
4992 | 23 | <bool>false</bool> | ||
4993 | 24 | </property> | ||
4994 | 25 | <property name="unifiedTitleAndToolBarOnMac"> | ||
4995 | 26 | <bool>false</bool> | ||
4996 | 15 | </property> | 27 | </property> |
4997 | 16 | <widget class="QWidget" name="centralWidget"> | 28 | <widget class="QWidget" name="centralWidget"> |
4998 | 17 | <widget class="QGroupBox" name="gridGroupBox"> | 29 | <widget class="QGroupBox" name="gridGroupBox"> |
4999 | @@ -19,10 +31,16 @@ | |||
5000 | 19 | <rect> | 31 | <rect> |
The diff has been truncated for viewing.