Skip to content

Commit 68127ba

Browse files
thinkyheaddamicreabox
authored andcommitted
Save 8 bytes of SRAM
1 parent dc169b1 commit 68127ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Marlin/stepper_dac.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
bool dac_present = false;
5151
const uint8_t dac_order[NUM_AXIS] = DAC_STEPPER_ORDER;
52-
uint16_t dac_channel_pct[XYZE] = DAC_MOTOR_CURRENT_DEFAULT;
52+
uint8_t dac_channel_pct[XYZE] = DAC_MOTOR_CURRENT_DEFAULT;
5353

5454
int dac_init() {
5555
#if PIN_EXISTS(DAC_DISABLE)
@@ -95,7 +95,7 @@
9595
static float dac_amps(int8_t n) { return mcp4728_getDrvPct(dac_order[n]) * (DAC_STEPPER_MAX) * 0.125 * (1.0 / (DAC_STEPPER_SENSE)); }
9696

9797
int16_t dac_current_get_percent(AxisEnum axis) { return mcp4728_getDrvPct(dac_order[axis]); }
98-
void dac_current_set_percents(int16_t pct[XYZE]) {
98+
void dac_current_set_percents(const int8_t pct[XYZE]) {
9999
LOOP_XYZE(i) dac_channel_pct[i] = pct[dac_order[i]];
100100
mcp4728_setDrvPct(dac_channel_pct);
101101
}

0 commit comments

Comments
 (0)