Nissan
This commit is contained in:
parent
43e6cef77d
commit
9814264bdf
|
@ -143,6 +143,7 @@ void setBoardDefaultConfiguration(void) {
|
|||
engineConfiguration->isSdCardEnabled = true;
|
||||
|
||||
CONFIG(enableSoftwareKnock) = true;
|
||||
CONFIG(canNbcType) = CAN_BUS_NISSAN_VQ;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
|
|
|
@ -299,7 +299,14 @@ void canDashboardW202(CanCycle cycle) {
|
|||
|
||||
void canDashboardNissanVQ(CanCycle cycle) {
|
||||
if (cycle.isInterval(CI::_50ms)) {
|
||||
{
|
||||
CanTxMessage msg(NISSAN_RPM_CLT, 8);
|
||||
|
||||
msg[4] = ((int)(GET_RPM() / 4)) & 0xFF;
|
||||
msg[5] = ((int)(GET_RPM() / 4)) >> 8;
|
||||
|
||||
msg[7] = 0x70; // todo: CLT decoding?
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -362,6 +362,12 @@ void TriggerCentral::validateCamVvtCounters() {
|
|||
}
|
||||
}
|
||||
|
||||
void TriggerState::syncSymmetricalCrank(int mod, int remainder) {
|
||||
while (getTotalRevolutionCounter() % mod != remainder) {
|
||||
incrementTotalEventCounter();
|
||||
}
|
||||
}
|
||||
|
||||
void TriggerState::incrementTotalEventCounter() {
|
||||
totalRevolutionCounter++;
|
||||
}
|
||||
|
|
|
@ -91,6 +91,7 @@ public:
|
|||
*/
|
||||
bool isEvenRevolution() const;
|
||||
void incrementTotalEventCounter();
|
||||
void syncSymmetricalCrank(int mod, int remainder);
|
||||
efitime_t getTotalEventCounter() const;
|
||||
|
||||
void decodeTriggerEvent(
|
||||
|
|
Loading…
Reference in New Issue