class SpheroPwn::Commands::GetDeviceMode::Response
The development mode of the robot.
Attributes
mode[R]
@return {Symbol} the device's mode; can be :normal or :user_hack
Public Class Methods
new(code_byte, sequence_byte, data_bytes)
click to toggle source
@see {SpheroPwn::Response#initialize}
Calls superclass method
SpheroPwn::Response::new
# File lib/sphero_pwn/commands/get_device_mode.rb, line 19 def initialize(code_byte, sequence_byte, data_bytes) super if code == :ok @mode = case data_bytes[0] when 0x00 :normal when 0x01 :user_hack else :unknown end else @mode = :error end end