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: FreePilot PinDetect mbed-src
Fork of FreePilot_V2-2 by
Diff: main.cpp
- Revision:
- 44:e9d5cd98273d
- Parent:
- 43:e3f064f5eecd
- Child:
- 45:ecd8c2e27948
--- a/main.cpp Mon Mar 09 15:59:41 2015 +0000 +++ b/main.cpp Mon Mar 09 17:36:36 2015 +0000 @@ -1277,7 +1277,11 @@ boom4.setSamplesTillHeld(5); boom4.setSampleFrequency(); - motor_switch.setSampleFrequency(10000); + //motor_switch.setSampleFrequency(10000); + + motor_switch.setSamplesTillAssert(5); + motor_switch.setSamplesTillHeld(5); + motor_switch.setSampleFrequency(); motor_switch.attach_asserted_held( &keyPressedHeld ); motor_switch.attach_deasserted_held( &keyReleasedHeld ); @@ -1293,8 +1297,8 @@ activate_antenna(); autosteer_timeout.start(); - //setTunings(0.25, 5, 1); - SetDigitalFilter(phaseadv,tcenter, 0); + //setTunings(0.25, 5, 1); //for PID + SetDigitalFilter(phaseadv,tcenter, 0); //for FGPS guidance while(1) { //JH send version information every 10 seconds to keep Bluetooth alive @@ -1345,8 +1349,8 @@ // pc.puts(boomstate); lastboom18=boom18; } - if ( print_euler == 1 && angle_send == 1 ) - { //&& reading == 0){ + if ( print_euler == 1 && angle_send == 1 ) { + //&& reading == 0){ lastpitch = 0.9*lastpitch + 0.1 * (toDegrees(get_pitch()*3.5)); lastroll = 0.9 * lastroll + 0.1 * toDegrees(get_roll()*3.5);