Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/sensors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@ def self.initialize (config=nil)
def self.chips (match=nil)
Enumerator.new do |e|
number = FFI::MemoryPointer.new :int
match = Chip.new(match.to_s) if match
match = Chip.new(match.to_s).to_ffi if match

until (chip = C::sensors_get_detected_chips(match.to_ffi, number)).null?
until (chip = C::sensors_get_detected_chips(match, number)).null?
e << Chip.new(chip)
end
end
end

def self.version()
C::libsensors_version
end

end

Sensors.initialize