![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: SPI.c
- Revision:
- 125:9400e64d0636
- Parent:
- 122:fbacb932a30b
- Child:
- 126:76579c4db080
--- a/SPI.c Fri Apr 08 14:20:35 2016 +0000 +++ b/SPI.c Fri Apr 08 17:52:16 2016 +0000 @@ -61,9 +61,9 @@ Spi.ADC3_Accum = 0; Spi.ADC4_Accum = 0; Spi.ADC5_Accum = 0; - Spi.PLC_NewData = 1; + Spi.ADC_NewData = 1; } - Spi.ADC_NewData = 1; + } @@ -87,23 +87,22 @@ { 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 -= (((Gyro.PLC_Delta * Gyro.PLC_Znak)/65536))*16; + Spi.DAC_B -= 16; + } else { 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 -= (((Gyro.PLC_Delta * Gyro.PLC_Znak)/65536))*16; + Spi.DAC_B += 16; } // Spi.DAC_B = (Gyro.PLC_Regul + 0x1fffffff)/65536; } else Spi.DAC_B += 16; - - - - Gyro.PLC_Old = PLC_In; }