This makes checking the bounds possible.
if (!checkGenericParameters(params))
return false;
- if (!checkBoundsInclusive(params->strongMagnitude, static_cast<quint16>(0), static_cast<quint16>(0xFFFF))) {
+ if (!checkBoundsInclusive(params->strongMagnitude, 0, 0xFFFF)) {
reportError("Strong magnitude out of bounds");
return false;
}
- if (!checkBoundsInclusive(params->weakMagnitude, static_cast<quint16>(0), static_cast<quint16>(0xFFFF))) {
+ if (!checkBoundsInclusive(params->weakMagnitude, 0, 0xFFFF)) {
reportError("Weak magnitude out of bounds");
return false;
}
return magnitudeFromString(weak, weakMagnitude);
}
-bool FFBRumbleEffectParameters::magnitudeFromString(const QString& str, quint16& val)
+bool FFBRumbleEffectParameters::magnitudeFromString(const QString& str, int& val)
{
bool ok;
val = str.toInt(&ok);
bool strongMagnitudeFromString(const QString& strong);
bool weakMagnitudeFromString(const QString& weak);
- quint16 strongMagnitude;
- quint16 weakMagnitude;
+ int strongMagnitude;
+ int weakMagnitude;
private:
- bool magnitudeFromString(const QString& str, quint16& val);
+ bool magnitudeFromString(const QString& str, int& val);
};
#endif // FFBRUMBLEEFFECTPARAMETERS_H
#define APP_NAME "FFBChecker"
static const int APP_VERSION_MAJOR(0);
static const int APP_VERSION_MINOR(3);
-static const char APP_VERSION_REL('a');
+static const char APP_VERSION_REL('b');
enum class FFBEffectTypes { NONE, CONSTANT, PERIODIC, RAMP, CONDITION, RUMBLE };
enum class PeriodicWaveforms { NONE, SQUARE, TRIANGLE, SINE, SAW_UP, SAW_DOWN };