User Tools

Site Tools


Sidebar

Table of contents

pidgesture

This is an old revision of the document!


Gesture PID tuning (under construction)

The gesture based pid tuning allows the pilot to change the acro pids at the field, without the use of a computer. The new pids can be saved, and will be loaded next time the quad powers up. If not saved by performing the appropriate gesture, they will be discarded when the quad is powered off.

Silverware branches of BWHOOP, H8BLUE, (Poth STM MCU) H101/H8S and H8Green (GigaDevice MCU) now have to possibility to tune the PIDs via Tx gestures (thanks to RCGroups user eitama for adding it!).

New options in config.h:

// Comment out to disable pid tuning gestures
#define PID_GESTURE_TUNING
#define COMBINE_PITCH_ROLL_PID_TUNING

Make sure you have commented in

#define GESTURES2_ENABLE

on STM Silverwares, it won't work otherwise!

Basic instructions:

The PIDs can be changed in the order you find them in pid.c

example:

// Kp                           ROLL       PITCH     YAW
float pidkp_flash[PIDNUMBER] = { 12.0e-2, 12.0e-2, 4e-1 };
// Ki
float pidki_flash[PIDNUMBER] = { 6.5e-1, 6.5e-1, 50e-1 };
// Kd
float pidkd_flash[PIDNUMBER] = { 6.05e-1, 6.05e-1, 4e-1 };

If you plug in the battery, The “cursor” stands on PID value “P” on ROLL axis

Gestures are as follows:

Up - Down - Up (further called UDU) (means right stick Up-Center-Down-Center-Up, others work similar)

Up - Down - Down (further called UDD)

Up - Down - Left (further called UDL)

Up - Down - Right (further called UDR)

Down - Down - Down (further called DDD)

UDU: Cycle the Cursor to the next Row (Confirmed by LED Blinks, 1x Blink = P, 2x Blink = I, 3x Blink = D)

UDD: Cycle the Cursor to the next Column (ROLL –> PITCH –> YAW, also confirmed by the LED blinks as above)

note: If you selected #define COMBINE_PITCH_ROLL_PID_TUNING, you won't get the 2 blinks while changing the Column, as ROLL/PITCH are tuned simultaneously

UDL: Decrease the selected Value (Where the Cursor stands) by 10%

UDR: Increase the selected Value (Where the Cursor stands) by 10%

DDD: Save The selected PIDs to the Quad (note: this also performs an ACC calibration, make sure the quad is levelled at this moment or perform another ACC calibration later)

For PID tuning, it's highly recommended to use SilverVISE Android app, where you can see the cursor and also see the PID numbers / changes. For all that don't own an Android device and are interested in the actual numbers, it's recommended to use the debug mode, where the PIDs could be seen (as decimal numbers!) For all infos how to use the app please click at the link above.

Important:

Once the PIDs got changed and saved via gestures, they will stay even when you reflash the firmware, given that you did not change the PIDs in PID.c. Once these are changed, these will overwrite the PIDs iin flash, so take care while using Debug Mode

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
pidgesture.1496446994.txt.gz · Last modified: 2017/06/03 01:43 by silverxxx