Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iri_adc_gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
ADC
ADC_2021
iri_adc_gui
Commits
8bf6a766
Commit
8bf6a766
authored
3 years ago
by
Fernando Herrero
Browse files
Options
Downloads
Patches
Plain Diff
Update html
parent
ae3ebf43
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
html/js/timer.js
+10
-9
10 additions, 9 deletions
html/js/timer.js
html/jury.html
+9
-9
9 additions, 9 deletions
html/jury.html
with
19 additions
and
18 deletions
html/js/timer.js
+
10
−
9
View file @
8bf6a766
var
timer_running
=
false
;
var
timer_running
=
false
;
var
time_string
=
"
00:00:00
"
;
var
time
r
_string
=
"
00:00:00
"
;
// Convert time to a format of hours, minutes, seconds, and milliseconds
// Convert time to a format of hours, minutes, seconds, and milliseconds
function
timeToString
(
time
)
{
function
timeToString
(
time
)
{
...
@@ -42,6 +42,7 @@ function startStop()
...
@@ -42,6 +42,7 @@ function startStop()
{
{
timer_running
=
true
;
timer_running
=
true
;
start
();
start
();
timer_string
=
"
00:00:00
"
;
document
.
getElementById
(
"
startStop
"
).
innerHTML
=
"
STOP
"
;
document
.
getElementById
(
"
startStop
"
).
innerHTML
=
"
STOP
"
;
document
.
getElementById
(
'
startStop
'
).
style
.
backgroundColor
=
"
#e23047
"
;
document
.
getElementById
(
'
startStop
'
).
style
.
backgroundColor
=
"
#e23047
"
;
document
.
getElementById
(
'
clear_timer_button
'
).
disabled
=
true
;
document
.
getElementById
(
'
clear_timer_button
'
).
disabled
=
true
;
...
@@ -51,7 +52,7 @@ function startStop()
...
@@ -51,7 +52,7 @@ function startStop()
{
{
timer_running
=
false
;
timer_running
=
false
;
clearInterval
(
timerInterval
);
clearInterval
(
timerInterval
);
attempt_time_param
.
set
(
time_string
);
attempt_time_param
.
set
(
time
r
_string
);
elapsedTime
=
0
;
elapsedTime
=
0
;
document
.
getElementById
(
"
startStop
"
).
innerHTML
=
"
START
"
;
document
.
getElementById
(
"
startStop
"
).
innerHTML
=
"
START
"
;
document
.
getElementById
(
'
startStop
'
).
style
.
backgroundColor
=
"
SeaGreen
"
;
document
.
getElementById
(
'
startStop
'
).
style
.
backgroundColor
=
"
SeaGreen
"
;
...
@@ -64,10 +65,10 @@ function start() {
...
@@ -64,10 +65,10 @@ function start() {
startTime
=
Date
.
now
()
-
elapsedTime
;
startTime
=
Date
.
now
()
-
elapsedTime
;
timerInterval
=
setInterval
(
function
printTime
()
{
timerInterval
=
setInterval
(
function
printTime
()
{
elapsedTime
=
Date
.
now
()
-
startTime
;
elapsedTime
=
Date
.
now
()
-
startTime
;
time_string
=
timeToString
(
elapsedTime
);
time
r
_string
=
timeToString
(
elapsedTime
);
print
(
timeToString
(
elapsedTime
));
print
(
timeToString
(
elapsedTime
));
localStorage
.
setItem
(
'
attempt_time
'
,
time_string
);
localStorage
.
setItem
(
'
attempt_time
'
,
time
r
_string
);
attempt_time_param
.
set
(
time_string
);
attempt_time_param
.
set
(
time
r
_string
);
},
10
);
},
10
);
//showButton("PAUSE");
//showButton("PAUSE");
}
}
...
@@ -79,10 +80,10 @@ function pause() {
...
@@ -79,10 +80,10 @@ function pause() {
function
reset
()
{
function
reset
()
{
//clearInterval(timerInterval);
//clearInterval(timerInterval);
time_string
=
"
00:00:00
"
;
time
r
_string
=
"
00:00:00
"
;
print
(
time_string
);
print
(
time
r
_string
);
localStorage
.
setItem
(
'
attempt_time
'
,
time_string
);
localStorage
.
setItem
(
'
attempt_time
'
,
time
r
_string
);
attempt_time_param
.
set
(
time_string
);
attempt_time_param
.
set
(
time
r
_string
);
elapsedTime
=
0
;
elapsedTime
=
0
;
//showButton("PLAY");
//showButton("PLAY");
}
}
...
...
This diff is collapsed.
Click to expand it.
html/jury.html
+
9
−
9
View file @
8bf6a766
...
@@ -131,21 +131,21 @@
...
@@ -131,21 +131,21 @@
var
set_building1_service_client
=
new
ROSLIB
.
Service
({
var
set_building1_service_client
=
new
ROSLIB
.
Service
({
ros
:
ros
,
ros
:
ros
,
name
:
'
/jury/
set_building1
'
,
name
:
'
/jury/
hospital_light
'
,
serviceType
:
'
std_srvs/SetBool
'
serviceType
:
'
std_srvs/SetBool
'
});
});
var
set_building2_service_client
=
new
ROSLIB
.
Service
({
var
set_building2_service_client
=
new
ROSLIB
.
Service
({
ros
:
ros
,
ros
:
ros
,
name
:
'
/jury/set_
building2
'
,
name
:
'
/jury/se
a
t_
home_light
'
,
serviceType
:
'
std_srvs/SetBool
'
serviceType
:
'
std_srvs/SetBool
'
});
});
var
set_building3_service_client
=
new
ROSLIB
.
Service
({
var
set_building3_service_client
=
new
ROSLIB
.
Service
({
ros
:
ros
,
ros
:
ros
,
name
:
'
/jury/s
et_building3
'
,
name
:
'
/jury/s
chool_light
'
,
serviceType
:
'
std_srvs/SetBool
'
serviceType
:
'
std_srvs/SetBool
'
});
});
...
@@ -565,7 +565,7 @@
...
@@ -565,7 +565,7 @@
{
{
if
(
text
!=
last_feedback_line
)
if
(
text
!=
last_feedback_line
)
{
{
var
time
=
"
[
"
+
time_string
+
"
]:
"
;
var
time
=
"
[
"
+
time
r
_string
+
"
]:
"
;
feedback_text
=
time
+
text
+
'
\n
'
+
feedback_text
;
feedback_text
=
time
+
text
+
'
\n
'
+
feedback_text
;
document
.
getElementById
(
"
feedback_text
"
).
innerHTML
=
feedback_text
;
document
.
getElementById
(
"
feedback_text
"
).
innerHTML
=
feedback_text
;
...
@@ -1177,10 +1177,10 @@
...
@@ -1177,10 +1177,10 @@
<main
role=
"main"
class=
"mycontainer"
>
<main
role=
"main"
class=
"mycontainer"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
style=
"width: 40%"
>
<div
style=
"width: 40%"
>
Team
&
nbsp
&
nbsp
&
nbsp
&
nbsp
&
nbsp
&
nbsp
&
nbsp
<label>
Team
</label>
<input
type=
"number"
id=
"team_input"
min=
"0"
max=
"4"
step=
"1"
style=
"width: 2em"
value=
"1"
onchange=
"update_team()"
>
<input
type=
"number"
id=
"team_input"
min=
"0"
max=
"4"
step=
"1"
style=
"width: 2em"
value=
"1"
onchange=
"update_team()"
>
<!--<br>-->
<!--<br>-->
Challenge
<label>
Challenge
</label>
<input
type=
"number"
id=
"challenge_input"
min=
"0"
max=
"4"
step=
"1"
style=
"width: 2em"
value=
"1"
onchange=
"update_challenge()"
>
<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">
<select id="challenge_input2" name="challenge_input2">
...
@@ -1276,15 +1276,15 @@
...
@@ -1276,15 +1276,15 @@
<hr>
<hr>
<div
class=
"row"
>
<div
class=
"row"
>
<div
style=
"width: 50%"
>
<div
style=
"width: 50%"
>
Building 1
<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-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-dark btn-semaphore"
id=
"building1_off"
onclick=
"building1_off()"
>
off
</button>
<br>
<br>
Building 2
<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-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-dark btn-semaphore"
id=
"building2_off"
onclick=
"building2_off()"
>
off
</button>
<br>
<br>
Building 3
<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-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-dark btn-semaphore"
id=
"building3_off"
onclick=
"building3_off()"
>
off
</button>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment