| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 1 | /* | |||
| 2 | * @file toyota_jz.cpp | |||
| 3 | * | |||
| 4 | * toyota aristo | |||
| 5 | * https://en.wikipedia.org/wiki/Lexus_GS | |||
| 6 | * http://rusefi.com/forum/viewtopic.php?f=15&t=969 | |||
| 7 | * | |||
| 8 | * http://wilbo666.pbworks.com/w/page/37134472/2JZ-GTE%20JZS147%20Aristo%20Engine%20Wiring | |||
| 9 | * | |||
| 10 | * NON VVTi | |||
| 11 | * set engine_type 38 | |||
| 12 | * | |||
| 13 | * VVTi | |||
| 14 | * set engine_type 44 | |||
| 15 | * | |||
| 16 | * @date Dec 30, 2015 | |||
| 17 | * @author Andrey Belomutskiy, (c) 2012-2020 | |||
| 18 | */ | |||
| 19 | ||||
| 20 | #include "pch.h" | |||
| 21 | ||||
| 22 | #include "toyota_jz.h" | |||
| 23 | #include "custom_engine.h" | |||
| 24 | #include "mazda_miata_vvt.h" | |||
| 25 | ||||
| 26 | 1 | static void common2jz() { | ||
| 27 | 1 | strcpy(engineConfiguration->engineMake, ENGINE_MAKE_TOYOTA); | ||
| 28 | 1 | strcpy(engineConfiguration->engineCode, "2JZ"); | ||
| 29 | 1 | strcpy(engineConfiguration->vehicleName, "VVT example"); | ||
| 30 | ||||
| 31 | 1 | engineConfiguration->displacement = 3.0; | ||
| 32 | 1 | engineConfiguration->cylindersCount = 6; | ||
| 33 | 1 | engineConfiguration->firingOrder = FO_1_5_3_6_2_4; | ||
| 34 | // set ignition_mode 1 | |||
| 35 | 1 | engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; | ||
| 36 | ||||
| 37 | 1 | engineConfiguration->fuelPumpPin = Gpio::Unassigned; | ||
| 38 | ||||
| 39 | // chartsize 450 | |||
| 40 | 1 | engineConfiguration->engineChartSize = 450; | ||
| 41 | ||||
| 42 | 1 | engineConfiguration->map.sensor.type = MT_CUSTOM; | ||
| 43 | ||||
| 44 | 1 | engineConfiguration->injector.flow = 430; | ||
| 45 | ||||
| 46 | /** | |||
| 47 | * http://thesafetyaversionsociety.com/wordpress/wp-content/uploads/2010/08/Troubleshooting-2JZ-GTE.pdf | |||
| 48 | * pages 44&46 | |||
| 49 | */ | |||
| 50 | 1 | engineConfiguration->clt.config = {-20, 40, 120.0, 15000, 1200, 200.0, 2700}; | ||
| 51 | 1 | engineConfiguration->iat.config = {-20, 40, 120.0, 15000, 1200, 200.0, 2700}; | ||
| 52 | ||||
| 53 | 1 | } | ||
| 54 | ||||
| 55 | /** | |||
| 56 | * TOYOTA_2JZ_GTE_VVTi | |||
| 57 | * set engine_type 44 | |||
| 58 | */ | |||
| 59 | 1 | void setToyota_2jz_vics() { | ||
| 60 | 1 | common2jz(); | ||
| 61 | ||||
| 62 | 1 | setCrankOperationMode(); | ||
| 63 | 1 | engineConfiguration->trigger.type = trigger_type_e::TT_TOOTHED_WHEEL_36_2; | ||
| 64 | ||||
| 65 | 1 | engineConfiguration->vvtMode[0] = VVT_TOYOTA_3_TOOTH; | ||
| 66 | ||||
| 67 | // set global_trigger_offset_angle 155 | |||
| 68 | 1 | engineConfiguration->globalTriggerAngleOffset = 155; // todo | ||
| 69 | ||||
| 70 | 1 | engineConfiguration->ignitionMode = IM_WASTED_SPARK; // just for now | ||
| 71 | 1 | engineConfiguration->injectionMode = IM_BATCH; // just for now | ||
| 72 | 1 | engineConfiguration->twoWireBatchIgnition = true; | ||
| 73 | ||||
| 74 | // todo: these magic values would be hardcoded once we find out proper magic values! | |||
| 75 | // engineConfiguration->scriptSetting[4] = 175 - 45; | |||
| 76 | // engineConfiguration->scriptSetting[5] = 175 + 45; | |||
| 77 | ||||
| 78 | 1 | } | ||
| 79 |