Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 18:3988310cd03b
- Parent:
- 16:11ba5d6f42ba
diff -r 11ba5d6f42ba -r 3988310cd03b main.cpp
--- a/main.cpp Wed Feb 25 17:56:16 2015 +0000
+++ b/main.cpp Thu Feb 26 16:17:12 2015 +0000
@@ -52,9 +52,6 @@
if(rear_motor_enable_flag) {
TFC_HBRIDGE_ENABLE;
- //current_left_motor_speed = (TFC_ReadPot(0));
- //current_right_motor_speed = (TFC_ReadPot(1));
-
// checking behavior level
violence_level = int(TFC_GetDIP_Switch());
@@ -75,7 +72,6 @@
current_right_motor_speed = 0;
}
-
// protection block
if(current_left_motor_speed >= 0.5)
current_left_motor_speed= 0.5;
@@ -140,7 +136,7 @@
//current_left_motor_speed = current_left_motor_speed + float(64-black_center_value)*.0025;
//current_right_motor_speed = current_right_motor_speed + float(64-black_center_value)*.0025;
if (violence_level !=0){
- current_left_motor_speed = current_left_motor_speed + float(float(64-black_center_value)*.045);// kinda reverse this...
+ current_left_motor_speed = current_left_motor_speed + float(float(64-black_center_value)*.025);// kinda reverse this...
current_right_motor_speed = current_right_motor_speed + float(float(64-black_center_value)*.045);// push more forwards
}
@@ -170,7 +166,7 @@
//current_right_motor_speed = current_right_motor_speed - float(black_center_value-64)*.0025;
if (violence_level !=0){
current_left_motor_speed = current_left_motor_speed - float(float(black_center_value-64)*.045);// push more forwards
- current_right_motor_speed = current_right_motor_speed - float(float(black_center_value-64)*.045);// kinda reverse this...
+ current_right_motor_speed = current_right_motor_speed - float(float(black_center_value-64)*.025);// kinda reverse this...
}
// protection block
@@ -207,5 +203,4 @@
}
}
-
// shit code down here