class MovingsignApi::SetSoundCommand

Sets the sound on/off property of the sign

Attributes

on[RW]

Public Class Methods

new(sound_on) click to toggle source

@param sound_on [Boolean] true to turn sound on, false otherwise

# File lib/movingsign_api/commands/set_sound_command.rb, line 9
def initialize(sound_on)
  @on = sound_on
end

Public Instance Methods

subcommand_code() click to toggle source
# File lib/movingsign_api/commands/set_sound_command.rb, line 13
def subcommand_code
  'J'
end
subcommand_payload_bytes() click to toggle source
# File lib/movingsign_api/commands/set_sound_command.rb, line 17
def subcommand_payload_bytes
  string_to_ascii_bytes(@on ? '1' : '0')
end