![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
Diff: SPI.c
- Revision:
- 104:ab1cb4ff56b2
- Parent:
- 99:3d8f206ceac2
- Child:
- 105:bd01d8d20fb6
--- a/SPI.c Wed Mar 30 14:20:03 2016 +0000 +++ b/SPI.c Thu Mar 31 10:16:56 2016 +0000 @@ -81,24 +81,22 @@ Count_AMP++; - if(Count_AMP>=(64*200)) + if(Count_AMP>=(32*32)) { Delta = ADD_AMP - Cur_Amp; - if ( Delta > 30000000 ) Spi.DAC_B += 1000; - else if ( Delta < (-3000000) ) Spi.DAC_B += 1000; + if ( Delta > 3000000 ) Spi.DAC_B += 100; + else if ( Delta < (-300000) ) Spi.DAC_B += 100; else if ((Delta * Znak_Amp) > 0) { - Spi.DAC_B += 2 ; + Spi.DAC_B += 1 ; Znak_Amp = 1; } else { - Spi.DAC_B -= 2; + Spi.DAC_B -= 1; Znak_Amp = -1; } Cur_Amp=ADD_AMP; Count_AMP=0; ADD_AMP=0; - - }