Rev 2026 | Rev 2035 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2026 | Rev 2032 | ||
---|---|---|---|
Line 86... | Line 86... | ||
86 | #define SET_POT_MM(b,a,min,max) {if (a>=255-VARIABLE_COUNT) b=variables[a+VARIABLE_COUNT-255]; else b=a; if(b<=min) b=min; else if(b>=max) b=max;} |
86 | #define SET_POT_MM(b,a,min,max) {if (a>=255-VARIABLE_COUNT) b=variables[a+VARIABLE_COUNT-255]; else b=a; if(b<=min) b=min; else if(b>=max) b=max;} |
87 | #define SET_POT(b,a) {if (a>=255-VARIABLE_COUNT) b=variables[a+VARIABLE_COUNT-255]; else b=a;} |
87 | #define SET_POT(b,a) {if (a>=255-VARIABLE_COUNT) b=variables[a+VARIABLE_COUNT-255]; else b=a;} |
88 | SET_POT_MM(dynamicParams.gyroP, staticParams.gyroP, 5, 200); |
88 | SET_POT_MM(dynamicParams.gyroP, staticParams.gyroP, 5, 200); |
89 | SET_POT(dynamicParams.gyroI, staticParams.gyroI); |
89 | SET_POT(dynamicParams.gyroI, staticParams.gyroI); |
90 | SET_POT(dynamicParams.gyroD, staticParams.gyroD); |
90 | SET_POT(dynamicParams.gyroD, staticParams.gyroD); |
91 | SET_POT(dynamicParams.IFactor, staticParams.IFactor); |
- | |
92 | SET_POT(dynamicParams.yawIFactor, staticParams.yawIFactor); |
- | |
93 | SET_POT(dynamicParams.compassYawEffect,staticParams.compassYawEffect); |
91 | SET_POT(dynamicParams.compassYawEffect,staticParams.compassYawEffect); |
Line 94... | Line 92... | ||
94 | 92 | ||
95 | SET_POT(dynamicParams.externalControl, staticParams.externalControl); |
- | |
96 | SET_POT(dynamicParams.axisCoupling1, staticParams.axisCoupling1); |
- | |
97 | SET_POT(dynamicParams.axisCoupling2, staticParams.axisCoupling2); |
- | |
98 | SET_POT(dynamicParams.axisCouplingYawCorrection, staticParams.axisCouplingYawCorrection); |
93 | SET_POT(dynamicParams.externalControl, staticParams.externalControl); |
99 | SET_POT(dynamicParams.dynamicStability,staticParams.dynamicStability); |
94 | SET_POT(dynamicParams.dynamicStability,staticParams.dynamicStability); |
Line 100... | Line 95... | ||
100 | SET_POT(dynamicParams.maxAccVector,staticParams.maxAccVector); |
95 | SET_POT(dynamicParams.maxAccVector,staticParams.maxAccVector); |
- | 96 | ||
101 | 97 | SET_POT(dynamicParams.heightP, staticParams.heightP); |
|
102 | SET_POT_MM(dynamicParams.heightP, staticParams.heightP,0,100); |
98 | SET_POT(dynamicParams.heightI, staticParams.heightI); |
103 | SET_POT_MM(dynamicParams.heightD, staticParams.heightD,0,100); |
- | |
Line 104... | Line -... | ||
104 | SET_POT(dynamicParams.heightSetting,staticParams.heightSetting); |
- | |
105 | SET_POT(dynamicParams.attitudeControl,staticParams.attitudeControl); |
99 | SET_POT(dynamicParams.heightD, staticParams.heightD); |
106 | - | ||
Line 107... | Line 100... | ||
107 | for (i=0; i<sizeof(staticParams.userParams); i++) { |
100 | SET_POT(dynamicParams.heightSetting,staticParams.heightSetting); |
108 | SET_POT(dynamicParams.userParams[i],staticParams.userParams[i]); |
101 | |
Line 109... | Line 102... | ||
109 | } |
102 | SET_POT(dynamicParams.attitudeControl,staticParams.attitudeControl); |
110 | 103 | ||
Line 111... | Line 104... | ||
111 | SET_POT(dynamicParams.servoManualControl[0], staticParams.servoConfigurations[0].manualControl); |
104 | SET_POT(dynamicParams.servoManualControl[0], staticParams.servoConfigurations[0].manualControl); |
112 | SET_POT(dynamicParams.servoManualControl[1], staticParams.servoConfigurations[1].manualControl); |
105 | SET_POT(dynamicParams.servoManualControl[1], staticParams.servoConfigurations[1].manualControl); |
- | 106 | ||
- | 107 | SET_POT_MM(dynamicParams.output0Timing, staticParams.outputFlash[0].timing,1,255); |
|
- | 108 | SET_POT_MM(dynamicParams.output1Timing, staticParams.outputFlash[1].timing,1,255); |
|
- | 109 | ||
113 | 110 | SET_POT(dynamicParams.levelCorrection[0], staticParams.levelCorrection[0]); |
|
Line 114... | Line 111... | ||
114 | SET_POT_MM(dynamicParams.output0Timing, staticParams.outputFlash[0].timing,1,255); |
111 | SET_POT(dynamicParams.levelCorrection[1], staticParams.levelCorrection[1]); |
115 | SET_POT_MM(dynamicParams.output1Timing, staticParams.outputFlash[1].timing,1,255); |
112 | |
116 | 113 | for (i=0; i<sizeof(staticParams.userParams); i++) { |