Class: TimexDatalinkClient::Protocol7::Eeprom::Games
- Inherits:
-
Object
- Object
- TimexDatalinkClient::Protocol7::Eeprom::Games
- Defined in:
- lib/timex_datalink_client/protocol_7/eeprom/games.rb
Constant Summary collapse
- COUNTDOWN_TIMER_SECONDS_DEFAULT =
60
- COUNTDOWN_TIMER_SOUND_DEFAULT =
0x062
- MUSIC_TIME_KEEPER_SOUND_DEFAULT =
0x062
- PACKETS_TERMINATOR =
0x02
Constants included from Helpers::FourByteFormatter
Helpers::FourByteFormatter::BYTE_NULL, Helpers::FourByteFormatter::BYTE_TERMINATOR_ENDF, Helpers::FourByteFormatter::BYTE_TERMINATOR_ENDR
Instance Attribute Summary collapse
-
#countdown_timer_enabled ⇒ Object
Returns the value of attribute countdown_timer_enabled.
-
#countdown_timer_seconds ⇒ Object
Returns the value of attribute countdown_timer_seconds.
-
#countdown_timer_sound ⇒ Object
Returns the value of attribute countdown_timer_sound.
-
#fortune_teller_enabled ⇒ Object
Returns the value of attribute fortune_teller_enabled.
-
#memory_game_enabled ⇒ Object
Returns the value of attribute memory_game_enabled.
-
#mind_reader_enabled ⇒ Object
Returns the value of attribute mind_reader_enabled.
-
#morse_code_practice_enabled ⇒ Object
Returns the value of attribute morse_code_practice_enabled.
-
#music_time_keeper_enabled ⇒ Object
Returns the value of attribute music_time_keeper_enabled.
-
#music_time_keeper_sound ⇒ Object
Returns the value of attribute music_time_keeper_sound.
-
#red_light_green_light_enabled ⇒ Object
Returns the value of attribute red_light_green_light_enabled.
-
#rhythm_rhyme_buster_enabled ⇒ Object
Returns the value of attribute rhythm_rhyme_buster_enabled.
-
#stop_watch_enabled ⇒ Object
Returns the value of attribute stop_watch_enabled.
-
#treasure_hunter_enabled ⇒ Object
Returns the value of attribute treasure_hunter_enabled.
Instance Method Summary collapse
-
#initialize(memory_game_enabled: false, fortune_teller_enabled: false, countdown_timer_enabled: false, countdown_timer_seconds: COUNTDOWN_TIMER_SECONDS_DEFAULT, countdown_timer_sound: COUNTDOWN_TIMER_SOUND_DEFAULT, mind_reader_enabled: false, music_time_keeper_enabled: false, music_time_keeper_sound: MUSIC_TIME_KEEPER_SOUND_DEFAULT, morse_code_practice_enabled: false, treasure_hunter_enabled: false, rhythm_rhyme_buster_enabled: false, stop_watch_enabled: false, red_light_green_light_enabled: false) ⇒ Games
constructor
Create a Games instance.
-
#packet ⇒ Array<Integer>
Compile data for games.
Methods included from Helpers::LsbMsbFormatter
Methods included from Helpers::FourByteFormatter
Constructor Details
#initialize(memory_game_enabled: false, fortune_teller_enabled: false, countdown_timer_enabled: false, countdown_timer_seconds: COUNTDOWN_TIMER_SECONDS_DEFAULT, countdown_timer_sound: COUNTDOWN_TIMER_SOUND_DEFAULT, mind_reader_enabled: false, music_time_keeper_enabled: false, music_time_keeper_sound: MUSIC_TIME_KEEPER_SOUND_DEFAULT, morse_code_practice_enabled: false, treasure_hunter_enabled: false, rhythm_rhyme_buster_enabled: false, stop_watch_enabled: false, red_light_green_light_enabled: false) ⇒ Games
Create a Games instance.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 41 def initialize( memory_game_enabled: false, fortune_teller_enabled: false, countdown_timer_enabled: false, countdown_timer_seconds: COUNTDOWN_TIMER_SECONDS_DEFAULT, countdown_timer_sound: COUNTDOWN_TIMER_SOUND_DEFAULT, mind_reader_enabled: false, music_time_keeper_enabled: false, music_time_keeper_sound: MUSIC_TIME_KEEPER_SOUND_DEFAULT, morse_code_practice_enabled: false, treasure_hunter_enabled: false, rhythm_rhyme_buster_enabled: false, stop_watch_enabled: false, red_light_green_light_enabled: false ) @memory_game_enabled = memory_game_enabled @fortune_teller_enabled = fortune_teller_enabled @countdown_timer_enabled = countdown_timer_enabled @countdown_timer_seconds = countdown_timer_seconds @countdown_timer_sound = countdown_timer_sound @mind_reader_enabled = mind_reader_enabled @music_time_keeper_enabled = music_time_keeper_enabled @music_time_keeper_sound = music_time_keeper_sound @morse_code_practice_enabled = morse_code_practice_enabled @treasure_hunter_enabled = treasure_hunter_enabled @rhythm_rhyme_buster_enabled = rhythm_rhyme_buster_enabled @stop_watch_enabled = stop_watch_enabled @red_light_green_light_enabled = red_light_green_light_enabled end |
Instance Attribute Details
#countdown_timer_enabled ⇒ Object
Returns the value of attribute countdown_timer_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def countdown_timer_enabled @countdown_timer_enabled end |
#countdown_timer_seconds ⇒ Object
Returns the value of attribute countdown_timer_seconds.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def countdown_timer_seconds @countdown_timer_seconds end |
#countdown_timer_sound ⇒ Object
Returns the value of attribute countdown_timer_sound.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def countdown_timer_sound @countdown_timer_sound end |
#fortune_teller_enabled ⇒ Object
Returns the value of attribute fortune_teller_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def fortune_teller_enabled @fortune_teller_enabled end |
#memory_game_enabled ⇒ Object
Returns the value of attribute memory_game_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def memory_game_enabled @memory_game_enabled end |
#mind_reader_enabled ⇒ Object
Returns the value of attribute mind_reader_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def mind_reader_enabled @mind_reader_enabled end |
#morse_code_practice_enabled ⇒ Object
Returns the value of attribute morse_code_practice_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def morse_code_practice_enabled @morse_code_practice_enabled end |
#music_time_keeper_enabled ⇒ Object
Returns the value of attribute music_time_keeper_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def music_time_keeper_enabled @music_time_keeper_enabled end |
#music_time_keeper_sound ⇒ Object
Returns the value of attribute music_time_keeper_sound.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def music_time_keeper_sound @music_time_keeper_sound end |
#red_light_green_light_enabled ⇒ Object
Returns the value of attribute red_light_green_light_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def red_light_green_light_enabled @red_light_green_light_enabled end |
#rhythm_rhyme_buster_enabled ⇒ Object
Returns the value of attribute rhythm_rhyme_buster_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def rhythm_rhyme_buster_enabled @rhythm_rhyme_buster_enabled end |
#stop_watch_enabled ⇒ Object
Returns the value of attribute stop_watch_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def stop_watch_enabled @stop_watch_enabled end |
#treasure_hunter_enabled ⇒ Object
Returns the value of attribute treasure_hunter_enabled.
20 21 22 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 20 def treasure_hunter_enabled @treasure_hunter_enabled end |
Instance Method Details
#packet ⇒ Array<Integer>
Compile data for games.
74 75 76 77 78 79 80 81 |
# File 'lib/timex_datalink_client/protocol_7/eeprom/games.rb', line 74 def packet [ enabled_games, countdown_timer_time, sounds, PACKETS_TERMINATOR ].flatten end |