Created
December 1, 2012 20:50
-
-
Save znuh/4184988 to your computer and use it in GitHub Desktop.
OpenHR20E mod: upper limit for valve
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- motor.c (revision 366) | |
+++ motor.c (working copy) | |
@@ -55,6 +55,8 @@ | |
#include "com.h" | |
#include "debug.h" | |
+#define MY_MAX_VAL 500 | |
+ | |
// typedefs | |
@@ -105,9 +107,11 @@ | |
MOTOR_wait_for_new_calibration--; | |
} else { | |
if (MOTOR_calibration_step==1) { | |
- MOTOR_calibration_step++; | |
+ //MOTOR_calibration_step++; | |
+ MOTOR_calibration_step = 3; | |
MOTOR_PosStop= +MOTOR_MAX_IMPULSES; | |
- MOTOR_Control(open); | |
+ //MOTOR_Control(open); | |
+ MOTOR_Control(close); | |
} | |
} | |
if (MOTOR_calibration_step==-2) { | |
@@ -371,7 +375,8 @@ | |
{ | |
if (MOTOR_calibration_step == 3 ) { | |
MOTOR_calibration_step = 0; // calibration DONE | |
- MOTOR_PosMax -= MOTOR_PosAct; | |
+ //MOTOR_PosMax -= MOTOR_PosAct; | |
+ MOTOR_PosMax = MY_MAX_VAL; | |
} else if (MOTOR_PosAct>MOTOR_MIN_IMPULSES) { | |
MOTOR_calibration_step = -1; // calibration error | |
CTL_error |= CTL_ERR_MOTOR; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment