Skip to content

Commit

Permalink
fix: gaptime, color 구하는 방식 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
belljun3395 committed Jul 28, 2024
1 parent e7faadd commit a030aaf
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,18 @@ class PredictTargetTraffic(
while (gapTime > 0) {
if (color.isRed) {
color = GREEN
gapTime -= greenCycle!!
gapTime -= redCycle!!
} else {
color = RED
gapTime -= redCycle!!
gapTime -= greenCycle!!
}
}
log.info("Predicted Gap Time: $gapTime")
currentColor = color
currentColor = if (color.isRed) {
RED
} else {
GREEN
}
currentTimeLeft = abs(gapTime)
log.info("Predicted Color: $currentColor, Predicted Time Left: $currentTimeLeft")

Expand Down

0 comments on commit a030aaf

Please sign in to comment.