Skip to content

Commit

Permalink
Merge branch 'ToxicMushroom-fix-filter-setters'
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Apr 23, 2022
2 parents b6ddede + 579d200 commit fd0ed80
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ internal sealed class GatewayPayload {
get() = _frequency
set(value) {
require(value > 0) { "Frequency must be greater than 0" }
_frequency = value
}

override var depth: Float
Expand All @@ -232,7 +233,8 @@ internal sealed class GatewayPayload {
override var frequency: Float
get() = _frequency
set(value) {
require(value > 0) { "Frequency must be greater than 0" }
require(value > 0 && value <= 14) { "Frequency must be between 0 and 14" }
_frequency = value
}

override var depth: Float
Expand Down

0 comments on commit fd0ed80

Please sign in to comment.