Improve phonetic readout of lap + time
PaulWieland opened this issue · 0 comments
PaulWieland commented
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:
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"