Commit 6fa375d4 authored by Jake Read's avatar Jake Read
Browse files

add option for og module on stepper, and add homing query state for home-completion promises

parent 3ccc109b
......@@ -4,4 +4,6 @@
//#define UCBUS_IS_HEAD
#define UCBUS_IS_DROP
#define IS_OG_MODULE
#endif
\ No newline at end of file
......@@ -104,6 +104,17 @@ boolean onHomeData(uint8_t* data, uint16_t len){
vertex_t* homeEp = osapBuildEndpoint("Home", onHomeData, nullptr);
// -------------------------------------------------------- HOME STATE
boolean beforeHomeStateQuery(void);
vertex_t* homeStateEp = osapBuildEndpoint("HomeState", nullptr, beforeHomeStateQuery);
boolean beforeHomeStateQuery(void){
homeStateEp->ep->data[0] = homing;
homeStateEp->ep->dataLen = 1;
}
// -------------------------------------------------------- LIMIT SETUP
#define LIMIT_PORT PORT->Group[0]
......@@ -148,6 +159,7 @@ void setup() {
osapAddVertex(cScaleEp); // 5
// homing
osapAddVertex(homeEp); // 6
osapAddVertex(homeStateEp); // 7
// stepper init
stepper_hw->init(false, c_scale);
}
......@@ -289,7 +301,7 @@ void ucBusDrop_onRxISR(void){
}
return;
}
// normal step operation
//DEBUG2PIN_TOGGLE;
move_counter += vel;
boolean move_check = (move_counter > 1.0F);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment