mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
d/opengloves: Clarify encoding constants
This commit is contained in:
parent
f953ed7846
commit
c83c21ef90
|
@ -90,7 +90,7 @@ opengloves_alpha_encoding_is_key_character(const char character)
|
||||||
return opengloves_alpha_encoding_key_characters.find(character) != std::string::npos;
|
return opengloves_alpha_encoding_key_characters.find(character) != std::string::npos;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const std::map<std::string, int> opengloves_alpha_encoding_key_string{
|
static const std::map<std::string, int> opengloves_alpha_encoding_input_key_string{
|
||||||
{"A", OPENGLOVES_ALPHA_ENCODING_FinThumb}, // whole thumb curl (default curl value for thumb joints)
|
{"A", OPENGLOVES_ALPHA_ENCODING_FinThumb}, // whole thumb curl (default curl value for thumb joints)
|
||||||
{"(AB)", OPENGLOVES_ALPHA_ENCODING_FinSplayThumb}, // whole thumb splay thumb joint 3 (doesn't exist, but keeps
|
{"(AB)", OPENGLOVES_ALPHA_ENCODING_FinSplayThumb}, // whole thumb splay thumb joint 3 (doesn't exist, but keeps
|
||||||
// consistency with the other fingers
|
// consistency with the other fingers
|
||||||
|
@ -180,9 +180,9 @@ opengloves_alpha_encoding_parse_to_map(const std::string &str)
|
||||||
|
|
||||||
// Even if the value is empty we still want to use the key, it means that we have a button that
|
// Even if the value is empty we still want to use the key, it means that we have a button that
|
||||||
// is pressed (it only appears in the packet if it is)
|
// is pressed (it only appears in the packet if it is)
|
||||||
if (opengloves_alpha_encoding_key_string.find(key) !=
|
if (opengloves_alpha_encoding_input_key_string.find(key) !=
|
||||||
opengloves_alpha_encoding_key_string.end())
|
opengloves_alpha_encoding_input_key_string.end())
|
||||||
result.insert_or_assign(opengloves_alpha_encoding_key_string.at(key), value);
|
result.insert_or_assign(opengloves_alpha_encoding_input_key_string.at(key), value);
|
||||||
else
|
else
|
||||||
U_LOG_W("Unable to insert key: %s into input map as it was not found", key.c_str());
|
U_LOG_W("Unable to insert key: %s into input map as it was not found", key.c_str());
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in a new issue