-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathffbconditioneffectparameters.cpp
More file actions
67 lines (52 loc) · 1.37 KB
/
Copy pathffbconditioneffectparameters.cpp
File metadata and controls
67 lines (52 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include "ffbconditioneffectparameters.h"
FFBConditionEffectParameters::FFBConditionEffectParameters() :
FFBEffectParameters()
{}
bool FFBConditionEffectParameters::centerFromString(const QString& center, Axis a)
{
bool ok = false;
int val = center.toInt(&ok);
if (!ok) return false;
this->center[a] = val;
return true;
}
bool FFBConditionEffectParameters::deadbandFromString(const QString& deadband, Axis a)
{
bool ok = false;
int val = deadband.toInt(&ok);
if (!ok) return false;
this->deadband[a] = val;
return true;
}
bool FFBConditionEffectParameters::leftCoeffFromString(const QString& leftCoeff, Axis a)
{
bool ok = false;
int val = leftCoeff.toInt(&ok);
if (!ok) return false;
this->leftCoeff[a] = val;
return true;
}
bool FFBConditionEffectParameters::rightCoeffFromString(const QString& rightCoeff, Axis a)
{
bool ok = false;
int val = rightCoeff.toInt(&ok);
if (!ok) return false;
this->rightCoeff[a] = val;
return true;
}
bool FFBConditionEffectParameters::leftSatFromString(const QString& leftSat, Axis a)
{
bool ok = false;
int val = leftSat.toInt(&ok);
if (!ok) return false;
this->leftSat[a] = val;
return true;
}
bool FFBConditionEffectParameters::rightSatFromString(const QString& rightSat, Axis a)
{
bool ok = false;
int val = rightSat.toInt(&ok);
if (!ok) return false;
this->rightSat[a] = val;
return true;
}