tl++ works now, unchecked dma or whatever

This commit is contained in:
2025-10-13 15:15:52 -05:00
parent 9c5d61ba34
commit c1a91827ae
34 changed files with 9040 additions and 525 deletions

View File

@@ -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;