added high-level api-call for enabling or disabling the acceleration manager
This commit is contained in:
parent
db377f18f3
commit
4dbe7c4833
@ -26,7 +26,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "nuts_bolts.h"
|
#include "nuts_bolts.h"
|
||||||
#include "stepper.h"
|
#include "stepper.h"
|
||||||
|
#include "stepper_plan.h"
|
||||||
#include "wiring_serial.h"
|
#include "wiring_serial.h"
|
||||||
|
|
||||||
int32_t position[3]; // The current position of the tool in absolute steps
|
int32_t position[3]; // The current position of the tool in absolute steps
|
||||||
@ -42,6 +42,14 @@ void mc_dwell(uint32_t milliseconds)
|
|||||||
_delay_ms(milliseconds);
|
_delay_ms(milliseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mc_set_acceleration_manager_enabled(uint8_t enabled) {
|
||||||
|
if (enabled) {
|
||||||
|
plan_enable_acceleration_management();
|
||||||
|
} else {
|
||||||
|
plan_disable_acceleration_management();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second
|
// Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second
|
||||||
// unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in
|
// unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in
|
||||||
// 1/feed_rate minutes.
|
// 1/feed_rate minutes.
|
||||||
|
@ -23,9 +23,13 @@
|
|||||||
|
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
|
|
||||||
|
|
||||||
// Initializes the motion_control subsystem resources
|
// Initializes the motion_control subsystem resources
|
||||||
void mc_init();
|
void mc_init();
|
||||||
|
|
||||||
|
// Enables or disables the look ahead acceleration manager. (Default: on)
|
||||||
|
void mc_set_acceleration_manager_enabled(uint8_t enabled);
|
||||||
|
|
||||||
// Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second
|
// Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second
|
||||||
// unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in
|
// unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in
|
||||||
// (1 minute)/feed_rate time.
|
// (1 minute)/feed_rate time.
|
||||||
|
@ -303,7 +303,6 @@ void plan_disable_acceleration_management() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add a new linear movement to the buffer. steps_x, _y and _z is the signed, relative motion in
|
// Add a new linear movement to the buffer. steps_x, _y and _z is the signed, relative motion in
|
||||||
// steps. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
|
// steps. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
|
||||||
// calculation the caller must also provide the physical length of the line in millimeters.
|
// calculation the caller must also provide the physical length of the line in millimeters.
|
||||||
|
Loading…
Reference in New Issue
Block a user