159 line = xstrcat(line, buf); |
159 line = xstrcat(line, buf); |
160 line = xstrcat(line, (char *)","); |
160 line = xstrcat(line, (char *)","); |
161 snprintf(buf, 64, "%.5f", 1 + (ispindel->gravity / (258.6 - ((ispindel->gravity / 258.2) * 227.1)))); |
161 snprintf(buf, 64, "%.5f", 1 + (ispindel->gravity / (258.6 - ((ispindel->gravity / 258.2) * 227.1)))); |
162 line = xstrcat(line, buf); |
162 line = xstrcat(line, buf); |
163 line = xstrcat(line, (char *)","); |
163 line = xstrcat(line, (char *)","); |
164 snprintf(buf, 64, "%.5f", ispindel->battery); |
164 snprintf(buf, 64, "%.6f", ispindel->battery); |
165 line = xstrcat(line, buf); |
165 line = xstrcat(line, buf); |
166 line = xstrcat(line, (char *)","); |
166 line = xstrcat(line, (char *)","); |
167 snprintf(buf, 64, "%.5f", ispindel->angle); |
167 snprintf(buf, 64, "%.5f", ispindel->angle); |
168 line = xstrcat(line, buf); |
168 line = xstrcat(line, buf); |
169 line = xstrcat(line, (char *)","); |
169 line = xstrcat(line, (char *)","); |
227 printf("uuid %s\n", ispindel->uuid); |
227 printf("uuid %s\n", ispindel->uuid); |
228 printf("online %s\n", ispindel->online ? "yes":"no"); |
228 printf("online %s\n", ispindel->online ? "yes":"no"); |
229 printf("mode %s\n", ispindel->mode); |
229 printf("mode %s\n", ispindel->mode); |
230 printf("product %s / %s\n", ispindel->beercode, ispindel->beername); |
230 printf("product %s / %s\n", ispindel->beercode, ispindel->beername); |
231 printf("tilt %.5f\n", ispindel->angle); |
231 printf("tilt %.5f\n", ispindel->angle); |
232 printf("temperature %.5f\n", ispindel->temperature); |
232 printf("temperature %.4f\n", ispindel->temperature); |
233 printf("battery %.5f\n", ispindel->battery); |
233 printf("battery %.6f\n", ispindel->battery); |
234 printf("gravity %.5f\n", ispindel->gravity); |
234 printf("gravity %.5f\n", ispindel->gravity); |
235 printf("interval %d\n", ispindel->interval); |
235 printf("interval %d\n", ispindel->interval); |
236 } |
236 } |
237 } |
237 } |
238 |
238 |