diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1 @@ + diff --git a/Silverware/src/config.h b/Silverware/src/config.h index c4d944be..cc735fb2 100644 --- a/Silverware/src/config.h +++ b/Silverware/src/config.h @@ -10,11 +10,11 @@ // *************uncomment BWHOOP define for bwhoop, bwhoop pro, E011C Santa Edition, and Beta FPV Lite Flight Controllers // *************uncomment E011 define for E011 flight Controller // *************uncomment H8mini_blue_board for the H8 mini flight controller with blue circuit board -//#define BWHOOP +#define BWHOOP //#define E011 //#define H8mini_blue_board //#define Silverlite_Brushless -#define Alienwhoop_ZERO +//#define Alienwhoop_ZERO @@ -75,25 +75,25 @@ // *************Radio protocol selection // *************select only one -#define RX_SBUS +//#define RX_SBUS //#define RX_CRSF //Requires tbs firmware v2.88 or newer for failsafe to operate properly //#define RX_DSMX_2048 //#define RX_DSM2_1024 //#define RX_IBUS //#define RX_NRF24_BAYANG_TELEMETRY //#define RX_BAYANG_BLE_APP -//#define RX_BAYANG_PROTOCOL_TELEMETRY_AUTOBIND +#define RX_BAYANG_PROTOCOL_TELEMETRY_AUTOBIND // *************Transmitter Type Selection -//#define USE_STOCK_TX +#define USE_STOCK_TX //#define USE_DEVO -#define USE_MULTI +//#define USE_MULTI // *******************************SWITCH SELECTION***************************** // *************CHAN_ON - on always ( all protocols) // *************CHAN_OFF - off always ( all protocols) // *************Aux channels are selectable as CHAN_5 through CHAN_12 for DEVO and through CHAN_13 (but no CHAN_11) for MULTIMODULE users -// *************Toy transmitter mapping is CHAN_5 (rates button), CHAN_6 (stick gestures RRD/LLD), +//*************Toy transmitter mapping is CHAN_5 (rates button), CHAN_6 (stick gestures RRD/LLD), //**************CHAN_7 (headfree button), CHAN_8 (roll trim buttons), CHAN_9 (pitch trim buttons) //*************Arm switch and Idle Up switch (idle up will behave like betaflight airmode) @@ -106,11 +106,11 @@ #define ARMING CHAN_5 #define IDLE_UP CHAN_5 #define LEVELMODE CHAN_6 -#define RACEMODE CHAN_7 -#define HORIZON CHAN_8 -#define PIDPROFILE CHAN_9 //For switching stickAccelerator & stickTransition profiles on pid.c page +#define RACEMODE CHAN_OFF +#define HORIZON CHAN_OFF +#define PIDPROFILE CHAN_OFF //For switching stickAccelerator & stickTransition profiles on pid.c page #define RATES CHAN_ON -#define LEDS_ON CHAN_10 +#define LEDS_ON CHAN_ON // *************switch for fpv / other, requires fet // *************comment out to disable @@ -126,7 +126,7 @@ //#define AUX1_START_ON // *************automatically remove center bias in toy tx ( needs throttle off for 1 second ) -//#define STOCK_TX_AUTOCENTER +#define STOCK_TX_AUTOCENTER @@ -204,14 +204,14 @@ //#define WEAK_FILTERING //#define STRONG_FILTERING -//#define VERY_STRONG_FILTERING +#define VERY_STRONG_FILTERING //#define ALIENWHOOP_ZERO_FILTERING -#define BETA_FILTERING +//#define BETA_FILTERING -#ifdef BETA_FILTERING //*** ABOVE 100 ADJUST IN INCRIMENTS OF 20, BELOW 100 ADJUST IN INCRIMENTS OF 10, nothing coded beyond 500hz +//#ifdef BETA_FILTERING //*** ABOVE 100 ADJUST IN INCRIMENTS OF 20, BELOW 100 ADJUST IN INCRIMENTS OF 10, nothing coded beyond 500hz -//Select Gyro Filter Type *** Select Only One type -#define KALMAN_GYRO +Select Gyro Filter Type *** Select Only One type +//#define KALMAN_GYRO //#define PT1_GYRO //Select Gyro Filter Cut Frequency @@ -236,12 +236,12 @@ #define MOTOR_MIN_COMMAND 5.0 // *************invert yaw pid for "PROPS OUT" configuration - This feature is switchable to "PROPS IN" when active with stick gesture DOWN-UP-DOWN, Save selection with DOWN-DOWN-DOWN -#define INVERT_YAW_PID +//#define INVERT_YAW_PID // *************pwm frequency for motor control // *************a higher frequency makes the motors more linear // *************in Hz -#define PWMFREQ 32000 +//#define PWMFREQ 32000 // *************clip feedforward attempts to resolve issues that occur near full throttle by adding any clipped motor commands to the next loop output //#define CLIP_FF @@ -348,7 +348,7 @@ // *************DEFINE FLIGHT CONTROLLER HARDWARE HAS BEEN MODIFIED FOR BRUSHLESS CONVERSION **WARNING**DO NOT ENABLE DSHOT DMA ESC DRIVER WITH BRUSHED MOTORS ATTACHED** -//#define BRUSHLESS_CONVERSION +#define BRUSHLESS_CONVERSION //enables use of stick accelerator and stick transition for d term lpf 1 & 2 #define ADVANCED_PID_CONTROLLER @@ -382,7 +382,7 @@ //#define RXDEBUG // debug things ( debug struct and other) -//#define DEBUG +//#define DEBUG diff --git a/Silverware/src/pid.c b/Silverware/src/pid.c index 49bffb1c..669f50e0 100644 --- a/Silverware/src/pid.c +++ b/Silverware/src/pid.c @@ -66,9 +66,9 @@ float stickTransitionProfileB[3] = { 0.3 , 0.3 , 0.0}; //keep values //6mm & 7mm Abduction Pids for whoops (Team Alienwhoop)- set filtering ALIENWHOOP_ZERO_FILTERING or default beta filters // ROLL PITCH YAW -float pidkp[PIDNUMBER] = {21.5e-2 , 21.5e-2 , 10.5e-1 }; -float pidki[PIDNUMBER] = { 14e-1 , 15e-1 , 15e-1 }; -float pidkd[PIDNUMBER] = { 7.4e-1 , 7.4e-1 , 5.5e-1 }; +//float pidkp[PIDNUMBER] = {21.5e-2 , 21.5e-2 , 10.5e-1 }; +//float pidki[PIDNUMBER] = { 14e-1 , 15e-1 , 15e-1 }; +//float pidkd[PIDNUMBER] = { 7.4e-1 , 7.4e-1 , 5.5e-1 }; //BOSS 7 with 716 motors and 46mm Props - set filtering to BETA_FILTERING and adjust pass 1 and pass 2 for KALMAN_GYRO both to 70hz, set DTERM_LPF_2ND_HZ to 120hz, disable motor filtering @@ -85,12 +85,15 @@ float pidkd[PIDNUMBER] = { 7.4e-1 , 7.4e-1 , 5.5e-1 }; //float pidki[PIDNUMBER] = { 14e-1 , 15e-1 , 15e-1 }; //float pidkd[PIDNUMBER] = { 5.6e-1 , 6.7e-1 , 0.5e-1 }; -//4in Brushless Pids - 1407 3600kv Motors, 4s - Gyro filters at 90hz, 1st order D at 70hz - PID_Vbat Comp seems ok here +//4in Brushless Pids - 2207 3600kv Motors, 2s - Gyro filters at 90hz, 1st order D at 70hz - PID_Vbat Comp seems ok here // ROLL PITCH YAW //float pidkp[PIDNUMBER] = {9.5e-2 , 12.5e-2 , 2.0e-1 }; //float pidki[PIDNUMBER] = { 14.0e-1 , 14.0e-1 , 14.0e-1 }; //float pidkd[PIDNUMBER] = { 2.3e-1 , 3.3e-1 , 0.5e-1 }; - +PID build 2S : +float pidkp[PIDNUMBER] = {11.2e-2 , 12.6e-2 , 1.8e-1 }; +float pidki[PIDNUMBER] = { 14e-1 , 15e-1 , 15e-1 }; +float pidkd[PIDNUMBER] = { 5.6e-1 , 6.7e-1 , 0.5e-1 }; //*************** The following tunes beyond this point are all pretty dated. I have not built/flown/tuned any of these in a long time and there have been alot of changes. //*************** If your build best matches some of the specs below ... consider the tune a starting point and give me feedback/adjust as necessary.