Skip to content

Commit 2f2cc55

Browse files
committed
Replace deprecated Irradiance constants.
1 parent 995a24a commit 2f2cc55

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/models/pv_query.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ def column_heights
9292
# [[jan1, jan2...], [feb1, feb2...]...]
9393
data_by_month = []
9494

95-
Irradiance::ANNUAL_INCREMENT.times do
96-
data_by_month << output_pa_array.shift(Irradiance::DAILY_INCREMENT)
95+
Irradiance::GRADATIONS_PA.times do
96+
data_by_month << output_pa_array.shift(Irradiance::USABLE_DATAPOINTS_PER_DAY)
9797
end
9898

9999
# Duplicate and append jan data so that dec-jan volume can be easily calculated.
@@ -102,8 +102,8 @@ def column_heights
102102
# [[a, b, f, g], [b, c, g, h]...]
103103
columns = []
104104

105-
Irradiance::ANNUAL_INCREMENT.times do |month|
106-
(Irradiance::DAILY_INCREMENT - 1).times do |time|
105+
Irradiance::GRADATIONS_PA.times do |month|
106+
(Irradiance::USABLE_DATAPOINTS_PER_DAY - 1).times do |time|
107107
column_data = [data_by_month[month][time].to_f,
108108
data_by_month[month][time + 1].to_f,
109109
data_by_month[month + 1][time].to_f,

0 commit comments

Comments
 (0)