HOW to configure CAN-based accelerator pedal #4369
This commit is contained in:
parent
1e983d31e8
commit
b848a819b4
|
@ -91,6 +91,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void init(bool isFordTps, RedundantFordTps* fordTps, const TpsConfig& primary, const TpsConfig& secondary) {
|
void init(bool isFordTps, RedundantFordTps* fordTps, const TpsConfig& primary, const TpsConfig& secondary) {
|
||||||
|
bool hasFirst = m_pri.init(primary);
|
||||||
|
if (!hasFirst) {
|
||||||
|
// no input if we have no first channel
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// Check that the primary and secondary aren't too close together - if so, the user may have done
|
// Check that the primary and secondary aren't too close together - if so, the user may have done
|
||||||
// an unsafe thing where they wired a single sensor to both inputs. Don't do that!
|
// an unsafe thing where they wired a single sensor to both inputs. Don't do that!
|
||||||
|
@ -104,8 +110,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pri.init(primary);
|
|
||||||
|
|
||||||
bool hasSecond = m_sec.init(secondary);
|
bool hasSecond = m_sec.init(secondary);
|
||||||
|
|
||||||
if (isFordTps && fordTps) {
|
if (isFordTps && fordTps) {
|
||||||
|
|
Loading…
Reference in New Issue