Crazy-Marvin/Morse

Space (represented with slash) functions as an indefinite dash on screen flash mode

Open

#179 opened on Feb 9, 2024

 (3 comments) (0 reactions) (0 assignees)Java (38 forks)auto 404
bugenhancementgood first issuehacktoberfesthelp wanted

Repository metrics

Stars
 (188 stars)
PR merge metrics
 (PR metrics pending)

Description

Description

When the output reaches a space (represented in the program as a slash) it makes the screen become white indefinitely. You can only solve it by manually closing the program and opening it again, but then your message is lost and you have to recreate one without spaces.

Steps to reproduce

  1. Type any message that contains a space (such as "a a"; or even something as simple as a single space " ")
  2. Click the screen flash button
  3. Observe that the screen is white indefinitely.

Expected behavior

According to Wikipedia and the various other Issues raised, there is a mandatory gap between dots and dashes as follows:

  1. The length of signal absence (gap) between dots/dashes is the length of a dot. (In the code, I think this should be structured as a separate variable not linked to the length of the dot's flash)
  2. The gap between letters is equal to a dash (meaning 3 dots). (Once again, this variable should probably not be scaled based on the previous item's variable)
  3. The gap between words (AKA a space) is equal to 7 dots.

Therefore, the space (represented as "/" in the program) must be a mandatory pause that does not activate the screen and should have the same time as seven dots.

Ideally, the user should be able to control the length of signal absence between ditdah, letter, and word.

Tech info

Device: Any Android device or emulator

Additional context

I think it would also be nice if we could change the color that gets projected through the screen using a color picker, so I could set it to red RGB (255,0,0) and it wouldn't be so hard on the eyes. I had to use the screen flash mode because the flashlight mode is buggy and doesn't have a gap between dots and dashes, causing every letter and every word to be one long dash.

Contributor guide