Skip to content

Commit a02c064

Browse files
author
Hinton
committed
Prevent clicking on start measurement if no connection to ros.
1 parent c32a943 commit a02c064

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

views/maps/fit_on_map.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ block content
1313
input.form-control(name='coordinates', type='hidden')
1414
.form-group
1515
.btn-group
16-
input.btn.btn-primary(type='submit', value='Update reference points')
16+
input.btn.btn-primary(type='submit', value='Save reference points')
1717
a.btn.btn-secondary#move-to-center(href='#') Move map to center
1818

1919
a.btn.btn-secondary.float-right(href=`/maps/${map.id}`) Cancel

views/maps/view.pug

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ block content
2626
a.btn.btn-outline-success(href=`/maps/${map.id}/yaml`) Download Yaml
2727

2828
h2 Measurements
29-
a.btn.btn-primary.float-right(href=`/maps/${map.id}/toggle`)
30-
| #{active ? 'Stop measurement' : 'Start measurement'}
29+
if active
30+
a.btn.btn-primary.float-right(href=`/maps/${map.id}/toggle`) Stop measuring
31+
else if ros.connected
32+
a.btn.btn-primary.float-right(href=`/maps/${map.id}/toggle`) Start new measurement
33+
else
34+
a.btn.btn-primary.disabled.float-right(href='#') Start new measurement
3135

3236
table.table
3337
thead.thead-default

0 commit comments

Comments
 (0)