35 static const char*
const str[] = {
36 "ALIGNMENT",
"DEGRADED",
"READY", 0,
37 "ROLLPITCH",
"YAW",
"PSEUDO_ROLLPITCH",
"PSEUDO_YAW",
38 "RATE_XY",
"RATE_Z",
"PSEUDO_RATE_XY",
"PSEUDO_RATE_Z",
39 "VELOCITY_XY",
"VELOCITY_Z",
"PSEUDO_VELOCITY_XY",
"PSEUDO_VELOCITY_Z",
40 "POSITION_XY",
"POSITION_Z",
"PSEUDO_POSITION_XY",
"PSEUDO_POSITION_Z",
43 if (asterisk_status) {
44 for(
unsigned int i = 0; i <
sizeof(str)/
sizeof(*str); ++i) {
45 if (asterisk_status & (1 << i)) {
46 result +=
"*" + std::string(str[i]) +
" ";
50 if (asterisk_status != status) result +=
"(";
53 for(
unsigned int i = 0; i <
sizeof(str)/
sizeof(*str); ++i) {
54 if (status & (1 << i)) {
55 if (asterisk_status & (1 << i))
continue;
56 result += std::string(str[i]) +
" ";
59 if (result.size() > 0) result.resize(result.size() - 1);
61 if (asterisk_status && (asterisk_status != status)) {
std::string getSystemStatusString(const SystemStatus &status, const SystemStatus &asterisk_status=0)
unsigned int SystemStatus