- Fixed a confusing error message with the SANS-2 velocity selector
- Added a parameter DEC to the motor driver which determines the number of decimals on the fucking display screen and made this work too
This commit is contained in:
@@ -68,8 +68,9 @@ Parameter indexes in ObPar array and meanings
|
||||
#define DEG2STEP 14 /* conversion factor from degree to encoder digits */
|
||||
#define BACKLASH 15 /* motor backlash */
|
||||
#define PORT 17 /* ECB port when multiplexed */
|
||||
#define DEC 18 /* Decimals in display */
|
||||
|
||||
#define MAXPAR 19 /* 1 extra for the sentinel, do not forget to initialize! */
|
||||
#define MAXPAR 20 /* 1 extra for the sentinel, do not forget to initialize! */
|
||||
|
||||
/*------------------------------ ECB defines -------------------------*/
|
||||
#define MAX_ENCODER 40
|
||||
@@ -483,6 +484,7 @@ static int loadGearing(pECBMotDriv self){
|
||||
Ecb_pack data;
|
||||
Z80_reg in, out;
|
||||
|
||||
dec = (int)ObVal(self->driverPar,DEC);
|
||||
in.c = self->ecbIndex;
|
||||
dgear = (double) ObVal(self->driverPar,STEPS2DEG);;
|
||||
|
||||
@@ -1232,6 +1234,7 @@ static void initializeParameters(pECBMotDriv self){
|
||||
ObParInit(self->driverPar,DEG2STEP,"step2dig",0,usMugger);
|
||||
ObParInit(self->driverPar,BACKLASH,"backlash",0,usMugger);
|
||||
ObParInit(self->driverPar,PORT,"port",0,usMugger);
|
||||
ObParInit(self->driverPar,DEC,"dec",1,usMugger);
|
||||
ObParInit(self->driverPar,MAXPAR-1,"tueet",-100,-100); /* sentinel! */
|
||||
}
|
||||
/*=======================================================================*/
|
||||
|
||||
Reference in New Issue
Block a user