Class: LiveF1::Packet::Sys::Weather

Inherits:
LiveF1::Packet::Sys show all
Includes:
Decryptable, Metric, Type::Short
Defined in:
lib/live_f1/packet/sys/weather.rb

Defined Under Namespace

Modules: Metric

Constant Summary

Constants included from Metric

Metric::AIR_PRESSURE, Metric::AIR_TEMPERATURE, Metric::HUMIDITY, Metric::SESSION_CLOCK, Metric::TRACK_TEMPERATURE, Metric::WET_TRACK, Metric::WIND_DIRECTION, Metric::WIND_SPEED

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 included from Enum

#name_for

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

#metricObject



27
28
29
# File 'lib/live_f1/packet/sys/weather.rb', line 27

def metric
  header.data & 0b0111
end

#to_sObject



23
24
25
# File 'lib/live_f1/packet/sys/weather.rb', line 23

def to_s
  "%-18s - %s" % [Metric.name_for(metric), data]
end