Skip to content

Commit ca3d8b0

Browse files
authored
perseverance
1 parent bae0e50 commit ca3d8b0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/App.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export default {
134134
Curiosity: 'Curiosity',
135135
Spirit: 'Spirit',
136136
Opportunity: 'Opportunity',
137+
Perseverance: 'Perseverance',
137138
},
138139
}).on('change', (rover) => {
139140
@@ -277,7 +278,7 @@ export default {
277278
getManifest() {
278279
279280
// set rover for API call
280-
const regexRovers = /SETROVER|curiosity|spirit|opportunity/gi;
281+
const regexRovers = /SETROVER|curiosity|spirit|opportunity|perseverance/gi;
281282
282283
this.manifestUrl = this.manifestUrl.replace(regexRovers, this.rover.toLowerCase())
283284
@@ -297,8 +298,12 @@ export default {
297298
if (document.getElementById("picture").classList.contains("wholeBlack")) document.getElementById("picture").classList.remove("wholeBlack")
298299
299300
// set rover and camera for manifest api call
300-
const regexRovers = /SETROVER|curiosity|spirit|opportunity/gi;
301+
const regexRovers = /SETROVER|curiosity|spirit|opportunity|perseverance/gi;
301302
this.manifestUrl = this.manifestUrl.replace(regexRovers, this.rover.toLowerCase())
303+
304+
// set camera if rover is Perseverance
305+
if (this.rover == "Perseverance") this.cam = "NAVCAM_RIGHT";
306+
else this.cam = "NAVCAM";
302307
303308
var vm = this;
304309
@@ -378,7 +383,7 @@ export default {
378383
379384
380385
// set rover and camera for manifest api call
381-
const regexRovers = /SETROVER|curiosity|spirit|opportunity/gi;
386+
const regexRovers = /SETROVER|curiosity|spirit|opportunity|perseverance/gi;
382387
this.manifestUrl = this.manifestUrl.replace(regexRovers, this.rover.toLowerCase())
383388
384389
var vm = this;
@@ -482,7 +487,6 @@ export default {
482487
this.initPanelPicture()
483488
484489
this.getRandomPic()
485-
486490
487491
}
488492

0 commit comments

Comments
 (0)