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.
Dependencies: ADXL345_I2C Control_Yokutan_CANver1 mbed
Fork of Control_Yokutan_CAN_ver2 by
Diff: main.cpp
- Revision:
- 8:a28e4a469b8d
- Parent:
- 7:d6a3e47e6ef9
- Child:
- 9:57683fc5c110
diff -r d6a3e47e6ef9 -r a28e4a469b8d main.cpp
--- a/main.cpp Wed Feb 17 02:48:01 2016 +0000
+++ b/main.cpp Wed Feb 17 02:51:04 2016 +0000
@@ -126,7 +126,6 @@
}
void WriteServo(int a,int b){
- if(a >= 45 && a <= 90 && b >= 45 && b <= 90){
if(controlValues[0] == (char)1)
servo1.pulsewidth(calcPulse(90));
else{
@@ -137,8 +136,6 @@
}
else{
servo2.pulsewidth(calcPulse(b));
- }
-
//servo1.pulsewidth(calcPulse(a.read()*170));
// servo2.pulsewidth(calcPulse(b.read()*170));
//pc.printf("%f", a.read());
@@ -148,8 +145,8 @@
//初期迎角を変える
void Debug(){
if(switch1 == 1){
- neutral_a = (int)(a * 180);
- neutral_b = (int)(b * 180);
+ neutral_a = (int)(a * 90);
+ neutral_b = (int)(b * 90);
WriteServo(neutral_a,neutral_b);
}
