Lines 65-71
Link Here
|
65 |
rightFan->readConfig(); |
65 |
rightFan->readConfig(); |
66 |
} |
66 |
} |
67 |
|
67 |
|
68 |
if ( (acpiAvail=(AcpiAvailable()==0)) ) |
68 |
if (ibmAcpiAvail=(IbmAcpiAvailable()==0)) |
|
|
69 |
{ |
70 |
cpuTempAcpiIbm= new Sensor(this); |
71 |
cpuTempAcpiIbm->setType(Sensor::lmTemp); |
72 |
cpuTempAcpiIbm->setName("cputemp"); |
73 |
cpuTempAcpiIbm->setDescription("CPU Temp"); |
74 |
cpuTempAcpiIbm->setValueMax (80 , Sensor::dgCelsius); |
75 |
cpuTempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius); |
76 |
cpuTempAcpiIbm->setValueIdeal(30 , Sensor::dgCelsius); |
77 |
cpuTempAcpiIbm->setValue ( 0 , Sensor::dgCelsius); |
78 |
cpuTempAcpiIbm->readConfig(); |
79 |
|
80 |
pciTempAcpiIbm= new Sensor(this); |
81 |
pciTempAcpiIbm->setType(Sensor::lmTemp); |
82 |
pciTempAcpiIbm->setName("pictmp"); |
83 |
pciTempAcpiIbm->setDescription("Mini PCI Temp"); |
84 |
pciTempAcpiIbm->setValueMax (55 , Sensor::dgCelsius); |
85 |
pciTempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius); |
86 |
pciTempAcpiIbm->setValueIdeal(25 , Sensor::dgCelsius); |
87 |
pciTempAcpiIbm->setValue ( 0 , Sensor::dgCelsius); |
88 |
pciTempAcpiIbm->readConfig(); |
89 |
|
90 |
hddTempAcpiIbm= new Sensor(this); |
91 |
hddTempAcpiIbm->setType(Sensor::lmTemp); |
92 |
hddTempAcpiIbm->setName("hddtmp"); |
93 |
hddTempAcpiIbm->setDescription("HDD Temp"); |
94 |
hddTempAcpiIbm->setValueMax (40 , Sensor::dgCelsius); |
95 |
hddTempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius); |
96 |
hddTempAcpiIbm->setValueIdeal(20 , Sensor::dgCelsius); |
97 |
hddTempAcpiIbm->setValue ( 0 , Sensor::dgCelsius); |
98 |
hddTempAcpiIbm->readConfig(); |
99 |
|
100 |
gpuTempAcpiIbm= new Sensor(this); |
101 |
gpuTempAcpiIbm->setType(Sensor::lmTemp); |
102 |
gpuTempAcpiIbm->setName("gputmp"); |
103 |
gpuTempAcpiIbm->setDescription("GPU Temp"); |
104 |
gpuTempAcpiIbm->setValueMax (60 , Sensor::dgCelsius); |
105 |
gpuTempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius); |
106 |
gpuTempAcpiIbm->setValueIdeal(25 , Sensor::dgCelsius); |
107 |
gpuTempAcpiIbm->setValue ( 0 , Sensor::dgCelsius); |
108 |
gpuTempAcpiIbm->readConfig(); |
109 |
|
110 |
bat0TempAcpiIbm= new Sensor(this); |
111 |
bat0TempAcpiIbm->setType(Sensor::lmTemp); |
112 |
bat0TempAcpiIbm->setName("bat0tmp"); |
113 |
bat0TempAcpiIbm->setDescription("BAT0 Temp"); |
114 |
bat0TempAcpiIbm->setValueMax (40 , Sensor::dgCelsius); |
115 |
bat0TempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius); |
116 |
bat0TempAcpiIbm->setValueIdeal(30 , Sensor::dgCelsius); |
117 |
bat0TempAcpiIbm->setValue ( 0 , Sensor::dgCelsius); |
118 |
bat0TempAcpiIbm->readConfig(); |
119 |
|
120 |
bat1TempAcpiIbm= new Sensor(this); |
121 |
bat1TempAcpiIbm->setType(Sensor::lmTemp); |
122 |
bat1TempAcpiIbm->setName("bat1tmp"); |
123 |
bat1TempAcpiIbm->setDescription("BAT1 Temp"); |
124 |
bat1TempAcpiIbm->setValueMax (40 , Sensor::dgCelsius); |
125 |
bat1TempAcpiIbm->setValueMin ( 0 , Sensor::dgCelsius); |
126 |
bat1TempAcpiIbm->setValueIdeal(30 , Sensor::dgCelsius); |
127 |
bat1TempAcpiIbm->setValue ( 0 , Sensor::dgCelsius); |
128 |
bat1TempAcpiIbm->readConfig(); |
129 |
} |
130 |
|
131 |
if ( (!ibmAcpiAvail) && (acpiAvail=(AcpiAvailable()==0)) ) |
69 |
{ |
132 |
{ |
70 |
cpuTempAcpi= new Sensor(this); |
133 |
cpuTempAcpi= new Sensor(this); |
71 |
cpuTempAcpi->setType(Sensor::lmTemp); |
134 |
cpuTempAcpi->setType(Sensor::lmTemp); |
Lines 77-111
Link Here
|
77 |
cpuTempAcpi->setValue (30 , Sensor::dgCelsius); |
140 |
cpuTempAcpi->setValue (30 , Sensor::dgCelsius); |
78 |
cpuTempAcpi->readConfig(); |
141 |
cpuTempAcpi->readConfig(); |
79 |
} |
142 |
} |
80 |
|
|
|
81 |
updateSensors(); |
143 |
updateSensors(); |
82 |
} |
144 |
} |
83 |
|
145 |
|
84 |
I8KSensorsList::~I8KSensorsList(){ |
146 |
I8KSensorsList::~I8KSensorsList(){ |
85 |
} |
147 |
} |
86 |
|
148 |
|
87 |
|
|
|
88 |
void I8KSensorsList::updateSensors() |
149 |
void I8KSensorsList::updateSensors() |
89 |
{ |
150 |
{ |
90 |
double t,f1,f2; |
151 |
double t,f1,f2, ct,pt,ht,gt,bt0,na0,bt1,na1; |
91 |
|
152 |
|
92 |
if(i8kAvail && !getI8KInfo(&t,&f1,&f2)) { |
153 |
if(i8kAvail && !getI8KInfo(&t,&f1,&f2)) { |
93 |
cpuTemp->setValue(t,Sensor::dgCelsius); |
154 |
cpuTemp->setValue(t,Sensor::dgCelsius); |
94 |
leftFan->setValue(f1); |
155 |
leftFan->setValue(f1); |
95 |
rightFan->setValue(f2); |
156 |
rightFan->setValue(f2); |
96 |
} |
157 |
} |
97 |
if(acpiAvail && !getAcpiTemperature(&t)) { |
158 |
|
|
|
159 |
if(ibmAcpiAvail && !getIbmAcpiTemperature(&ct,&pt,&ht,>,&bt0,&na0,&bt1,&na1)) { |
160 |
cpuTempAcpiIbm->setValue(ct,Sensor::dgCelsius); |
161 |
pciTempAcpiIbm->setValue(pt,Sensor::dgCelsius); |
162 |
hddTempAcpiIbm->setValue(ht,Sensor::dgCelsius); |
163 |
gpuTempAcpiIbm->setValue(gt,Sensor::dgCelsius); |
164 |
bat0TempAcpiIbm->setValue(bt0,Sensor::dgCelsius); |
165 |
bat1TempAcpiIbm->setValue(bt1,Sensor::dgCelsius); |
166 |
} |
167 |
|
168 |
if(!ibmAcpiAvail && acpiAvail && !getAcpiTemperature(&t)) { |
98 |
cpuTempAcpi->setValue(t,Sensor::dgCelsius); |
169 |
cpuTempAcpi->setValue(t,Sensor::dgCelsius); |
99 |
} |
170 |
} |
100 |
} |
|
|
101 |
|
171 |
|
|
|
172 |
} |
102 |
|
173 |
|
103 |
int I8KSensorsList::AcpiAvailable() |
174 |
int I8KSensorsList::AcpiAvailable() |
104 |
{ |
175 |
{ |
105 |
double t; |
176 |
double t; |
|
|
177 |
|
106 |
return getAcpiTemperature(&t); |
178 |
return getAcpiTemperature(&t); |
107 |
} |
179 |
} |
108 |
|
180 |
|
|
|
181 |
int I8KSensorsList::IbmAcpiAvailable() |
182 |
{ |
183 |
double t0,t1,t2,t3,t4,t5,t6,t7; |
184 |
|
185 |
return getIbmAcpiTemperature(&t0,&t1,&t2,&t3,&t4,&t5,&t6,&t7); |
186 |
} |
187 |
|
109 |
int I8KSensorsList::I8KOnlyAvailable() |
188 |
int I8KSensorsList::I8KOnlyAvailable() |
110 |
{ |
189 |
{ |
111 |
double d1,d2,d3; |
190 |
double d1,d2,d3; |
Lines 122-128
Link Here
|
122 |
case -3: qWarning("I18K Warning: Only format version 1.0 is supported. Inform the author."); break; |
201 |
case -3: qWarning("I18K Warning: Only format version 1.0 is supported. Inform the author."); break; |
123 |
} |
202 |
} |
124 |
|
203 |
|
125 |
return (result==0 || AcpiAvailable()==0); |
204 |
return (result==0 || AcpiAvailable()==0 || IbmAcpiAvailable()==0); |
126 |
} |
205 |
} |
127 |
|
206 |
|
128 |
|
207 |
|