![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
5/13 計器プログラム
Dependencies: SDFileSystem mbed
Fork of keiki2016ver3 by
Diff: main.cpp
- Revision:
- 6:98a63127aa11
- Parent:
- 5:1b3c8e5ee99e
diff -r 1b3c8e5ee99e -r 98a63127aa11 main.cpp --- a/main.cpp Fri Mar 25 01:22:17 2016 +0000 +++ b/main.cpp Fri May 13 07:31:18 2016 +0000 @@ -48,7 +48,7 @@ FILE* fp; PwmOut kisokuServo(p22); -PwmOut geikakuServo(p25); +PwmOut geikakuServo(p26); char soudaDatas[SOUDA_DATAS_NUM]; float writeDatas[SD_WRITE_NUM][WRITE_DATAS_NUM]; @@ -77,7 +77,7 @@ void init(){ twe.baud(115200); - writeTimer.start(); + //writeTimer.start(); kisokuServo.period_ms(INIT_SERVO_PERIOD_MS); geikakuServo.period_ms(INIT_SERVO_PERIOD_MS); FusokukeiInit(); @@ -265,8 +265,9 @@ void WriteServo(){ kisokuServo.pulsewidth(calcPulse(airSpeed*10)); - //geikakuServo.pulsewidth(calcPulse(pitch*0.13)); - + geikakuServo.pulsewidth(calcPulse(pitch*90/13.0)); + //pc.printf("a:%f",airSpeed); + //pc.printf("p:%f\r\n",pitch); //kisokuServo.pulsewidth(calcPulse(0)); //geikakuServo.pulsewidth(calcPulse(0)); }