- Cleaned up the new stepper algorithm code with more commenting and
better logic flow.
- The new segment buffer now predicts the number of steps each segment
should have to execute over about 8 milliseconds each (based on the
ACCELERATION_TICKS_PER_SECOND setting). So, for when the whole segment
buffer is full, the stepper algorithm has roughly 40 milliseconds of
steps queued before it needs to refilled by the main program.
- Readjusted the max supported step rate back to 30kHz from the lower
development 20kHz. Everything still works amazing great and the test
CNC machine still runs twice as fast with the new stepper algorithm and
planner.
- Upped the standard serial baudrate to 115200 baud, as it is clear
that the bottleneck is the serial interface. Will now support this, as
well as the old 9600 baud, in new firmware builds.
- New stepper algorithm with the new optimized planner seems to be
working nearly twice as fast as the previous algorithm.
- For one, the planner computation overhead is probably a fraction of
what it used to be with the worst case being about half still.
- Secondly, anytime the planner plans back to the first executing
block, it no longer overwrites the block conditions and allows it to
complete without lost steps. So no matter if the streams slows, the
protected planner should keep the steppers moving without risk of lost
steps (although this still needs to be tested thoroughly and may
audibly sound weird when this happens.)
- It now seems that the bottleneck is the serial baudrate (which is
good!)
Development push. Lots still broken.
- Protected planner concept works! This is a critical precursor to
enabling feedrate overrides in allowing the planner buffer and the
stepper execution operate atomically. This is done through a
intermediary segment buffer.
- Still lots of work to be done, as this was a complete overhaul of the
planner and stepper subsystems. The code can be cleaned up quite a bit,
re-enabling some of the broken features like feed holds, and finishing
up some of the concepts
- Pushed some of the fixes from the master and edge branch to here, as
this will likely replace the edge branch when done.
- Cleaned up and organized pin mapping concept by @elmom.
- pin_map.h allows for user-supplied pin mapping and port vector
definitions in a centralized file. With more processor types, more
definitions could be added.
- **NON-FUNCTIONAL**
- Contains an old draft of separating the stepper driver direct access
to the planner buffer. This is designed to keep the stepper and planner
modules independent and prevent overwriting or other complications. In
this way, feedrate override should be able to be installed as well.
- A number of planner optimizations are installed too.
- Not sure where the bugs are. Either in the new planner optimizations,
new stepper module updates, or in both. Or it just could be that the
Arduino AVR is choking with the new things it has to do.
- Increased g-code parser line buffer from 50 to 70 characters. Should
fix most all issues with long arc statements, provided that they are 8
digits(float) long only.
- Added a line buffer overflow feedback error to let the user know when
it encounters this problem. Resets the line whenever this occurs.
(Thanks @BHSPitMonkey!)
- Increased g-code parser line buffer to 70 characters (from 50) to
prevent some long arc commands from getting truncated.
- Decreased planner buffer from 18 to 17 blocks to free up memory for
line buffer.
- Added a line buffer overflow feedback error (Thanks @BHSPitMonkey!)
- WARNING: Completely untested. Will later when there is time. Settings
WILL be overwritten, as there are new settings.
- Soft limits installed. Homing must be enabled for soft limits to work
correctly. Errors out much like a hard limit, locking out everything
and bringing up the alarm mode. Only difference is it forces a feed
hold before doing so. Position is not lost.
- IMPORTANT: Homing had to be updated so that soft limits work better
with less CPU overhead. When homing completes, all axes are assumed to
exist in negative space. If your limit switch is other side, the homing
cycle with set this axis location to the max travel value, rather than
zero.
- Update mc_line() to accept an array, rather than individual variables.
- Added an mc_auto_cycle_start() function handle this feature.
Organization only.
-
Removed inline from all functions.
If this is really needed is there another way that we can get
around using it? (The Arduino IDE does not recognize it)
- Changed up mc_line to accept an array rather than individual x,y,z
coordinates. Makes some of the position data handling more effective,
especially for a 4th-axis later on.
- Changed up some soft limits variable names.