diff --git a/lambda/adc.h b/lambda/adc.h index 3e8aac3..40a71fe 100644 --- a/lambda/adc.h +++ b/lambda/adc.h @@ -12,8 +12,11 @@ #ifndef ADC_H_ #define ADC_H_ +/** ADC ref voltage */ #define AREF_MV 5000 +/** ADC nonlinearity offset at 0 mV voltage */ #define ADC_NONLIN_0 -8 +/** ADC nonlinearity offset at ref voltage */ #define ADC_NONLIN_AREF 12 #if F_CPU == 1000000 diff --git a/lambda/airgate.c b/lambda/airgate.c index c84b745..14bb445 100644 --- a/lambda/airgate.c +++ b/lambda/airgate.c @@ -6,7 +6,7 @@ * * Simple stepper motor control with a linear acceleration profile using the * DRV8825. An absolute position from 0 to 255 can be set where 200 units - * correspond to 360° rotation (with 1.8 ° step angle). + * correspond to 360° rotation (with 1.8° step angle). */ #include @@ -33,7 +33,7 @@ static volatile uint8_t speed = MIN_SPEED; /** - * Sets increased current for higher torque,sets the direction and initial + * Sets increased current for higher torque, sets the direction and initial * speed and starts the motor by starting the timer. */ static void start(void) { diff --git a/lambda/airgate.h b/lambda/airgate.h index bc6693c..7a1059d 100644 --- a/lambda/airgate.h +++ b/lambda/airgate.h @@ -16,6 +16,10 @@ /** Max value 255 for 8 bit timer and 65535 for 16 bit timer */ #define MAX_SPEED 250 +/* + * Mapping of airgate position to absolute motor position in (full) steps + * (1.8° step angle) + */ #define AIRGATE_CLOSE 0 #define AIRGATE_25 15 #define AIRGATE_50 30 @@ -34,7 +38,7 @@ /** * Sets the airgate position 0 - 255, where 200 units correspond to 360° - * rotation (with 1.8 ° step angle). + * rotation (with 1.8° step angle). */ void setAirgate(uint8_t const position);