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

home in bus interrupt

parent a5cd7d25
No related branches found
No related tags found
No related merge requests found
...@@ -119,8 +119,6 @@ void loop() { ...@@ -119,8 +119,6 @@ void loop() {
osapLoop(); osapLoop();
stepper_hw->dacRefresh(); stepper_hw->dacRefresh();
limitHit() ? ERRLIGHT_ON : ERRLIGHT_OFF; limitHit() ? ERRLIGHT_ON : ERRLIGHT_OFF;
// home statemachine
if(getHomeState() != HOMESTATE_NONE) runHomingRoutine();
} // end loop } // end loop
// -------------------------------------------------------- BUS INTERRUPT / STEP // -------------------------------------------------------- BUS INTERRUPT / STEP
...@@ -138,10 +136,14 @@ void ucBusDrop_onPacketARx(uint8_t* inBufferA, volatile uint16_t len){ ...@@ -138,10 +136,14 @@ void ucBusDrop_onPacketARx(uint8_t* inBufferA, volatile uint16_t len){
} }
void ucBusDrop_onRxISR(void){ void ucBusDrop_onRxISR(void){
// if we're currently homing the motor, bail
// home statemachine
if(getHomeState() != HOMESTATE_NONE){
runHomingRoutine();
return;
}
// if we dont' have valid steps, bail // if we dont' have valid steps, bail
if(!stepValid) return; if(!stepValid) return;
// if we're currently homing the motor, bail
if(getHomeState() != HOMESTATE_NONE) return;
// extract our step mask // extract our step mask
stepMask = 0b00000011 & (stepCache[cachePtr] >> (axisPick * 2)); stepMask = 0b00000011 & (stepCache[cachePtr] >> (axisPick * 2));
// mask -> step api: // mask -> step api:
......
Subproject commit 53c513f461e43ac61d13d0111127b3f174fef466 Subproject commit f33baa5ff96067f3474518abdd5f7d44712c6121
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment