Rev 4 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 31 | ||
---|---|---|---|
Line 68... | Line 68... | ||
68 | if (version.compare(0,60)==version.VERSION_PREVIOUS) |
68 | if (version.compare(0,60)==version.VERSION_PREVIOUS) |
69 | { |
69 | { |
70 | for (i=0;i<32;i++) |
70 | for (i=0;i<32;i++) |
71 | { |
71 | { |
72 | analog[i]=(int)((in_arr[1+i*2]<<8) | in_arr[2+i*2]); |
72 | analog[i]=(int)((in_arr[1+i*2]<<8) | in_arr[2+i*2]); |
73 | if ((analog[i]&(2<<14))!=0) |
73 | if ((analog[i]&(1<<15))!=0) |
74 | analog[i]=-(analog[i]&(0xFFFF-1))^(0xFFFF-1); |
74 | analog[i]=-(analog[i]&(0xFFFF-1))^(0xFFFF-1); |
75 | } |
75 | } |
76 | } |
76 | } |
77 | else |
77 | else |
78 | { |
78 | { |
79 | for (i=0;i<16;i++) |
79 | for (i=0;i<16;i++) |
80 | { |
80 | { |
81 | analog[i]=(int)((in_arr[17+i*2]<<8) | in_arr[18+i*2]); |
81 | analog[i]=(int)((in_arr[17+i*2]<<8) | in_arr[18+i*2]); |
82 | if ((analog[i]&(2<<14))!=0) |
82 | if ((analog[i]&(1<<15))!=0) |
83 | analog[i]=-(analog[i]&(0xFFFF-1))^(0xFFFF-1); |
83 | analog[i]=-(analog[i]&(0xFFFF-1))^(0xFFFF-1); |
84 | } |
84 | } |
85 | } |
85 | } |
Line 86... | Line 86... | ||
86 | 86 |