Permalink
Browse files

Removed puts statments and corrected max_demand precision

  • Loading branch information...
1 parent 944e81c commit 76acdbe986d3d9ed407107049280e65effd08c11 @jwtd committed Apr 3, 2014
Showing with 5 additions and 6 deletions.
  1. +4 −5 lib/ekm-omnimeter/meter.rb
  2. +1 −1 lib/ekm-omnimeter/version.rb
View
9 lib/ekm-omnimeter/meter.rb
@@ -160,7 +160,6 @@ def respond_to?(method_sym, include_private = false)
# Returns the correct measurement for voltage, current, and power based on the corresponding power_configuration
def calculate_measurement(m1, m2, m3)
- puts "****** #{power_configuration.inspect} #{m1}, #{m2}, #{m3}"
if power_configuration == :single_phase_2wire
m1
elsif power_configuration == :single_phase_3wire
@@ -194,7 +193,6 @@ def cast_response_to_correct_types(d)
:watts_l2,
:watts_l3,
:watts_total,
- :maximum_demand,
:ct_ratio,
:pulse_1_count,
:pulse_1_ratio,
@@ -218,7 +216,8 @@ def cast_response_to_correct_types(d)
:volts_l3,
:amps_l1,
:amps_l2,
- :amps_l3
+ :amps_l3,
+ :maximum_demand
].each do |k|
logger.debug "Casting #{k}"
d[k] = to_f_with_decimal_places(d[k], 1) if d.has_key?(k)
@@ -276,7 +275,7 @@ def request_a
response = get_remote_meter_data(request, read_bytes)
if response.nil?
- log.error "No response to request_a from meter #{address}"
+ logger.error "No response to request_a from meter #{meter_number}"
raise EkmOmnimeter, "No response from meter."
end
@@ -370,7 +369,7 @@ def request_b
logger.debug "Socket write #{request}" unless logger.nil?
response = get_remote_meter_data(request, read_bytes)
if response.nil?
- log.error "No response to request_a from meter #{address}"
+ logger.error "No response to request_a from meter #{meter_number}"
raise EkmOmnimeter, "No response from meter."
end
View
2 lib/ekm-omnimeter/version.rb
@@ -7,7 +7,7 @@ def self.version_string
module VERSION #:nodoc:
MAJOR = 0
MINOR = 2
- PATCH = 1
+ PATCH = 2
STRING = [MAJOR, MINOR, PATCH].join('.')
end

0 comments on commit 76acdbe

Please sign in to comment.