<commit_before>#define WATER_THRESHOLD 800 // humidity
#define WATER_TANK_THRESHOLD 180.0 // min water in tank
#define WATER_TIME 15000L // 15s
#define WATER_MIN_INTERVAL 21600000L // 1/4 day // milliseconds = 10^-3s

bool water_do(unsigned int time)
{
  #ifdef DEBUG
    Serial.print("Watering...");
  #endif
  int succeeded = 1;
  if (last_distance > WATER_TANK_THRESHOLD)
  {
    succeeded = 0;
  }
  else
  {
    digitalWrite(RELAY_TRIG, HIGH);
    delay(time);
    digitalWrite(RELAY_TRIG, LOW);
  }
  #ifdef USE_WIRELESS
    #ifdef DEBUG
      Serial.print("Sending state: ");
    #endif
    sendValue(TYPE_Watered, succeeded);
  #endif
  #ifdef DEBUG
    Serial.println("done.");
  #endif
  return succeeded;
}<commit_msg>params<commit_after>#define WATER_THRESHOLD 650 // humidity
#define WATER_TANK_THRESHOLD 180.0 // min water in tank
#define WATER_TIME 5000L // 5s
#define WATER_MIN_INTERVAL 21600000L // 1/4 day // milliseconds = 10^-3s

bool water_do(unsigned int time)
{
  #ifdef DEBUG
    Serial.print("Watering...");
  #endif
  int succeeded = 1;
  if (last_distance > WATER_TANK_THRESHOLD)
  {
    succeeded = 0;
  }
  else
  {
    digitalWrite(RELAY_TRIG, HIGH);
    delay(time);
    digitalWrite(RELAY_TRIG, LOW);
  }
  #ifdef USE_WIRELESS
    #ifdef DEBUG
      Serial.print("Sending state: ");
    #endif
    sendValue(TYPE_Watered, succeeded);
  #endif
  #ifdef DEBUG
    Serial.println("done.");
  #endif
  return succeeded;
}
{'fraction_non_alphanumeric': 0.11594202898550725, 'fraction_numerical': 0.03864734299516908, 'mean_word_length': 3.354354354354354, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5409206', 'n_tokens_mistral': 585, 'n_tokens_neox': 526, 'n_words': 120}