tl++ works now, unchecked dma or whatever
This commit is contained in:
@@ -100,21 +100,6 @@ int main(void)
|
||||
if (buttonPressedThisCycle)
|
||||
pedestrianThisCycle = true;
|
||||
|
||||
/*
|
||||
if (buttonPressedThisCycle)
|
||||
{
|
||||
currentState = TrafficState::YELLOW;
|
||||
stateStartTime = now;
|
||||
buttonPressedThisCycle = false;
|
||||
SetTrafficLights(currentState);
|
||||
}
|
||||
else
|
||||
{
|
||||
pedestrianNextCycle = false;
|
||||
SetTrafficLights(currentState);
|
||||
}
|
||||
*/
|
||||
|
||||
else if (elapsed >= DURATION_GREEN)
|
||||
{
|
||||
currentState = TrafficState::YELLOW;
|
||||
@@ -136,31 +121,6 @@ int main(void)
|
||||
}
|
||||
break;
|
||||
case TrafficState::RED:
|
||||
/*
|
||||
if (pedestrianNextCycle)
|
||||
{
|
||||
HAL_GPIO_WritePin(GPIOD,White_Pin,GPIO_PIN_SET); // turn on Pedestrian LED
|
||||
if (elapsed >= DURATION_RED_PED)
|
||||
{
|
||||
HAL_GPIO_WritePin(GPIOD,White_Pin,GPIO_PIN_RESET);
|
||||
pedestrianNextCycle = false;
|
||||
currentState = TrafficState::GREEN;
|
||||
stateStartTime = now;
|
||||
SetTrafficLights(currentState);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HAL_GPIO_WritePin(GPIOD,White_Pin,GPIO_PIN_RESET);
|
||||
if(elapsed >= DURATION_RED_PED)
|
||||
{
|
||||
currentState = TrafficState::GREEN;
|
||||
stateStartTime = now;
|
||||
SetTrafficLights(currentState);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (buttonPressedThisCycle)
|
||||
pedestrianNextCycle = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user