mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-12 16:50:15 +00:00
add library support for logarithms and exponents (!) to support
vt1211 / vt8235 thermistor calculations. Add such calculations to
vt1211/vt8235 section in sensors.conf; bump library version to 1.4.0.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1667 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
42043728ee
commit
1d0d09cc26
6 files changed
+58
-7
No files matched your search
@@ -102,6 +102,7 @@ static sensors_chip *current_chip = NULL;
|
||||
%left <nothing> '-' '+'
|
||||
%left <nothing> '*' '/'
|
||||
%left <nothing> NEG
|
||||
%right <nothing> '^' '`'
|
||||
|
||||
%token <nothing> ','
|
||||
%token <nothing> EOL
|
||||
@@ -272,6 +273,20 @@ expression: FLOAT
|
||||
}
|
||||
| '(' expression ')'
|
||||
{ $$ = $2; }
|
||||
| '^' expression
|
||||
{ $$ = malloc_expr();
|
||||
$$->kind = sensors_kind_sub;
|
||||
$$->data.subexpr.op = sensors_exp;
|
||||
$$->data.subexpr.sub1 = $2;
|
||||
$$->data.subexpr.sub2 = NULL;
|
||||
}
|
||||
| '`' expression
|
||||
{ $$ = malloc_expr();
|
||||
$$->kind = sensors_kind_sub;
|
||||
$$->data.subexpr.op = sensors_log;
|
||||
$$->data.subexpr.sub1 = $2;
|
||||
$$->data.subexpr.sub2 = NULL;
|
||||
}
|
||||
;
|
||||
|
||||
i2cbus_name: NAME
|
||||
|
||||
Reference in new issue
Block a user