projects
/
bbctrl-firmware
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00f5d39
)
Alarm if machine position is set while the machine is moving
author
Joseph Coffland
<joseph@cauldrondevelopment.com>
Mon, 5 Sep 2016 01:23:29 +0000
(18:23 -0700)
committer
Joseph Coffland
<joseph@cauldrondevelopment.com>
Mon, 5 Sep 2016 01:23:29 +0000
(18:23 -0700)
src/machine.c
patch
|
blob
|
history
diff --git
a/src/machine.c
b/src/machine.c
index f37f021693088ab57cfa31b1dbae0dd259e72f0b..6fa9bcdea8fa626c4d035a4ee1b1d0d742ca9425 100644
(file)
--- a/
src/machine.c
+++ b/
src/machine.c
@@
-721,7
+721,10
@@
static void _exec_offset(float *value, float *flag) {
* mp_get_runtime_busy() to be sure the system is quiescent.
*/
void mach_set_position(int axis, float position) {
- // TODO: Interlock involving runtime_busy test
+ if ((mp_get_state() != STATE_HOLDING && mp_get_state() != STATE_READY) ||
+ mp_get_runtime_busy())
+ CM_ALARM(STAT_INTERNAL_ERROR);
+
mach.position[axis] = position;
mach.ms.target[axis] = position;
mp_set_planner_position(axis, position);