2023-09-19 13:50:52 -07:00
|
|
|
|
|
|
|
#include "pch.h"
|
|
|
|
#include "defaults.h"
|
|
|
|
#include "proteus_meta.h"
|
|
|
|
#include "canam.h"
|
2023-09-21 11:16:09 -07:00
|
|
|
#include "lua_lib.h"
|
2023-09-19 13:50:52 -07:00
|
|
|
|
|
|
|
// set engine_type 54
|
2023-09-19 14:01:57 -07:00
|
|
|
// https://www.youtube.com/watch?v=j8DOFp02QDY
|
2023-09-19 13:50:52 -07:00
|
|
|
void setMaverickX3() {
|
2023-09-19 14:01:57 -07:00
|
|
|
strcpy(engineConfiguration->engineMake, "Rotax");
|
|
|
|
strcpy(engineConfiguration->engineCode, "900 ACE");
|
|
|
|
|
2023-09-19 13:50:52 -07:00
|
|
|
engineConfiguration->cylindersCount = 3;
|
2023-09-20 09:50:31 -07:00
|
|
|
engineConfiguration->firingOrder = FO_1_2_3;
|
2023-09-21 11:16:09 -07:00
|
|
|
engineConfiguration->displacement = 0.9;
|
2023-09-19 13:50:52 -07:00
|
|
|
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
|
|
|
|
|
|
|
#if HW_PROTEUS
|
2023-10-06 17:05:34 -07:00
|
|
|
engineConfiguration->vehicleSpeedSensorInputPin = PROTEUS_DIGITAL_5;
|
2023-09-24 14:58:19 -07:00
|
|
|
engineConfiguration->auxAnalogInputs[0] = PROTEUS_IN_ANALOG_VOLT_4;
|
2023-09-21 11:16:09 -07:00
|
|
|
setPPSCalibration(0.25, 0.5, 1.5, 3);
|
|
|
|
// todo: matches Hyundai TODO extract method?
|
|
|
|
setTPS1Calibration(98, 926, 891, 69);
|
2023-09-19 13:50:52 -07:00
|
|
|
setProteusEtbIO();
|
2023-09-21 11:16:09 -07:00
|
|
|
engineConfiguration->starterControlPin = Gpio::PROTEUS_LS_14;
|
|
|
|
engineConfiguration->startStopButtonPin = PROTEUS_IN_AV_6_DIGITAL;
|
|
|
|
|
2023-10-03 19:38:51 -07:00
|
|
|
engineConfiguration->boostControlPin = Gpio::PROTEUS_LS_16;
|
|
|
|
|
|
|
|
gppwm_channel *icFanPwm = &engineConfiguration->gppwm[0];
|
|
|
|
icFanPwm->pin = Gpio::PROTEUS_LS_15;
|
|
|
|
|
|
|
|
gppwm_channel *accRelayPwm = &engineConfiguration->gppwm[1];
|
|
|
|
accRelayPwm->pin = Gpio::PROTEUS_LS_4;
|
2023-09-21 11:16:09 -07:00
|
|
|
#endif // HW_PROTEUS
|
|
|
|
|
2023-10-03 19:38:51 -07:00
|
|
|
strcpy(engineConfiguration->gpPwmNote[0], "IC Fan");
|
|
|
|
strcpy(engineConfiguration->gpPwmNote[1], "Acc Relay");
|
|
|
|
|
|
|
|
|
2023-09-21 11:16:09 -07:00
|
|
|
#if HW_PROTEUS
|
2023-09-21 19:06:44 -07:00
|
|
|
#include "canam_2021.lua"
|
2023-09-19 13:50:52 -07:00
|
|
|
#endif // HW_PROTEUS
|
|
|
|
|
|
|
|
}
|