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

@ -51,9 +51,10 @@ typedef struct {
float acceleration; // Axis-limit adjusted line acceleration in (mm/min^2)
float millimeters; // The remaining distance for this block to be executed in (mm)
// uint8_t max_override; // Maximum override value based on axis speed limits
#ifdef USE_LINE_NUMBERS
uint32_t line_number;
#endif
#ifdef USE_LINE_NUMBERS
int32_t line_number;
#endif
} plan_block_t;
@ -63,7 +64,7 @@ void plan_reset();
// Add a new linear movement to the buffer. target[N_AXIS] is the signed, absolute target position
// in millimeters. Feed rate specifies the speed of the motion. If feed rate is inverted, the feed
// rate is taken to mean "frequency" and would complete the operation in 1/feed_rate minutes.
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);
// Called when the current block is no longer needed. Discards the block and makes the memory
// availible for new blocks.