+3度のやつ
Dependencies: ADXL345_I2C Control_Yokutan_CANver1 mbed
Fork of Souda_Yokutan_ver4 by
Diff: main.cpp
- Revision:
- 8:a28e4a469b8d
- Parent:
- 7:d6a3e47e6ef9
- Child:
- 9:57683fc5c110
--- 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); }