<commit_before>/*
 * Copyright (C) 2015 <NAME>
 * http://www.christianbenjaminries.de
 * https://github.com/cbries
 */

#include "Engine.h"
#include "CarLamps.h"
#include "ThirdParty.h"

const uint8_t PinEngine = 5;
const uint8_t PinFront = 6;
const uint8_t PinBack = 9;
const uint8_t PinTurnLeft = 8;
const uint8_t PinTurnRight = 7; 

Engine engine(PinEngine, 3.3);
CarLamps frontLights(PinFront);
CarLamps backLights(PinBack);
CarTurnLights turnLights(PinTurnLeft, PinTurnRight);

void setup() 
{
  frontLights.Switch(true);
  backLights.Switch(true);
}

unsigned long WallTime = 0;
int TurnLightsIndex = 0;
int TurnLightsIndexMax = 4;

void loop() 
{
  engine.Tick();
  frontLights.Tick();
  backLights.Tick();
  turnLights.Tick();

  if(WallTime < millis())
  {    
    switch(TurnLightsIndex)
    {
      case 0: 
        engine.ChangeSpeedTo(0);
        turnLights.Start(CarTurnLights::None); 
      break;
      
      case 1: 
        engine.ChangeSpeedTo(90, 15);
        turnLights.Start(CarTurnLights::Left); 
      break;
      
      case 2: 
        engine.ChangeSpeedTo(100);
        turnLights.Start(CarTurnLights::Right); 
      break;
      
      case 3: 
        engine.ChangeSpeedTo(75);
        turnLights.Start(CarTurnLights::LeftRight);
      break;
    }
    
    WallTime = millis() + 5000;
    
    TurnLightsIndex++;
    if(TurnLightsIndex >= TurnLightsIndexMax)
      TurnLightsIndex = 0;
  }


}


<commit_msg>default MaxVoltage<commit_after>/*
 * Copyright (C) 2015 <NAME>
 * http://www.christianbenjaminries.de
 * https://github.com/cbries
 */

#include "Engine.h"
#include "CarLamps.h"
#include "ThirdParty.h"

const uint8_t PinEngine = 5;
const uint8_t PinFront = 6;
const uint8_t PinBack = 9;
const uint8_t PinTurnLeft = 8;
const uint8_t PinTurnRight = 7; 

Engine engine(PinEngine, MaxVoltage);
CarLamps frontLights(PinFront);
CarLamps backLights(PinBack);
CarTurnLights turnLights(PinTurnLeft, PinTurnRight);

void setup() 
{
  frontLights.Switch(true);
  backLights.Switch(true);
}

unsigned long WallTime = 0;
int TurnLightsIndex = 0;
int TurnLightsIndexMax = 4;

void loop() 
{
  engine.Tick();
  frontLights.Tick();
  backLights.Tick();
  turnLights.Tick();

  if(WallTime < millis())
  {    
    switch(TurnLightsIndex)
    {
      case 0: 
        engine.ChangeSpeedTo(100);
        turnLights.Start(CarTurnLights::None); 
      break;
      
      case 1: 
        engine.ChangeSpeedTo(100, 15);
        turnLights.Start(CarTurnLights::Left); 
      break;
      
      case 2: 
        engine.ChangeSpeedTo(100);
        turnLights.Start(CarTurnLights::Right); 
      break;
      
      case 3: 
        engine.ChangeSpeedTo(100);
        turnLights.Start(CarTurnLights::LeftRight);
      break;
    }
    
    WallTime = millis() + 10000;
    
    TurnLightsIndex++;
    if(TurnLightsIndex >= TurnLightsIndexMax)
      TurnLightsIndex = 0;
  }


}



{'fraction_non_alphanumeric': 0.11908871246116673, 'fraction_numerical': 0.027269589230238176, 'mean_word_length': 2.932157394843962, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6188355', 'n_tokens_mistral': 1106, 'n_tokens_neox': 1014, 'n_words': 191}