/* Places the sensor details in a text buffer for data logging purposes  */
size_t sensorsLogSensor(char *buffer, const size_t len, const sensor_t *sensor)
/* Places the sensor details in a text buffer for data logging purposes  */
size_t sensorsLogSensor(char *buffer, const size_t len, const sensor_t *sensor)
{
  size_t written;
  memset(buffer, 0x00, len);
  written = snprintf(buffer, len, "%d,%s,%d,%d,%f,%f,%f%s",
        (int)sensor->sensor_id,
        sensor->name,
        (int)sensor->type,
        (int)sensor->version,
        sensor->max_value,
        sensor->min_value,
        sensor->resolution,
        CFG_PRINTF_NEWLINE);
  return written;
}