Show
Ignore:
Timestamp:
08/04/08 11:28:46 (5 months ago)
Author:
liamstask
Message:

- fix the remaining instances of the modulo workaround

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • firmware/trunk/libraries/stepper/stepper.c

    r776 r777  
    688688void Stepper_SetUnipolarHalfStepOutput( StepperControl *s, int position ) 
    689689{ 
    690   int output = position % 8; 
     690  //int output = position % 8; 
     691  int output = position & 0x7; 
    691692 
    692693  int* iop = s->io; 
     
    760761void Stepper_SetUnipolarOutput( StepperControl *s, int position ) 
    761762{ 
    762   int output = position % 4; 
     763  //int output = position % 4; 
     764  int output = position & 0x3; 
    763765  int* iop = s->io; 
    764766 
     
    806808void Stepper_SetBipolarHalfStepOutput( StepperControl *s, int position ) 
    807809{ 
    808   int output = position % 8; 
    809  
     810  //int output = position % 8; 
     811  int output = position & 0x7; 
    810812  int* iop = s->io; 
    811813