![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
Diff: Global.c
- Revision:
- 188:4c523cc373cc
- Parent:
- 183:7e200f4d9b16
- Child:
- 189:8a16378724c4
--- a/Global.c Mon Aug 01 14:03:08 2016 +0000 +++ b/Global.c Fri Aug 19 14:02:02 2016 +0000 @@ -141,14 +141,28 @@ Gyro.SOC_Out=0xDD; - Gyro.Firmware_Version =0x11; //версия программы + Gyro.Firmware_Version = 0x11; //версия программы Gyro.GLD_Serial = 0xD7; //серийный номер Gyro.My_Addres = 0; //адрес глд - Gyro.Discharg = StartDischarg; - Gyro.BackLight = StartBackLight; - - + switch(Gyro.My_Addres){//смещение поджига и подсветки в зависимости от адреса ГЛД + case 0: + Gyro.Discharg = StartDischarg << ShiftStart0; + Gyro.BackLight = StartBackLight << ShiftStart0; + break; + case 1: + Gyro.Discharg = StartDischarg << ShiftStart1; + Gyro.BackLight = StartBackLight << ShiftStart1; + break; + case 2: + Gyro.Discharg = StartDischarg << ShiftStart2; + Gyro.BackLight = StartBackLight << ShiftStart2; + break; + case 3: + Gyro.Discharg = StartDischarg << ShiftStart3; + Gyro.BackLight = StartBackLight << ShiftStart3; + break; +} ///////////////////////////////////////////////////// //////инициализация цап_LPC (р0.26 цап выход)//////// @@ -160,11 +174,11 @@ ///////////////////////////////////////////////////// // Spi.DAC_A = 20000; - Spi.DAC_A = 0x7fff; + Spi.DAC_A = 38000; //Spi.DAC_A = 44000; //Spi.DAC_B = 0x7fff; //старое начало - Spi.DAC_B = 39200; //40000 + Spi.DAC_B = 38000; //40000 //Spi.DAC_B = 11000; //для просмотра мод Gyro.StrayHZ = 1000;