Browse Source

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

Marek Bel 6 years ago
parent
commit
070e6f49e8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Firmware/tmc2130.cpp

+ 1 - 1
Firmware/tmc2130.cpp

@@ -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);