Skip to content

Commit 2e66ad3

Browse files
authored
Merge pull request #50 from topcoderinc/Take_Picture_Command
Take picture command
2 parents 7ad6a1f + f373361 commit 2e66ad3

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

src/components/InfoWindow/InfoWindow.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class InfoWindow extends Component {
3232
commandText = `Waypoint (${this.props.command} / ${this.getType()} ) `;
3333
} else if (this.props.command === 21) {
3434
commandText = `Land (${this.props.command} / ${this.getType()} ) `;
35+
} else if (this.props.command === 203) {
36+
commandText = `Take a Picture (${this.props.command} / ${this.getType()} ) `;
3537
}
3638

3739
return commandText;

src/components/InfoWindow/data/commands.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ const commands = [
3838
{
3939
value: 112,
4040
label: 'MAV_CMD_CONDITION_DELAY'
41+
},
42+
{
43+
value: 203,
44+
label: 'Take a Picture'
4145
}
4246
]
4347

src/routes/MissionPlanner/components/MissionPlannerView.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ export const getMarkerProps = (item, updateMissionItem) => {
6666

6767
export const MissionPlannerView = ({mission, updateMissionItem, addMissionItem, deleteMissionItem, loadNfz, noFlyZones}) => {
6868
const missionItemsExt = getMissionItemsExt(mission);
69-
const markersExt = missionItemsExt.map((item) => getMarkerProps(item, updateMissionItem));
69+
const filteredMissionItemsExt = missionItemsExt.filter((item) => {
70+
return (item.command !== 203);
71+
});
72+
const markersExt = filteredMissionItemsExt.map((item) => getMarkerProps(item, updateMissionItem));
7073

7174
return (
7275
<div styleName="mission-planner-view">

src/routes/MissionPlanner/components/MissionSidebarItem/MissionSidebarItem.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export class MissionSidebarItem extends Component {
4646
commandText = `Waypoint (${this.props.command} / ${this.getType()} ) `;
4747
} else if (this.props.command === 21) {
4848
commandText = `Land (${this.props.command} / ${this.getType()} ) `;
49+
} else if (this.props.command === 203) {
50+
commandText = `Take a Picture (${this.props.command} / ${this.getType()} ) `;
4951
}
5052

5153
return commandText;

src/routes/MissionPlanner/components/MissionSidebarItem/data/commands.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ const commands = [
3838
value: 112,
3939
label: 'MAV_CMD_CONDITION_DELAY',
4040
},
41+
{
42+
value: 203,
43+
label: 'Take a Picture',
44+
},
4145
];
4246

4347
export default commands;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy