Error message improved
This commit is contained in:
parent
891af0a8b6
commit
129c47a26c
2 changed files with 6 additions and 2 deletions
2
README
2
README
|
@ -172,7 +172,7 @@ joystick more sensitive. A setting of:
|
|||
./xboxdrv --calibration X2=-16384:0:16384
|
||||
|
||||
Will cause the joystick device report maximum position when your
|
||||
joystick is only moved half the way.
|
||||
stick is only moved half the way.
|
||||
|
||||
[[ Square Axis ]]
|
||||
-----------------
|
||||
|
|
|
@ -93,6 +93,7 @@ CalibrationMapping CalibrationMapping::from_string(const std::string& str)
|
|||
|
||||
if (!i->empty())
|
||||
{
|
||||
try {
|
||||
if (j == 0)
|
||||
mapping.min = boost::lexical_cast<int>(*i);
|
||||
else if (j == 1)
|
||||
|
@ -100,7 +101,10 @@ CalibrationMapping CalibrationMapping::from_string(const std::string& str)
|
|||
else if (j == 2)
|
||||
mapping.max = boost::lexical_cast<int>(*i);
|
||||
else
|
||||
throw std::runtime_error("To many arguments given, syntax is 'AXIS=MIN:CENTER:MAX': " + str);
|
||||
throw std::runtime_error("--calibration: to many arguments given, syntax is 'AXIS=MIN:CENTER:MAX': " + str);
|
||||
} catch(boost::bad_lexical_cast&) {
|
||||
throw std::runtime_error("--calibration: couldn't convert '" + *i + "' to int");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue