Lines Matching defs:sti

90 get_sensor_values(struct sensors_temp_info *sti)
94 switch(sti->mode) {
96 sf = sensors_get_subfeature(sti->chip, sti->feature,
99 sti->current = get_value(sti->chip, sf);
102 sf = sensors_get_subfeature(sti->chip, sti->feature,
107 sti->current = get_value(sti->chip, sf) * 1000;
111 sf = sensors_get_subfeature(sti->chip, sti->feature,
114 sti->current = get_value(sti->chip, sf);
117 sf = sensors_get_subfeature(sti->chip, sti->feature,
120 sti->critical = get_value(sti->chip, sf);
123 sf = sensors_get_subfeature(sti->chip, sti->feature,
128 sti->current = get_value(sti->chip, sf) * 1000;
133 sf = sensors_get_subfeature(sti->chip, sti->feature,
136 sti->min = get_value(sti->chip, sf);
138 sf = sensors_get_subfeature(sti->chip, sti->feature,
141 sti->max = get_value(sti->chip, sf);
147 list_for_each_entry(struct sensors_temp_info, sti, &gsensors_temp_list, list) {
148 if (sti->mode != mode)
150 if (strcasecmp(sti->name, n) == 0)
151 return sti;
159 struct sensors_temp_info *sti = gr->query_data;
162 if (sti->last_time) {
163 if (sti->last_time + gr->pane->period <= now) {
164 get_sensor_values(sti);
166 switch (sti->mode) {
168 hud_graph_add_value(gr, (uint64_t) sti->current);
171 hud_graph_add_value(gr, (uint64_t) sti->critical);
174 hud_graph_add_value(gr, (uint64_t)(sti->current * 1000));
177 hud_graph_add_value(gr, (uint64_t) sti->current);
180 hud_graph_add_value(gr, (uint64_t) sti->current);
184 sti->last_time = now;
189 get_sensor_values(sti);
190 sti->last_time = now;
205 struct sensors_temp_info *sti;
211 sti = find_sti_by_name(dev_name, mode);
212 if (!sti)
220 sti->chipname,
221 sti->featurename,
222 sti->mode == SENSORS_VOLTAGE_CURRENT ? "Volts" :
223 sti->mode == SENSORS_CURRENT_CURRENT ? "Amps" :
224 sti->mode == SENSORS_TEMP_CURRENT ? "Curr" :
225 sti->mode == SENSORS_POWER_CURRENT ? "Pow" :
226 sti->mode == SENSORS_TEMP_CRITICAL ? "Crit" : "Unkn");
228 gr->query_data = sti;
232 switch (sti->mode) {
254 struct sensors_temp_info *sti = CALLOC_STRUCT(sensors_temp_info);
256 sti->mode = mode;
257 sti->chip = (sensors_chip_name *) chip;
258 sti->feature = feature;
259 strcpy(sti->chipname, chipname);
260 strcpy(sti->featurename, featurename);
261 snprintf(sti->name, sizeof(sti->name), "%s.%s", sti->chipname,
262 sti->featurename);
264 list_addtail(&sti->list, &gsensors_temp_list);
347 list_for_each_entry(struct sensors_temp_info, sti, &gsensors_temp_list, list) {
349 switch (sti->mode) {
351 snprintf(line, sizeof(line), " sensors_temp_cu-%s", sti->name);
354 snprintf(line, sizeof(line), " sensors_temp_cr-%s", sti->name);
357 snprintf(line, sizeof(line), " sensors_volt_cu-%s", sti->name);
360 snprintf(line, sizeof(line), " sensors_curr_cu-%s", sti->name);
363 snprintf(line, sizeof(line), " sensors_pow_cu-%s", sti->name);