Skip to content
Snippets Groups Projects
Commit c731284b authored by Jake Read's avatar Jake Read
Browse files

set position, better homing

parent 0ddf452a
No related branches found
No related tags found
No related merge requests found
Subproject commit 71bf90214692c6a2fb82d121708b91692648376a Subproject commit eb34931b0991d7c6e257968fe60af13b90b1f629
...@@ -12,7 +12,15 @@ ...@@ -12,7 +12,15 @@
#include "osape_arduino/vp_arduinoSerial.h" #include "osape_arduino/vp_arduinoSerial.h"
#include "osape_ucbus/vb_ucBusDrop.h" #include "osape_ucbus/vb_ucBusDrop.h"
OSAP osap("axl-stepper_x"); //OSAP osap("axl-stepper_z-rear-left");
//OSAP osap("axl-stepper_z-front-left");
//OSAP osap("axl-stepper_z-rear-right");
//OSAP osap("axl-stepper_z-front-right");
OSAP osap("axl-stepper_y-left");
//OSAP osap("axl-stepper_y-right");
//OSAP osap("axl-stepper_x");
//OSAP osap("axl-stepper_e");
VPort_ArduinoSerial vpUSBSerial(&osap, "arduinoUSBSerial", &Serial); VPort_ArduinoSerial vpUSBSerial(&osap, "arduinoUSBSerial", &Serial);
...@@ -34,10 +42,17 @@ EP_ONDATA_RESPONSES onStateData(uint8_t* data, uint16_t len){ ...@@ -34,10 +42,17 @@ EP_ONDATA_RESPONSES onStateData(uint8_t* data, uint16_t len){
} }
// set or target? // set or target?
if(set){ if(set){
if(mode == AXL_MODE_POSITION){ switch(mode){
OSAP::error("axl set-pos... havne't written it yet"); case AXL_MODE_POSITION:
} else { if(axl_isMoving()){
OSAP::error("we can only 'set' position, others are targs"); OSAP::error("AXL can't set pos while moving");
break;
}
axl_setPosition(targ);
break;
default:
OSAP::error("we can only 'set' position, others are targs");
break;
} }
} else { } else {
switch(mode){ switch(mode){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment