Minor updates to line number feature.

- Changed line number integer types from unsigned to signed int32.
G-code mandates values cannot exceed 99999. Negative values can be used
to indicate certain modes.

- Homing cycle line number changed to -1, as an indicator.

- Fixed a reporting define for the spindle states that was broken by
the last merge.
This commit is contained in:
Sonny Jeon
2014-02-19 07:48:09 -07:00
parent 9c95c1439f
commit 1fd45791a5
8 changed files with 72 additions and 70 deletions

View File

@ -259,7 +259,7 @@ uint8_t plan_check_full_buffer()
is used in three ways: as a normal feed rate if invert_feed_rate is false, as inverse time if
invert_feed_rate is true, or as seek/rapids rate if the feed_rate value is negative (and
invert_feed_rate always false). */
void plan_buffer_line(float *target, float feed_rate, uint8_t invert_feed_rate, uint32_t line_number)
void plan_buffer_line(float *target, float feed_rate, uint8_t invert_feed_rate, int32_t line_number)
{
// Prepare and initialize new block
plan_block_t *block = &block_buffer[block_buffer_head];
@ -267,9 +267,10 @@ void plan_buffer_line(float *target, float feed_rate, uint8_t invert_feed_rate,
block->millimeters = 0;
block->direction_bits = 0;
block->acceleration = SOME_LARGE_VALUE; // Scaled down to maximum acceleration later
#ifdef USE_LINE_NUMBERS
block->line_number = line_number;
#endif
#ifdef USE_LINE_NUMBERS
block->line_number = line_number;
#endif
// Compute and store initial move distance data.
// TODO: After this for-loop, we don't touch the stepper algorithm data. Might be a good idea
// to try to keep these types of things completely separate from the planner for portability.