Hi,
I was able to get his code to build(after manual insertion of mods to few files). I have few questions:
Patch has a/src/emc/rs274ngc/interp_array.cc:
-/* 740 */ -1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+/* 740 */ 1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
But currently this line has:
/* 740 */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
So it does not match original line above and I do not have a clue how to get this correct?
Also feature needs to be added so that when changing direction at bottom of thread motion wont wait for spindle_at_speed. Due to mods to taskintf.cc also this wont work:
int emcSpindleSpeed(double speed, double css_factor, double offset)
{
if (emcmotStatus.spindle.speed == 0)
return 0; //spindle stopped, not updating speed
return emcSpindleOn(speed, css_factor, offset, 1); <==
}
int emcSpindleOn(double speed, double css_factor, double offset, int wait_for_at_speed)
{
emcmotCommand.command = EMCMOT_SPINDLE_ON;
emcmotCommand.vel = speed;
emcmotCommand.ini_maxvel = css_factor;
emcmotCommand.acc = offset;
emcmotCommand.wait_for_spindle_at_speed = wait_for_at_speed;
return usrmotWriteEmcmotCommand(&emcmotCommand);
}
I got an error that emcSpindleSpeed passes too few arguments to function emcSpindleOn. I solved this by adding 1 to function call(so wait for at speed is on). But I do not believe it is correct way....
Below is same code from 2014:
int emcSpindleSpeed(double speed, double css_factor, double offset)
1373 {
1374
1375 if (emcmotStatus.spindle.speed == 0)
1376 return 0; //spindle stopped, not updating speed
1377
1378 emcmotCommand.command = EMCMOT_SPINDLE_ON;
1379
1380 if ((emcmotStatus.spindle.speed < 0) && (speed > 0)) {
1381 emcmotCommand.vel = speed * -1;
1382 emcmotCommand.ini_maxvel = css_factor * -1;
1383 emcmotCommand.acc = offset;
1384 return usrmotWriteEmcmotCommand(&emcmotCommand);
1385 } else if ((emcmotStatus.spindle.speed > 0) && (speed > 0)) {
1386 emcmotCommand.vel = speed;
1387 emcmotCommand.ini_maxvel = css_factor;
1388 emcmotCommand.acc = offset;
1389 return usrmotWriteEmcmotCommand(&emcmotCommand);
1390 }
1391
1392 return -1; //can't have negative speeds
1393 }
Also how can I get diff of modified files?
Tero