File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ static const pwm_config_record pwm_config_data[] = {
78
78
{
79
79
.tag = pwm_extruder ,
80
80
.device_path = PWM_PATH_PREFIX "ehrpwm.2:0" , // BEBOPR_R2_J3 - PWM1
81
- .frequency = 10 ,
81
+ .frequency = 100 ,
82
82
},
83
83
{
84
84
.tag = pwm_fan ,
@@ -99,11 +99,12 @@ static const heater_config_record heater_config_data[] = {
99
99
.analog_output = pwm_extruder ,
100
100
.pid =
101
101
{
102
- .K = 0.0 ,
102
+ .FF_factor = 0.33 ,
103
+ .FF_offset = 40.0 ,
103
104
.P = 15.0 ,
104
- .I = 10 .0 ,
105
+ .I = 0 .0 ,
105
106
.D = 0.0 ,
106
- .I_limit = 0.7 ,
107
+ .I_limit = 10.0 ,
107
108
},
108
109
},
109
110
{
Original file line number Diff line number Diff line change @@ -221,7 +221,8 @@ int heater_init( void)
221
221
pd -> pid_settings .P = ps -> pid .P ;
222
222
pd -> pid_settings .I = ps -> pid .I ;
223
223
pd -> pid_settings .D = ps -> pid .D ;
224
- pd -> pid_settings .K = 0.0 ;
224
+ pd -> pid_settings .FF_factor = ps -> pid .FF_factor ;
225
+ pd -> pid_settings .FF_offset = ps -> pid .FF_offset ;
225
226
pd -> pid_settings .I_limit = ps -> pid .I_limit ;
226
227
pd -> setpoint = 0.0 ;
227
228
pd -> history_ix = 0 ;
Original file line number Diff line number Diff line change 8
8
9
9
10
10
typedef struct {
11
- double K ;
12
11
double P ;
13
12
double I ;
14
13
double D ;
15
14
double I_limit ;
15
+ double FF_factor ;
16
+ double FF_offset ;
16
17
} pid_settings ;
17
18
18
19
typedef const struct {
You can’t perform that action at this time.
0 commit comments