![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
Diff: SPI.c
- Revision:
- 126:76579c4db080
- Parent:
- 125:9400e64d0636
- Child:
- 127:6a7472d67804
--- a/SPI.c Fri Apr 08 17:52:16 2016 +0000 +++ b/SPI.c Sat Apr 09 15:19:06 2016 +0000 @@ -74,7 +74,7 @@ PLC_In = Gyro.AD_Slow; // PLC_In = Gyro.AD_Fast; - Gyro.PLC_Delta = Gyro.PLC_Old - PLC_In; + Gyro.PLC_Delta = PLC_In - Gyro.PLC_Old; @@ -88,7 +88,7 @@ Gyro.PLC_Znak = 1; // Gyro.PLC_Regul -= ((Gyro.PLC_Delta * Gyro.PLC_Znak)/100); // Spi.DAC_B -= (((Gyro.PLC_Delta * Gyro.PLC_Znak)/65536))*16; - Spi.DAC_B -= 16; + Spi.DAC_B -= 64; } @@ -97,7 +97,7 @@ Gyro.PLC_Znak = -1; // Gyro.PLC_Regul -= ((Gyro.PLC_Delta * Gyro.PLC_Znak)/100); // Spi.DAC_B -= (((Gyro.PLC_Delta * Gyro.PLC_Znak)/65536))*16; - Spi.DAC_B += 16; + Spi.DAC_B += 64; } // Spi.DAC_B = (Gyro.PLC_Regul + 0x1fffffff)/65536;