Files
Rennbahn/ampel.cpp

26 lines
366 B
C++

#include "ampel.h"
#include <unistd.h>
Ampel::Ampel()
{
this->running = 1;
}
void Ampel::setStop(){
this->running = 0;
}
void Ampel::run(){
int anzahl = 0;
while(this->running){
anzahl++;
if(anzahl < 6){
usleep(800000);
}
else{
usleep(1400000);
}
emit ampelUpdate();
}
}