diff --git a/html/jury.html b/html/jury.html index 783e8dda107a99252d735a1726ba77f4852da79e..1af5f736cbb34b0e457c802b5e04a629b25d4212 100644 --- a/html/jury.html +++ b/html/jury.html @@ -184,11 +184,6 @@ //rosbag_record_is_recording_subscriber.unsubscribe(); }); - // var challenge_xodr_param = new ROSLIB.Param({ - // ros : ros, - // name : '/iri_adc_gui_image_generator/xodr_file' - // }); - var set_xodr_service_client = new ROSLIB.Service({ ros : ros, name : '/iri_adc_gui_image_generator/set_xodr', @@ -260,11 +255,14 @@ var bgcolor; var is_recording=false; var rosbag_record_ready=true; - var ch0_xodr="adc/adc.xodr"; - var ch1_xodr="challenge1/challenge1.xodr"; - var ch2_xodr="challenge2/challenge2.xodr"; - var ch3_xodr="challenge3/challenge3.xodr"; - var ch4_xodr="challenge4/challenge4.xodr"; + + var ch_xodr=[ + "adc/adc.xodr", + "challenge1/challenge1.xodr", + "challenge2/challenge2.xodr", + "challenge3/challenge3.xodr", + "challenge4/challenge4.xodr" + ]; var team_names=[ "testing", @@ -285,6 +283,8 @@ function update_team() { team = document.getElementById("team_input").value; + document.getElementById("team_name").innerHTML = team_names[team]; + document.getElementById("team_name").style.color = team_colors[team]; localStorage.setItem('team', team); team_param.set(team); team_name_param.set(team_names[team]); @@ -302,32 +302,7 @@ function set_challenge_xodr_param(challenge) { - if(challenge==0) - { - //challenge_xodr_param.set(ch0_xodr); - set_xodr_request.data=ch0_xodr; - } - else if(challenge==1) - { - //challenge_xodr_param.set(ch1_xodr); - set_xodr_request.data=ch1_xodr; - } - else if(challenge==2) - { - //challenge_xodr_param.set(ch2_xodr); - set_xodr_request.data=ch2_xodr; - } - else if(challenge==3) - { - //challenge_xodr_param.set(ch3_xodr); - set_xodr_request.data=ch3_xodr; - } - else if(challenge==4) - { - //challenge_xodr_param.set(ch4_xodr); - set_xodr_request.data=ch4_xodr; - } - + set_xodr_request.data=ch_xodr[challenge]; set_xodr_service_client.callService(set_xodr_request, function(result) { @@ -765,298 +740,70 @@ image_quality_param.set(image_quality); }); } - - function semaphore1_green() - { - semaphore_request.color=2; - set_semaphore1_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore1 didn't respond"); - }); - } - - function semaphore1_red() - { - semaphore_request.color=1; - set_semaphore1_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore1 didn't respond"); - }); - } - - function semaphore1_off() - { - semaphore_request.color=0; - set_semaphore1_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore1 didn't respond"); - }); - } - - - function semaphore2_green() - { - semaphore_request.color=2; - set_semaphore2_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore2 didn't respond"); - }); - } - - function semaphore2_red() - { - semaphore_request.color=1; - set_semaphore2_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore2 didn't respond"); - }); - } - - function semaphore2_off() - { - semaphore_request.color=0; - set_semaphore2_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore2 didn't respond"); - }); - } - - - function semaphore3_green() - { - semaphore_request.color=2; - set_semaphore3_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore3 didn't respond"); - }); - } - - function semaphore3_red() - { - semaphore_request.color=1; - set_semaphore3_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore3 didn't respond"); - }); - } - - function semaphore3_off() - { - semaphore_request.color=0; - set_semaphore3_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore3 didn't respond"); - }); - } - - - function semaphore4_green() - { - semaphore_request.color=2; - set_semaphore4_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore4 didn't respond"); - }); - } - - function semaphore4_red() - { - semaphore_request.color=1; - set_semaphore4_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore4 didn't respond"); - }); - } - - function semaphore4_off() - { - semaphore_request.color=0; - set_semaphore4_service_client.callService(semaphore_request, - function(result) - { - - }, - function(result) - { - console.error("semaphore4 didn't respond"); - }); - } - - function semaphores_green() - { - semaphore1_green(); - semaphore2_green(); - semaphore3_green(); - semaphore4_green(); - } - - function semaphores_red() - { - semaphore1_red(); - semaphore2_red(); - semaphore3_red(); - semaphore4_red(); - } - - function semaphores_off() - { - semaphore1_off(); - semaphore2_off(); - semaphore3_off(); - semaphore4_off(); - } - - function building1_on() - { - building_request.data=true; - set_building1_service_client.callService(building_request, - function(result) - { - - }, - function(result) - { - console.error("building1 didn't respond"); - }); - } - - function building1_off() - { - building_request.data=false; - set_building1_service_client.callService(building_request, - function(result) - { - - }, - function(result) - { - console.error("building1 didn't respond"); - }); - } - - function building2_on() - { - building_request.data=true; - set_building2_service_client.callService(building_request, - function(result) - { - - }, - function(result) - { - console.error("building2 didn't respond"); - }); - } - - function building2_off() - { - building_request.data=false; - set_building2_service_client.callService(building_request, - function(result) - { - - }, - function(result) - { - console.error("building2 didn't respond"); - }); - } - - function building3_on() + + function set_semaphore(id,color) { - building_request.data=true; - set_building3_service_client.callService(building_request, - function(result) - { - - }, - function(result) - { - console.error("building3 didn't respond"); - }); + if(color=="green") + semaphore_request.color=2; + else if(color=="red") + semaphore_request.color=1; + else if(color=="off") + semaphore_request.color=0; + + switch(id) + { + case 1: + set_semaphore1_service_client.callService(semaphore_request, + function(result){ }, function(result){ console.error("semaphore1 service error"); }); + break; + case 2: + set_semaphore2_service_client.callService(semaphore_request, + function(result){ }, function(result){ console.error("semaphore2 service error"); }); + break; + case 3: + set_semaphore3_service_client.callService(semaphore_request, + function(result){ }, function(result){ console.error("semaphore3 service error"); }); + break; + case 4: + set_semaphore4_service_client.callService(semaphore_request, + function(result){ }, function(result){ console.error("semaphore4 service error"); }); + break; + } } - function building3_off() + function set_semaphores(color) { - building_request.data=false; - set_building3_service_client.callService(building_request, - function(result) - { - - }, - function(result) - { - console.error("building3 didn't respond"); - }); + set_semaphore(1,color); + set_semaphore(2,color); + set_semaphore(3,color); + set_semaphore(4,color); } - - function buildings_on() + + function set_building(id,status) { - building1_on(); - building2_on(); - building3_on(); + building_request.data=status; + switch(id) + { + case 1: + set_building1_service_client.callService(building_request, + function(result){ }, function(result){ console.error("building1 service error"); }); + break; + case 2: + set_building2_service_client.callService(building_request, + function(result){ }, function(result){ console.error("building2 service error"); }); + break; + case 3: + set_building3_service_client.callService(building_request, + function(result){ }, function(result){ console.error("building3 service error"); }); + break; + } } - function buildings_off() + function set_buildings(status) { - building1_off(); - building2_off(); - building3_off(); + set_building(1,status); + set_building(2,status); + set_building(3,status); } function show_map_image() @@ -1106,6 +853,9 @@ { team = localStorage.getItem('team'); document.getElementById("team_input").value = team; + document.getElementById("team_name").innerHTML = team_names[team]; + document.getElementById("team_name").style.color = team_colors[team]; + team_param.set(team); team_name_param.set(team_names[team]); team_color_param.set(team_colors[team]); @@ -1124,14 +874,12 @@ challenge = localStorage.getItem('challenge'); document.getElementById("challenge_input").value = challenge; challenge_param.set(challenge); - //set_challenge_xodr_param(challenge); } else { challenge=1; localStorage.setItem('challenge', challenge); challenge_param.set(challenge); - //set_challenge_xodr_param(challenge); } load_goals_from_yaml(); @@ -1177,10 +925,11 @@ <main role="main" class="mycontainer" > <div class="row"> <div style="width: 40%"> - <label>Team</label> + <label style="width: 80px">Team</label> <input type="number" id="team_input" min="0" max="4" step="1" style="width: 2em" value="1" onchange="update_team()"> - <!--<br>--> - <label>Challenge</label> + <span id="team_name">teamname1</span> + <br> + <label style="width: 80px">Challenge</label> <input type="number" id="challenge_input" min="0" max="4" step="1" style="width: 2em" value="1" onchange="update_challenge()"> <!-- <select id="challenge_input2" name="challenge_input2"> @@ -1191,8 +940,7 @@ <option value="4">4</option> </select> --> - <br> - Goals <span id="goals_info" > </span> + <span id="goals_info" > </span> </div> <div style="width: 60%"> @@ -1239,34 +987,34 @@ <div class="row"> <div style="width: 50%"> Semaphore 1 - <button class="btn btn-success btn-semaphore" id="semaphore1_green" onclick="semaphore1_green()">green</button> - <button class="btn btn-danger btn-semaphore" id="semaphore1_red" onclick="semaphore1_red()">red</button> - <button class="btn btn-dark btn-semaphore" id="semaphore1_off" onclick="semaphore1_off()">off</button> + <button class="btn btn-success btn-semaphore" id="semaphore1_green" onclick="set_semaphore(1,'green')">green</button> + <button class="btn btn-danger btn-semaphore" id="semaphore1_red" onclick="set_semaphore(1,'red')">red</button> + <button class="btn btn-dark btn-semaphore" id="semaphore1_off" onclick="set_semaphore(1,'off')">off</button> <span id="semaphore1_info" ></span> <br> Semaphore 2 - <button class="btn btn-success btn-semaphore" id="semaphore2_green" onclick="semaphore2_green()">green</button> - <button class="btn btn-danger btn-semaphore" id="semaphore2_red" onclick="semaphore2_red()">red</button> - <button class="btn btn-dark btn-semaphore" id="semaphore2_off" onclick="semaphore2_off()">off</button> + <button class="btn btn-success btn-semaphore" id="semaphore2_green" onclick="set_semaphore(2,'green')">green</button> + <button class="btn btn-danger btn-semaphore" id="semaphore2_red" onclick="set_semaphore(2,'red')">red</button> + <button class="btn btn-dark btn-semaphore" id="semaphore2_off" onclick="set_semaphore(2,'off')">off</button> <span id="semaphore2_info" ></span> <br> Semaphore 3 - <button class="btn btn-success btn-semaphore" id="semaphore3_green" onclick="semaphore3_green()">green</button> - <button class="btn btn-danger btn-semaphore" id="semaphore3_red" onclick="semaphore3_red()">red</button> - <button class="btn btn-dark btn-semaphore" id="semaphore3_off" onclick="semaphore3_off()">off</button> + <button class="btn btn-success btn-semaphore" id="semaphore3_green" onclick="set_semaphore(3,'green')">green</button> + <button class="btn btn-danger btn-semaphore" id="semaphore3_red" onclick="set_semaphore(3,'red')">red</button> + <button class="btn btn-dark btn-semaphore" id="semaphore3_off" onclick="set_semaphore(3,'off')">off</button> <span id="semaphore3_info" ></span> <br> Semaphore 4 - <button class="btn btn-success btn-semaphore" id="semaphore4_green" onclick="semaphore4_green()">green</button> - <button class="btn btn-danger btn-semaphore" id="semaphore4_red" onclick="semaphore4_red()">red</button> - <button class="btn btn-dark btn-semaphore" id="semaphore4_off" onclick="semaphore4_off()">off</button> + <button class="btn btn-success btn-semaphore" id="semaphore4_green" onclick="set_semaphore(4,'green')">green</button> + <button class="btn btn-danger btn-semaphore" id="semaphore4_red" onclick="set_semaphore(4,'red')">red</button> + <button class="btn btn-dark btn-semaphore" id="semaphore4_off" onclick="set_semaphore(4,'off')">off</button> <span id="semaphore4_info" ></span> </div> <div style="width: 50%"> All - <button class="btn btn-success btn-semaphore" id="semaphores_green" onclick="semaphores_green()">green</button> - <button class="btn btn-danger btn-semaphore" id="semaphores_red" onclick="semaphores_red()">red</button> - <button class="btn btn-dark btn-semaphore" id="semaphores_off" onclick="semaphores_off()">off</button> + <button class="btn btn-success btn-semaphore" id="semaphores_green" onclick="set_semaphores('green')">green</button> + <button class="btn btn-danger btn-semaphore" id="semaphores_red" onclick="set_semaphores('red')">red</button> + <button class="btn btn-dark btn-semaphore" id="semaphores_off" onclick="set_semaphores('off')">off</button> <span id="semaphores_info" ></span> <br> <!--Sync semaphores <input name="sync_semaphores" id="sync_semaphores" type="checkbox" checked>--> @@ -1277,21 +1025,21 @@ <div class="row"> <div style="width: 50%"> <label style="width: 80px;">Hospital</label> - <button class="btn btn-light btn-semaphore" id="building1_on" onclick="building1_on()">on</button> - <button class="btn btn-dark btn-semaphore" id="building1_off" onclick="building1_off()">off</button> + <button class="btn btn-light btn-semaphore" id="building1_on" onclick="set_building(1,true)">on</button> + <button class="btn btn-dark btn-semaphore" id="building1_off" onclick="set_building(1,false)">off</button> <br> <label style="width: 80px;">SEAT</label> - <button class="btn btn-light btn-semaphore" id="building2_on" onclick="building2_on()">on</button> - <button class="btn btn-dark btn-semaphore" id="building2_off" onclick="building2_off()">off</button> + <button class="btn btn-light btn-semaphore" id="building2_on" onclick="set_building(2,true)">on</button> + <button class="btn btn-dark btn-semaphore" id="building2_off" onclick="set_building(2,false)">off</button> <br> <label style="width: 80px;">School</label> - <button class="btn btn-light btn-semaphore" id="building3_on" onclick="building3_on()">on</button> - <button class="btn btn-dark btn-semaphore" id="building3_off" onclick="building3_off()">off</button> + <button class="btn btn-light btn-semaphore" id="building3_on" onclick="set_building(3,true)">on</button> + <button class="btn btn-dark btn-semaphore" id="building3_off" onclick="set_building(3,false)">off</button> </div> <div style="width: 50%"> All - <button class="btn btn-light btn-semaphore" id="buildings_on" onclick="buildings_on()">on</button> - <button class="btn btn-dark btn-semaphore" id="buildings_off" onclick="buildings_off()">off</button> + <button class="btn btn-light btn-semaphore" id="buildings_on" onclick="set_buildings(true)">on</button> + <button class="btn btn-dark btn-semaphore" id="buildings_off" onclick="set_buildings(false)">off</button> </div> </div> <hr> diff --git a/html/penalizations.html b/html/penalizations.html index 3d786bbb5128377ce960b6b881ce5c281b52f430..f0cd3bd177479cf9cc298fcb78c8f1b9e13e716f 100644 --- a/html/penalizations.html +++ b/html/penalizations.html @@ -114,28 +114,17 @@ },500); } - function penalization1() + function penalization(id) { - var x = parseInt(document.getElementById("pen1_count").value); - document.getElementById("pen1_count").value = x+1; - add_penalization(1); - } - - function penalization2() - { - var x = parseInt(document.getElementById("pen2_count").value); - document.getElementById("pen2_count").value = x+1; - add_penalization(2); - } - - function penalization3() - { - var x = parseInt(document.getElementById("pen3_count").value); - document.getElementById("pen3_count").value = x+1; - add_penalization(3); + var x = parseInt(document.getElementById("pen"+id+"_count").value); + if(x< parseInt(document.getElementById("pen"+id+"_count").max)) + { + document.getElementById("pen"+id+"_count").value = x+1; + add_penalization_feedback(id); + } } - function add_penalization(id) + function add_penalization_feedback(id) { // feedback_param.get(function(value){ feedback_param_value = value; }); // attempt_time_param.get(function(value){ attempt_time_param_value = value; }); @@ -197,9 +186,12 @@ var date_string = now.toLocaleDateString("es-ES"); var time_string = now.toLocaleTimeString("es-ES"); var textbox = "Team: " + team + '\n' + "Challenge: " + challenge + '\n' + "Date: " + date_string + '\n' + "Time: " + time_string + '\n'; - textbox = textbox + document.getElementById("pen1_name").innerHTML + ", count=" + parseInt(document.getElementById("pen1_count").value) + '\n'; - textbox = textbox + document.getElementById("pen2_name").innerHTML + ", count=" + parseInt(document.getElementById("pen2_count").value) + '\n'; - textbox = textbox + document.getElementById("pen3_name").innerHTML + ", count=" + parseInt(document.getElementById("pen3_count").value) + '\n'; + + + for(let i=1; i<15; i++) + { + textbox = textbox + "Pen. "+ i + ", count=" + parseInt(document.getElementById("pen"+i+"_count").value) + ", " + document.getElementById("pen"+i+"_name").innerHTML + '\n'; + } var textbox = textbox + penalizations_log; @@ -260,72 +252,72 @@ <br> <span id="pen1_name" class="pen_name">Step line</span> - <button class="btn btn-primary pen_button" id = "penalization_button_1" onclick = "this.blur();penalization1()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_1" onclick = "this.blur();penalization(1)">ADD</button> <input type="number" id="pen1_count" min="0" max="5" step="1" style="width: 2em" value="0" > <span id="pen1_description">Cost 1. Max 5. half of the car remains inside</span> <br> <span id="pen2_name" class="pen_name">Step repeatedly</span> - <button class="btn btn-primary pen_button" id = "penalization_button_2" onclick = "this.blur();penalization2()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_2" onclick = "this.blur();penalization(2)">ADD</button> <input type="number" id="pen2_count" min="0" max="99" step="1" style="width: 2em" value="0" > <span id="pen2_description">Cost 2</span> <br> <span id="pen3_name" class="pen_name">Out of the road</span> - <button class="btn btn-primary pen_button" id = "penalization_button_3" onclick = "this.blur();penalization3()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_3" onclick = "this.blur();penalization(3)">ADD</button> <input type="number" id="pen3_count" min="0" max="99" step="1" style="width: 2em" value="0" > <span id="pen3_description">Cost 3</span> <br> <span id="pen4_name" class="pen_name">Drive wrong direction</span> - <button class="btn btn-primary pen_button" id = "penalization_button_4" onclick = "this.blur();penalization4()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_4" onclick = "this.blur();penalization(4)">ADD</button> <input type="number" id="pen4_count" min="0" max="99" step="1" style="width: 2em" value="0" > <span id="pen4_description">Cost 3</span> <br> <span id="pen5_name" class="pen_name">Collision with obstacle</span> - <button class="btn btn-primary pen_button" id = "penalization_button_5" onclick = "this.blur();penalization5()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_5" onclick = "this.blur();penalization(5)">ADD</button> <input type="number" id="pen5_count" min="0" max="99" step="1" style="width: 2em" value="0" > <span id="pen5_description">Cost 4</span> <br> <span id="pen6_name" class="pen_name">No overcoming dynamic obstacle</span> - <button class="btn btn-primary pen_button" id = "penalization_button_6" onclick = "this.blur();penalization6()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_6" onclick = "this.blur();penalization(6)">ADD</button> <input type="number" id="pen6_count" min="0" max="1" step="1" style="width: 2em" value="0" > <span id="pen6_description">Cost 3. Max 1</span> <br> <span id="pen7_name" class="pen_name">Overtake not allowed</span> - <button class="btn btn-primary pen_button" id = "penalization_button_7" onclick = "this.blur();penalization7()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_7" onclick = "this.blur();penalization(7)">ADD</button> <input type="number" id="pen7_count" min="0" max="1" step="1" style="width: 2em" value="0" > <span id="pen7_description">Cost 3. Max 1</span> <br> <span id="pen8_name" class="pen_name">Ignore semaphore/sign</span> - <button class="btn btn-primary pen_button" id = "penalization_button_8" onclick = "this.blur();penalization8()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_8" onclick = "this.blur();penalization(8)">ADD</button> <input type="number" id="pen8_count" min="0" max="99" step="1" style="width: 2em" value="0" > <span id="pen8_description">Cost 2</span> <br> <span id="pen9_name" class="pen_name">Stop after sign/semaphore</span> - <button class="btn btn-primary pen_button" id = "penalization_button_9" onclick = "this.blur();penalization9()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_9" onclick = "this.blur();penalization(9)">ADD</button> <input type="number" id="pen9_count" min="0" max="99" step="1" style="width: 2em" value="0" > <span id="pen9_description">Cost 1</span> <br> <span id="pen10_name" class="pen_name">No parking</span> - <button class="btn btn-primary pen_button" id = "penalization_button_10" onclick = "this.blur();penalization10()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_10" onclick = "this.blur();penalization(10)">ADD</button> <input type="number" id="pen10_count" min="0" max="99" step="1" style="width: 2em" value="0" > <span id="pen10_description">Cost 3</span> <br> <span id="pen11_name" class="pen_name">Parking half car out</span> - <button class="btn btn-primary pen_button" id = "penalization_button_11" onclick = "this.blur();penalization11()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_11" onclick = "this.blur();penalization(11)">ADD</button> <input type="number" id="pen11_count" min="0" max="99" step="1" style="width: 2em" value="0" > <span id="pen11_description">Cost 3</span> <br> <span id="pen12_name" class="pen_name">No data feedback</span> - <button class="btn btn-primary pen_button" id = "penalization_button_12" onclick = "this.blur();penalization12()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_12" onclick = "this.blur();penalization(12)">ADD</button> <input type="number" id="pen12_count" min="0" max="1" step="1" style="width: 2em" value="0" > <span id="pen12_description">Cost 2. Max 1.</span> <br> <span id="pen13_name" class="pen_name">No remote start</span> - <button class="btn btn-primary pen_button" id = "penalization_button_13" onclick = "this.blur();penalization13()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_13" onclick = "this.blur();penalization(13)">ADD</button> <input type="number" id="pen13_count" min="0" max="1" step="1" style="width: 2em" value="0" > <span id="pen13_description">Cost 1. Max 1.</span> <br> <span id="pen14_name" class="pen_name">No use of car lights</span> - <button class="btn btn-primary pen_button" id = "penalization_button_14" onclick = "this.blur();penalization14()">ADD</button> + <button class="btn btn-primary pen_button" id = "penalization_button_14" onclick = "this.blur();penalization(14)">ADD</button> <input type="number" id="pen14_count" min="0" max="1" step="1" style="width: 2em" value="0" > <span id="pen14_description">Cost 2. Max 1.</span> <br> diff --git a/html/timer.html b/html/timer.html index 04532d68b1390d0e13eeeca7b69f0e986bd042da..6c60895dcd984f976e272de4d537624a8119a586 100644 --- a/html/timer.html +++ b/html/timer.html @@ -77,20 +77,19 @@ public_timer_timeout = setTimeout( function() { - team_name_param.get(function(value){ team_name_param_value = value; }); - team_color_param.get(function(value){ team_color_param_value = value; }); - jury_mode_param.get(function(value){ jury_mode_param_value = value; }); - attempt_time_param.get(function(value){ attempt_time_param_value = value; }); + team_name_param.get(function(value){ team_name_param_value = value; }); + team_color_param.get(function(value){ team_color_param_value = value; }); + jury_mode_param.get(function(value){ jury_mode_param_value = value; }); + attempt_time_param.get(function(value){ attempt_time_param_value = value; }); - document.getElementById("timer_output_big").innerHTML = attempt_time_param_value; - document.getElementById("team_id").innerHTML = team_name_param_value; - document.getElementById("team_id").style.color= team_color_param_value; + document.getElementById("timer_output_big").innerHTML = attempt_time_param_value; + document.getElementById("team_id").innerHTML = team_name_param_value; + document.getElementById("team_id").style.color = team_color_param_value; if(jury_mode_param_value=="Disabled") document.getElementById("service_info").innerHTML = "Autonomous"; else document.getElementById("service_info").innerHTML = "Manual"; - iteration(); },200); } @@ -99,10 +98,6 @@ ( function () { - team_name_param.get(function(value){ team_name_param_value = value; }); - document.getElementById("team_id").innerHTML = team_name_param_value; - - challenge_param.get(function(value){ challenge_param_value = value; }); iteration(); } );