Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
mission_logic.cpp
Go to the documentation of this file.
1
#include "
common_lib/competition_logic/mission_logic.hpp
"
2
3
namespace
common_lib::competition_logic
{
4
std::string
get_mission_string
(
int
mission) {
5
return
MISSION_STRING_MAP
.find(
static_cast<
Mission
>
(mission))->second;
6
}
7
8
bool
operator==
(
const
Mission
& mission,
const
int
& value) {
9
return
static_cast<
int
>
(mission) == value;
10
}
11
12
bool
operator==
(
const
int
& value,
const
Mission
& mission) {
13
return
static_cast<
int
>
(mission) == value;
14
}
15
16
Mission
get_mission_from_eufs
(
unsigned
short
eufs_mission) {
17
return
eufs_to_system
.find(eufs_mission)->second;
18
}
19
20
}
// namespace common_lib::competition_logic
mission_logic.hpp
common_lib::competition_logic
Enum for colors.
Definition
color.hpp:10
common_lib::competition_logic::get_mission_string
std::string get_mission_string(int mission)
Definition
mission_logic.cpp:4
common_lib::competition_logic::operator==
bool operator==(const Color &color, const int &value)
Definition
color.cpp:24
common_lib::competition_logic::MISSION_STRING_MAP
const std::map< Mission, std::string > MISSION_STRING_MAP
Definition
mission_logic.hpp:26
common_lib::competition_logic::eufs_to_system
const std::unordered_map< unsigned short, Mission > eufs_to_system
Definition
mission_logic.hpp:39
common_lib::competition_logic::get_mission_from_eufs
Mission get_mission_from_eufs(unsigned short eufs_mission)
Definition
mission_logic.cpp:16
common_lib::competition_logic::Mission
Mission
Definition
mission_logic.hpp:11
src
common_lib
src
competition_logic
mission_logic.cpp
Generated by
1.9.8