summaryrefslogtreecommitdiff
path: root/src/c/scilab-arduino/cmd_dcmotor_release
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/scilab-arduino/cmd_dcmotor_release')
-rw-r--r--src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c b/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c
index 349bcb1..a228303 100644
--- a/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c
+++ b/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c
@@ -15,6 +15,7 @@
void u8cmd_dcmotor_releases(uint8 board_no, uint8 motor_no)
{
+<<<<<<< HEAD
if (dcm_mode[motor_no] == 3)
{
analogWrite(dcm_pin_1[motor_no],0);
@@ -25,5 +26,17 @@ void u8cmd_dcmotor_releases(uint8 board_no, uint8 motor_no)
{
digitalWrite(dcm_pin_1[motor_no],LOW);
digitalWrite(dcm_pin_2[motor_no],LOW);
+=======
+ if (dcm_mode[motor_no] == 3) //for IC accepting analog value
+ {
+ analogWrite(dcm_pin_1[motor_no],0); //passing LOW to IC pins to stop the motor
+ analogWrite(dcm_pin_2[motor_no],0);
+ }
+
+ else //for IC accepting digital value
+ {
+ digitalWrite(dcm_pin_1[motor_no],LOW);
+ digitalWrite(dcm_pin_2[motor_no],LOW); //passing LOW to IC pins to stop the motor
+>>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
}
}