Class: LiveF1::Packet::Car::Number

Inherits:
LiveF1::Packet::Car show all
Includes:
Decryptable, Type::Short
Defined in:
lib/live_f1/packet/car/number.rb

Instance Attribute Summary

Attributes included from Decryptable

#raw_data

Attributes inherited from LiveF1::Packet

#data, #header, #source

Instance Method Summary collapse

Methods included from Decryptable

#bytes, #data=

Methods included from Type::Short

#length, #spare_bits

Methods inherited from LiveF1::Packet::Car

#leader

Methods inherited from LiveF1::Packet

from_source, #initialize, #inspect, #leader, #spare_bits, #spare_data

Constructor Details

This class inherits a constructor from LiveF1::Packet

Instance Method Details

#to_sObject



8
9
10
# File 'lib/live_f1/packet/car/number.rb', line 8

def to_s
  "%02d" % data.to_i unless data == ""
end