Skip to content

Improve phonetic readout of lap + time #81

Description

@PaulWieland

Right now the phonetic readout of the pilot plus lap plus time is a bit hard to comprehend because the lap number bleeds into the time.

Example: "Paul lap one one minute five seconds"

I believe this is the line responsible:

var $ttstest = msg.pilot + " lap " + msg.lap + " " + msg.phonetic;

I am going to try modifying this function on our timer to something like this (to be tested still):

		socket.on('phonetic_data', function (msg) {
			//	var $ttstest = msg.pilot + " lap " + msg.lap + " " + msg.phonetic;

			var phoneticLap="";
			switch(msg.lap){
				case 1: phoneticLap = "st"; break;
				case 2: phoneticLap = "nd"; break;
				case 3: phoneticLap = "rd"; break;
				default: phoneticLap = "th"; break;
			}
			var $ttstest = msg.pilot + " " + msg.lap + phoneticLap + " lap " + msg.lap + " " + msg.phonetic;
	
			speak('<div class="speech">' + $ttstest + '</div> div.speech');				
		})

That should hopefully cause it to say: "Paul first lap one minute five seconds"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions