HOW to configure CAN-based accelerator pedal #4369

This commit is contained in:
rusefillc 2022-07-28 09:46:19 -04:00
parent 1e983d31e8
commit b848a819b4
1 changed files with 6 additions and 2 deletions

View File

@ -91,6 +91,12 @@ public:
}
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
// 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);
if (isFordTps && fordTps) {