Eigen Revision
Dependencies: mbed LPS25HB_I2C LSM9DS1 PIDcontroller Autopilot_Eigen LoopTicker GPSUBX_UART_Eigen SBUS_without_mainfile MedianFilter Eigen UsaPack solaESKF_Eigen Vector3 CalibrateMagneto FastPWM
Diff: main.cpp
- Revision:
- 11:ec79564cf265
- Parent:
- 7:70161eb0f854
- Child:
- 12:06891de5c601
diff -r 58c2411703f7 -r ec79564cf265 main.cpp --- a/main.cpp Thu Jan 21 15:50:49 2021 +0000 +++ b/main.cpp Thu Jan 28 03:32:13 2021 +0000 @@ -37,10 +37,10 @@ pc.printf("rc2 :%f ", rc1); int pwmMax = 1800; int pwmMin = 1200; - out1 = map((int)(rc1*1000.0f),-1000,1000,pwmMin,pwmMax); + out1 = map((int)(rc1*2000.0f),-2000,2000,pwmMin,pwmMax); if(out1<pwmMin){out1 = pwmMin;}; if(out1>pwmMax){out1 = pwmMax;}; - out2 = map((int)(rc2*1000.0f),-1000,1000,pwmMin,pwmMax); + out2 = map((int)(rc2*2000.0f),-2000,2000,pwmMin,pwmMax); if(out2<pwmMin){out2 = pwmMin;}; if(out2>pwmMax){out2 = pwmMax;}; @@ -63,10 +63,12 @@ servo2.period(0.020); LoopTicker timer_SBUS; LoopTicker timer_Gyro; - timer_SBUS.attach(interrupt_SBUS, 0.020); + timer_SBUS.attach(interrupt_SBUS, 0.015); timer_Gyro.attach(interrupt_Gyro, 0.5); while(1) { timer_SBUS.loop(); - timer_SBUS.loop(); + timer_Gyro.loop(); +// interrupt_SBUS(); + interrupt_Gyro(); } } \ No newline at end of file