Changed gain and decay settings
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Thu, 12 Jan 2017 00:13:52 +0000 (16:13 -0800)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Thu, 12 Jan 2017 00:13:52 +0000 (16:13 -0800)
src/drv8711.c

index 0ed4bfa76df579c22fc9950d4527139328489793..f55d8112fb18d5131807bce4aa3eb918a449709e 100644 (file)
@@ -229,7 +229,7 @@ static void _init_spi_commands() {
 
     // Set DECAY
     commands[spi.ncmds++] =
-      DRV8711_WRITE(DRV8711_DECAY_REG, DRV8711_DECAY_DECMOD_MIXED | 6);
+      DRV8711_WRITE(DRV8711_DECAY_REG, DRV8711_DECAY_DECMOD_AUTO_OPT | 6);
 
     // Set STALL
     commands[spi.ncmds++] =
@@ -250,7 +250,7 @@ static void _init_spi_commands() {
     // Set CTRL enable motor & set ISENSE gain
     commands[spi.ncmds++] =
       DRV8711_WRITE(DRV8711_CTRL_REG, DRV8711_CTRL_ENBL_bm |
-                    DRV8711_CTRL_ISGAIN_5 | DRV8711_CTRL_DTIME_850);
+                    DRV8711_CTRL_ISGAIN_10 | DRV8711_CTRL_DTIME_850);
 
     // Read STATUS
     commands[spi.ncmds++] = DRV8711_READ(DRV8711_STATUS_REG);