299 for (unit = Config.units; unit; unit = unit->next) { |
299 for (unit = Config.units; unit; unit = unit->next) { |
300 if (strcmp(uuid, unit->uuid) == 0) { |
300 if (strcmp(uuid, unit->uuid) == 0) { |
301 |
301 |
302 if (strcmp(opt, (char *)"AIR") == 0) { |
302 if (strcmp(opt, (char *)"AIR") == 0) { |
303 if (unit->air_state == 0) |
303 if (unit->air_state == 0) |
304 srv_send((char *)"215 AIR,%.3f", unit->air_temperature); |
304 srv_send((char *)"215 AIR,%.3f", unit->air_temperature / 1000.0); |
305 else |
305 else |
306 srv_send((char *)"215 AIR,NA"); |
306 srv_send((char *)"215 AIR,NA"); |
307 return 0; |
307 return 0; |
308 } else if (strcmp(opt, (char *)"BEER") == 0) { |
308 } else if (strcmp(opt, (char *)"BEER") == 0) { |
309 if (unit->beer_state == 0) |
309 if (unit->beer_state == 0) |
310 srv_send((char *)"215 BEER,%.3f", unit->beer_temperature); |
310 srv_send((char *)"215 BEER,%.3f", unit->beer_temperature / 1000.0); |
311 else |
311 else |
312 srv_send((char *)"215 BEER,NA"); |
312 srv_send((char *)"215 BEER,NA"); |
313 return 0; |
313 return 0; |
314 } else if (strcmp(opt, (char *)"TARGET") == 0) { |
314 } else if (strcmp(opt, (char *)"TARGET") == 0) { |
315 if (unit->mode == UNITMODE_BEER) { |
315 if (unit->mode == UNITMODE_BEER) { |