Use bit-length types in block_t
This commit is contained in:
parent
8dc7807d85
commit
23f05f8be7
@ -74,30 +74,32 @@ enum BlockFlag {
|
|||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
||||||
|
uint8_t flag; // Block flags (See BlockFlag enum above)
|
||||||
|
|
||||||
unsigned char active_extruder; // The extruder to move (if E move)
|
unsigned char active_extruder; // The extruder to move (if E move)
|
||||||
|
|
||||||
// Fields used by the bresenham algorithm for tracing the line
|
// Fields used by the Bresenham algorithm for tracing the line
|
||||||
long steps[NUM_AXIS]; // Step count along each axis
|
int32_t steps[NUM_AXIS]; // Step count along each axis
|
||||||
unsigned long step_event_count; // The number of step events required to complete this block
|
uint32_t step_event_count; // The number of step events required to complete this block
|
||||||
|
|
||||||
#if ENABLED(MIXING_EXTRUDER)
|
#if ENABLED(MIXING_EXTRUDER)
|
||||||
unsigned long mix_event_count[MIXING_STEPPERS]; // Scaled step_event_count for the mixing steppers
|
uint32_t mix_event_count[MIXING_STEPPERS]; // Scaled step_event_count for the mixing steppers
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
long accelerate_until, // The index of the step event on which to stop acceleration
|
int32_t accelerate_until, // The index of the step event on which to stop acceleration
|
||||||
decelerate_after, // The index of the step event on which to start decelerating
|
decelerate_after, // The index of the step event on which to start decelerating
|
||||||
acceleration_rate; // The acceleration rate used for acceleration calculation
|
acceleration_rate; // The acceleration rate used for acceleration calculation
|
||||||
|
|
||||||
unsigned char direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h)
|
uint8_t direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h)
|
||||||
|
|
||||||
// Advance extrusion
|
// Advance extrusion
|
||||||
#if ENABLED(LIN_ADVANCE)
|
#if ENABLED(LIN_ADVANCE)
|
||||||
bool use_advance_lead;
|
bool use_advance_lead;
|
||||||
int e_speed_multiplier8; // Factorised by 2^8 to avoid float
|
int16_t e_speed_multiplier8; // Factorised by 2^8 to avoid float
|
||||||
#elif ENABLED(ADVANCE)
|
#elif ENABLED(ADVANCE)
|
||||||
long advance_rate;
|
int32_t advance_rate;
|
||||||
volatile long initial_advance;
|
volatile int32_t initial_advance;
|
||||||
volatile long final_advance;
|
volatile int32_t final_advance;
|
||||||
float advance;
|
float advance;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -107,7 +109,6 @@ typedef struct {
|
|||||||
max_entry_speed, // Maximum allowable junction entry speed in mm/sec
|
max_entry_speed, // Maximum allowable junction entry speed in mm/sec
|
||||||
millimeters, // The total travel of this block in mm
|
millimeters, // The total travel of this block in mm
|
||||||
acceleration; // acceleration mm/sec^2
|
acceleration; // acceleration mm/sec^2
|
||||||
uint8_t flag; // Block flags (See BlockFlag enum above)
|
|
||||||
|
|
||||||
// Settings for the trapezoid generator
|
// Settings for the trapezoid generator
|
||||||
uint32_t nominal_rate, // The nominal step rate for this block in step_events/sec
|
uint32_t nominal_rate, // The nominal step rate for this block in step_events/sec
|
||||||
@ -116,11 +117,11 @@ typedef struct {
|
|||||||
acceleration_steps_per_s2; // acceleration steps/sec^2
|
acceleration_steps_per_s2; // acceleration steps/sec^2
|
||||||
|
|
||||||
#if FAN_COUNT > 0
|
#if FAN_COUNT > 0
|
||||||
unsigned long fan_speed[FAN_COUNT];
|
uint32_t fan_speed[FAN_COUNT];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(BARICUDA)
|
#if ENABLED(BARICUDA)
|
||||||
unsigned long valve_pressure, e_to_p_pressure;
|
uint32_t valve_pressure, e_to_p_pressure;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} block_t;
|
} block_t;
|
||||||
|
Loading…
Reference in New Issue
Block a user