class Event

Attributes

time[R]

Public Class Methods

new(bytes) click to toggle source
# File lib/trixter/event.rb, line 6
def initialize(bytes)
  @bytes = bytes
  @time = Time.now.to_f
end

Public Instance Methods

crankPosition() click to toggle source
# File lib/trixter/event.rb, line 11
def crankPosition
  return @bytes[6..7]
end
flywheelRotationTime() click to toggle source
# File lib/trixter/event.rb, line 71
def flywheelRotationTime
  return @bytes[24..27]
end
leftBrakePressure() click to toggle source
# File lib/trixter/event.rb, line 19
def leftBrakePressure
  return @bytes[10..11]
end
leftControlDown() click to toggle source
# File lib/trixter/event.rb, line 39
def leftControlDown
  return @bytes[17] == 'b'
end
leftControlLeft() click to toggle source
# File lib/trixter/event.rb, line 31
def leftControlLeft
  return @bytes[16] == 'e'
end
leftControlRight() click to toggle source
# File lib/trixter/event.rb, line 35
def leftControlRight
  return @bytes[16] == 'b'
end
leftControlUp() click to toggle source
# File lib/trixter/event.rb, line 43
def leftControlUp
  return @bytes[17] == 'e'
end
leftGearDown() click to toggle source
# File lib/trixter/event.rb, line 27
def leftGearDown
  return @bytes[18] == '7'
end
leftGearUp() click to toggle source
# File lib/trixter/event.rb, line 23
def leftGearUp
  return @bytes[16] == '7'
end
rightBrakePressure() click to toggle source
# File lib/trixter/event.rb, line 15
def rightBrakePressure
  return @bytes[8..9]
end
rightControlLeft() click to toggle source
# File lib/trixter/event.rb, line 47
def rightControlLeft
  return @bytes[17] == 'd'
end
rightControlRight() click to toggle source
# File lib/trixter/event.rb, line 51
def rightControlRight
  return @bytes[17] == '7'
end
rightControlUp() click to toggle source
# File lib/trixter/event.rb, line 55
def rightControlUp
  return @bytes[16] == 'd'
end
rightGearDown() click to toggle source
# File lib/trixter/event.rb, line 63
def rightGearDown
  return @bytes[18] == 'b'
end
rightGearUp() click to toggle source
# File lib/trixter/event.rb, line 59
def rightGearUp
  return @bytes[18] == 'd'
end
seated() click to toggle source
# File lib/trixter/event.rb, line 67
def seated
  return @bytes[19] == '7'
end