Skip to content

Commit

Permalink
use better helper method for locked out condition
Browse files Browse the repository at this point in the history
rubocop's suggestion was poor
  • Loading branch information
ccutrer committed Dec 28, 2024
1 parent 8d4ac3c commit 1054832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/aurora/abc_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def refresh
end
@outdoor_temperature = registers[31_003]
@air_coil_temperature = registers[20]
@locked_out = !registers[25].nobits?(0x8000)
@locked_out = registers[25].anybits?(0x8000)
@current_fault = registers[25] & 0x7fff
@derated = (41..46).cover?(@current_fault)
@safe_mode = [47, 48, 49, 72, 74].include?(@current_fault)
Expand Down

0 comments on commit 1054832

Please sign in to comment.