bmsd/ispindels.c

changeset 799
cf145b35d65f
parent 790
98bd22f6629b
child 843
29e7223e37ae
equal deleted inserted replaced
798:67e0384c0e63 799:cf145b35d65f
325 snprintf(buf, 64, "%d", ispindel->interval); 325 snprintf(buf, 64, "%d", ispindel->interval);
326 line = xstrcat(line, buf); 326 line = xstrcat(line, buf);
327 line = xstrcat(line, (char *)","); 327 line = xstrcat(line, (char *)",");
328 line = xstrcat(line, ispindel->uuid); 328 line = xstrcat(line, ispindel->uuid);
329 329
330 snprintf(query, 511, "INSERT INTO log_ispindel SET code='%s', datetime='%s', " \ 330 snprintf(query, 511, "INSERT IGNORE INTO log_ispindel SET code='%s', datetime='%s', " \
331 "temperature='%.4f', plato='%.5f', sg='%.5f', battery='%.6f', " \ 331 "temperature='%.4f', plato='%.5f', sg='%.5f', battery='%.6f', " \
332 "angle='%.5f', refresh='%d', uuid='%s'", 332 "angle='%.5f', refresh='%d', uuid='%s'",
333 ispindel->beercode, datetime, ispindel->temperature, ispindel->gravity, 333 ispindel->beercode, datetime, ispindel->temperature, ispindel->gravity,
334 1.00001 + (0.0038661 * ispindel->gravity) + (1.3488e-5 * ispindel->gravity * ispindel->gravity) + 334 1.00001 + (0.0038661 * ispindel->gravity) + (1.3488e-5 * ispindel->gravity * ispindel->gravity) +
335 (4.3074e-8 * ispindel->gravity * ispindel->gravity * ispindel->gravity), 335 (4.3074e-8 * ispindel->gravity * ispindel->gravity * ispindel->gravity),

mercurial