Merge pull request #47 from einergehtnochrein/feature-meisei

Meisei: Fix iMS-100 main temperature
pull/49/head
rs1729 2022-07-25 23:42:28 +02:00 zatwierdzone przez GitHub
commit a9674a2840
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -946,7 +946,7 @@ int main(int argc, char **argv) {
if (f > 1.0f) {
// Use config coefficients to transform measured frequency to absolute resistance (kOhms)
f = 1.0f / (f - 1.0f);
float R = gpx.cfg[53] + gpx.cfg[54]*f + gpx.cfg[55]*f*f + gpx.cfg[56]*f*f*f;
float R = gpx.cfg[53] + gpx.cfg[54]*f + gpx.cfg[55]*f*f - gpx.cfg[56];
// iMS-100 sends known resistance (cfg[44:33]) for 12 temperature sampling points
// (cfg[28:17]). Actual temperature is found by interpolating in one of these
// 11 intervals.