343 snprintf(query, 511, "INSERT IGNORE INTO log_ispindel SET code='%s', datetime='%s', " \ |
343 snprintf(query, 511, "INSERT IGNORE INTO log_ispindel SET code='%s', datetime='%s', " \ |
344 "temperature='%.4f', plato='%.5f', sg='%.5f', battery='%.6f', " \ |
344 "temperature='%.4f', plato='%.5f', sg='%.5f', battery='%.6f', " \ |
345 "angle='%.5f', refresh='%d', uuid='%s'", |
345 "angle='%.5f', refresh='%d', uuid='%s'", |
346 ispindel->beercode, datetime, ispindel->temperature, ispindel->gravity, plato_to_sg(ispindel->gravity), |
346 ispindel->beercode, datetime, ispindel->temperature, ispindel->gravity, plato_to_sg(ispindel->gravity), |
347 ispindel->battery, ispindel->angle, ispindel->interval, ispindel->uuid); |
347 ispindel->battery, ispindel->angle, ispindel->interval, ispindel->uuid); |
348 syslog(LOG_NOTICE, "%s", query); |
348 //syslog(LOG_NOTICE, "%s", query); |
349 bms_mysql_query(query); |
349 bms_mysql_query(query); |
350 |
350 |
351 free(datetime); |
351 free(datetime); |
352 datetime = NULL; |
352 datetime = NULL; |
353 } |
353 } |