lib/rubyfit/helpers.rb
# Generates strings of hex bytes (for debugging)
Generates strings of hex bytes (for debugging)
Generates strings of hex bytes ( for debugging )
def bytes2hex(bytes)
    bytes
      .map{|b| "0x#{b.to_s(16).ljust(2, "0")}"}
      .each_slice(8)
      .map{ |s| s.join(", ") }
  end
def bytes2hex ( bytes ) bytes . map { | b | "0x#{b.to_s(16).ljust(2, "0")}" } . each_slice ( 8 ) . map { | s | s . join ( ", " ) } end
Generates strings of hex bytes (for debugging)
Generates strings of hex bytes ( for debugging )
bytes