class Spektrum::Log::FlightLogRecord

Public Class Methods

new(timestamp, raw_data) click to toggle source
Calls superclass method Spektrum::Log::Record::new
# File lib/spektrum/log/records.rb, line 131
def initialize(timestamp, raw_data)
  super timestamp, raw_data
end

Public Instance Methods

rx_voltage() click to toggle source

Gets the receiver pack voltage data.

@return [Float] rx voltage data, in volts @note This conversion has been verified via Spektrum STi

# File lib/spektrum/log/records.rb, line 139
def rx_voltage
  raw_rx_voltage / 100.0
end
rx_voltage?() click to toggle source

Determines if there is receiver voltage data contained within.

@return [Boolean] true if there is rx voltage data, false otherwise

# File lib/spektrum/log/records.rb, line 146
def rx_voltage?
  raw_rx_voltage != 0x7FFF
end

Private Instance Methods

raw_rx_voltage() click to toggle source
# File lib/spektrum/log/records.rb, line 152
def raw_rx_voltage
  @raw_rx_voltage ||= two_byte_field(14..15)
end