Fix error in sine wave compression algorithm in tmc2130. This problem could manifest itself only for negative function slope, which is not used.

This commit is contained in:
Marek Bel 2018-07-12 18:56:11 +02:00
parent 2116262845
commit 070e6f49e8

View file

@ -878,7 +878,7 @@ void tmc2130_set_wave(uint8_t axis, uint8_t amp, uint8_t fac1000)
uint8_t x[3] = {255,255,255}; //X segment bounds (MSLUTSEL)
uint8_t s = 0; //current segment
int8_t b; //encoded bit value
uint8_t dA; //delta value
int8_t dA; //delta value
int i; //microstep index
uint32_t reg; //tmc2130 register
tmc2130_wr_MSLUTSTART(axis, 0, amp);