Skip to content

Commit

Permalink
Fix brightness check
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Schrenk authored and oschrenk committed Oct 21, 2023
1 parent dd13c41 commit 9ce36f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Swift/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ extension Keyboard {
throw ValidationError("Idle Time needs to be 0 or larger.")
}

guard brightness ?? 0 > 1 else {
guard brightness ?? 1 <= 1 else {
throw ValidationError("Brightness too large. Needs to between (or at) 0 and 1.")
}

guard brightness ?? 0 < 0 else {
guard brightness ?? 0 >= 0 else {
throw ValidationError("Brightness too small. Needs to between (or at) 0 and 1.")
}
}
Expand Down

0 comments on commit 9ce36f7

Please sign in to comment.