You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (parser.seenval('S')) for (uint8_t q = 0; q < DIGIPOT_I2C_NUM_CHANNELS; ++q) digipot_i2c.set_current(q, parser.value_float());
121
-
LOOP_LOGICAL_AXES(i) if (parser.seenval(IAXIS_CHAR(i))) digipot_i2c.set_current(i, parser.value_float()); // X Y Z (I J K U V W) E (map to drivers according to pots adresses. Default with NUM_AXES 3 X Y Z E: map to X Y Z E0)
127
+
// This current driver takes actual Amps in floating point
128
+
// rather than milli-amps or some scalar unit.
129
+
130
+
// S<current> - Set the same current in Amps on all channels
131
+
if (parser.seenval('S')) {
132
+
constfloat v = parser.value_float();
133
+
for (uint8_t q = 0; q < DIGIPOT_I2C_NUM_CHANNELS; ++q)
134
+
digipot_i2c.set_current(q, v);
135
+
}
136
+
137
+
// X Y Z I J K U V W E
138
+
// Map to drivers according to pots addresses.
139
+
// Default with NUM_AXES 3: map X Y Z E to X Y Z E0.
140
+
LOOP_LOGICAL_AXES(i)
141
+
if (parser.seenval(IAXIS_CHAR(i)))
142
+
digipot_i2c.set_current(i, parser.value_float());
143
+
122
144
// Additional extruders use B,C,D.
123
-
// TODO: Change these parameters because 'E' is used and because 'D' should be reserved for debugging. B<index>?
145
+
// TODO: Make parameters work like other axis-specific / stepper-specific. See above.
124
146
#if E_STEPPERS >= 2
125
147
for (uint8_t i = E_AXIS + 1; i < _MAX(DIGIPOT_I2C_NUM_CHANNELS, (NUM_AXES + 3)); i++)
126
-
if (parser.seenval('B' + i - (E_AXIS + 1))) digipot_i2c.set_current(i, parser.value_float());
148
+
if (parser.seenval('B' + i - (E_AXIS + 1)))
149
+
digipot_i2c.set_current(i, parser.value_float());
127
150
#endif
128
-
#endif
151
+
152
+
#endif// HAS_MOTOR_CURRENT_I2C
129
153
130
154
#if HAS_MOTOR_CURRENT_DAC
155
+
156
+
// S<current> - Set the same current percentage on all axes
LOOP_LOGICAL_AXES(i) if (parser.seenval(IAXIS_CHAR(i))) stepper_dac.set_current_percent(i, parser.value_float()); // X Y Z (I J K U V W) E (map to drivers according to DAC_STEPPER_ORDER. Default with NUM_AXES 3: X Y Z E map to X Y Z E0)
162
+
163
+
// X Y Z I J K U V W E
164
+
// Map to drivers according to pots addresses.
165
+
// Default with NUM_AXES 3: map X Y Z E to X Y Z E0.
0 commit comments