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), |