19 int abdrive360_getEepromPins();
20 int abdrive360_getEepromTransfer();
22 volatile int abd360_initialized = 0;
24 volatile int abd360_unitsPerRev = ABD360_UNITS_REV;
26 volatile int abd360_pinCtrlLeft = ABD60_PIN_CTRL_L;
27 volatile int abd360_pinCtrlRight = ABD360_PIN_CTRL_R;
28 volatile int abd360_pinFbLeft = ABD60_PIN_FB_L;
29 volatile int abd360_pinFbRight = ABD360_PIN_FB_R;
36 volatile int abd360_gotoMode = ABD360_GOTO_BLOCK;
38 volatile int abd360_suppress_eeprom = 0;
42 abd360_suppress_eeprom = state;
49 if(!abd360_suppress_eeprom)
51 abdrive360_getEepromPins();
58 if(result < 0) flag = 1;
65 if(result < 0) flag = 1;
99 if(!abd360_suppress_eeprom)
101 abdrive360_getEepromTransfer();
104 abd360_initialized = 1;
108 int abdrive360_getEepromPins()
111 unsigned char pinInfo[16];
113 for(
int i = 0; i < 16; i++)
128 if(pinInfo[0] ==
's' && pinInfo[1] ==
'p' && pinInfo[2] ==
'L' && pinInfo[5] ==
'R')
130 abd360_pinCtrlLeft = (int) pinInfo[3];
131 abd360_pinCtrlRight = (int) pinInfo[6];
140 if(pinInfo[8] ==
'e' && pinInfo[9] ==
'p' && pinInfo[10] ==
'L' && pinInfo[13] ==
'R')
142 abd360_pinFbLeft = (int) pinInfo[11];
143 abd360_pinFbRight = (int) pinInfo[14];
153 int abdrive360_getEepromTransfer()
157 unsigned char str[12];
161 if(strcmp(str,
"AB360 "))
192 servo360_setTransferFunction(abd360_pinCtrlLeft, S360_SETTING_VM_CCW, mVccwL);
193 servo360_setTransferFunction(abd360_pinCtrlLeft, S360_SETTING_VB_CCW, bVccwL);
194 servo360_setTransferFunction(abd360_pinCtrlLeft, S360_SETTING_VM_CW, mVcwL);
195 servo360_setTransferFunction(abd360_pinCtrlLeft, S360_SETTING_VB_CW, -bVcwL );
197 servo360_setTransferFunction(abd360_pinCtrlRight, S360_SETTING_VM_CCW, mVccwR );
198 servo360_setTransferFunction(abd360_pinCtrlRight, S360_SETTING_VB_CCW, bVccwR);
199 servo360_setTransferFunction(abd360_pinCtrlRight, S360_SETTING_VM_CW, mVcwR);
200 servo360_setTransferFunction(abd360_pinCtrlRight, S360_SETTING_VB_CW, -bVcwR);