lib/fit4ruby/FitDataRecord.rb in fit4ruby-1.6.1 vs lib/fit4ruby/FitDataRecord.rb in fit4ruby-1.6.2

- old
+ new

@@ -129,11 +129,11 @@ header.write(io) # Create a BinData::Struct object to store the data record. fields = [] global_fit_message.fields_by_number.each do |field_number, field| - bin_data_type = FitDefinitionField.fit_type_to_bin_data(field.type) + bin_data_type = FitDefinitionFieldBase.fit_type_to_bin_data(field.type) fields << [ bin_data_type, field.name ] end bd = BinData::Struct.new(:endian => :little, :fields => fields) # Fill the BinData::Struct object with the values from the corresponding @@ -144,10 +144,10 @@ !(iv_value = instance_variable_get(iv)).nil? value = field.native_to_fit(iv_value) else # If we don't have a corresponding variable or the variable is nil # we write the 'undefined' value instead. - value = FitDefinitionField.undefined_value(field.type) + value = FitDefinitionFieldBase.undefined_value(field.type) end bd[field.name] = value end # Write the data record to the file.