From 3828ebf95d7362a1e518c43aaab3b6790a570238 Mon Sep 17 00:00:00 2001 From: Teemo Vaas Date: Sat, 8 Aug 2020 12:45:53 +0300 Subject: [PATCH] Add pattern ""4 cyl. Hall sensor dizzy with sparksensor" Add pattern ""4 cyl. Hall sensor dizzy with sparksensor" Tested this on Arduino Nano and it workid nicely. --- ardustim/src/ardustim.ino | 9 +++--- ardustim/src/user_defaults.h | 2 +- ardustim/src/wheel_defs.h | 63 +++++++++++------------------------- 3 files changed, 24 insertions(+), 50 deletions(-) diff --git a/ardustim/src/ardustim.ino b/ardustim/src/ardustim.ino index 27d63ab..5867726 100644 --- a/ardustim/src/ardustim.ino +++ b/ardustim/src/ardustim.ino @@ -103,16 +103,15 @@ wheels Wheels[MAX_WHEELS] = { { audi_135_with_cam_friendly_name, audi_135_with_cam, 1.5, 1080, 720 }, { honda_d17_no_cam_friendly_name, honda_d17_no_cam, 0.6, 144, 720 }, { mazda_323_au_friendly_name, mazda_323_au, 1, 30, 720 }, - { daihatsu_3cyl_friendly_name, daihatsu_3cyl, 0.8, 144, 360 }, + { daihatsu_3cyl_friendly_name, daihatsu_3cyl, 0.025, 144, 360 }, { miata_9905_friendly_name, miata_9905, 0.6, 144, 720 }, { twelve_with_cam_friendly_name, twelve_with_cam, 0.6, 144, 720 }, { twenty_four_with_cam_friendly_name, twelve_with_cam, 0.6, 144, 720 }, { subaru_six_seven_name_friendly_name, subaru_six_seven, 3.0, 720, 720 }, - { gm_seven_x_friendly_name, gm_seven_x, 1.502, 180, 720 }, + { gm_seven_x_friendly_name, gm_seven_x, 1.0, 180, 720 }, { four_twenty_a_friendly_name, four_twenty_a, 0.6, 144, 720 }, - { ford_st170_friendly_name, ford_st170, 0.6, 720, 720 }, - { mitsubishi_3A92_friendly_name, mitsubishi_3A92, 0.6, 144, 720 }, -}; + { spark_dizzy_4cyl_a_friendly_name, spark_dizzy_4cyl, 0.6, 144, 720 } +}; /* Initialization */ void setup() { diff --git a/ardustim/src/user_defaults.h b/ardustim/src/user_defaults.h index cbddb6c..36a943b 100644 --- a/ardustim/src/user_defaults.h +++ b/ardustim/src/user_defaults.h @@ -24,6 +24,6 @@ #include "wheel_defs.h" uint16_t wanted_rpm = 6000; -volatile uint8_t selected_wheel = FOUR_TWENTY_A; //GM_7X; //TWELVE_MINUS_ONE_WITH_CAM; //MITSUBISH_4g63_4_2; //TWELVE_MINUS_ONE_WITH_CAM; // // //DIZZY_FOUR_CYLINDER; // // //SUBARU_SIX_SEVEN; // // //THIRTY_SIX_MINUS_ONE_WITH_SECOND_TRIGGER; //DIZZY_FOUR_CYLINDER; // //MITSUBISH_4g63_4_2; //THREE_SIXTY_NISSAN_CAS; // //_WITH_CAM; // // //TWELVE_MINUS_ONE_WITH_CAM; //TWELVE_MINUS_THREE; // //GM_LS1_CRANK_AND_CAM; //SIX_G_SEVENTY_TWO_WITH_CAM; // //MIATA_9905; // // //SIXTY_MINUS_TWO_WITH_CAM; +volatile uint8_t selected_wheel = SPARK_DIZZY_4CYL; //GM_7X; //TWELVE_MINUS_ONE_WITH_CAM; //MITSUBISH_4g63_4_2; //TWELVE_MINUS_ONE_WITH_CAM; // // //DIZZY_FOUR_CYLINDER; // // //SUBARU_SIX_SEVEN; // // //THIRTY_SIX_MINUS_ONE_WITH_SECOND_TRIGGER; //DIZZY_FOUR_CYLINDER; // //MITSUBISH_4g63_4_2; //THREE_SIXTY_NISSAN_CAS; // //_WITH_CAM; // // //TWELVE_MINUS_ONE_WITH_CAM; //TWELVE_MINUS_THREE; // //GM_LS1_CRANK_AND_CAM; //SIX_G_SEVENTY_TWO_WITH_CAM; // //MIATA_9905; // // //SIXTY_MINUS_TWO_WITH_CAM; #endif diff --git a/ardustim/src/wheel_defs.h b/ardustim/src/wheel_defs.h index 3d50e6a..b130018 100644 --- a/ardustim/src/wheel_defs.h +++ b/ardustim/src/wheel_defs.h @@ -109,8 +109,7 @@ SUBARU_SIX_SEVEN, /* Subaru 6 crank, 7 cam */ GM_7X, /* GM 7X pattern. 6 even teeth with 1 extra uneven tooth */ FOUR_TWENTY_A, /* DSM 420a */ - FORD_ST170, /* Ford ST170 */ - MITSUBISHI_3A92, /* Mitsubishi 3cylinder 3A92 */ + SPARK_DIZZY_4CYL, /* 70/100 low/high ratio hall sensor dizzy with sparksensor for secondary*/ MAX_WHEELS, }WheelType; @@ -152,7 +151,7 @@ const char gm_eight_tooth_with_cam_friendly_name[] PROGMEM = "GM 8 even-tooth crank with 1 tooth cam"; const char volvo_d12acd_with_cam_friendly_name[] PROGMEM = "Volvo d12[acd] crank with 7 tooth cam"; const char mazda_thirty_six_minus_two_two_two_with_six_tooth_cam_friendly_name[] PROGMEM = "Mazda 36-2-2-2 with 6 tooht cam"; - const char mitsubishi_4g63_4_2_friendly_name[] PROGMEM = "Mitsubishi 4g63 aka 4/2 crank and cam"; + const char mitsubishi_4g63_4_2_friendly_name[] PROGMEM = "Mitsubish 4g63 aka 4/2 crank and cam"; const char audi_135_with_cam_friendly_name[] PROGMEM = "Audi 135 tooth crank and cam"; const char honda_d17_no_cam_friendly_name[] PROGMEM = "Honda D17 Crank (12+1)"; const char mazda_323_au_friendly_name[] PROGMEM = "Mazda 323 AU version"; @@ -163,9 +162,7 @@ const char subaru_six_seven_name_friendly_name[] PROGMEM = "Subaru 6/7 crank and cam"; const char gm_seven_x_friendly_name[] PROGMEM = "GM 7X"; const char four_twenty_a_friendly_name[] PROGMEM = "DSM 420a"; - const char ford_st170_friendly_name[] PROGMEM = "Ford ST170"; - const char mitsubishi_3A92_friendly_name[] PROGMEM = "Mitsubishi 3A92"; - + const char spark_dizzy_4cyl_a_friendly_name[] PROGMEM = "4 cyl. Hall sensor dizzy with sparksensor"; /* Very simple 50% duty cycle */ const unsigned char dizzy_four_cylinder[] PROGMEM = @@ -1100,43 +1097,21 @@ 3,3,3,3,3,1,1,1,1,1,1,0, 0,1,1,0,0,1,1,0,0,1,1,0 }; - - const unsigned char ford_st170[] PROGMEM = - { - 0,1,1,1,1,0,0,0,0,0,0,0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,1,1,1,1,0,0,0,0, - 0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0, - 0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0, - 0,1,1,1,1,1,0,0,0,0,0,1,3,3,3,3,2,2,2,2,2,3,3,3,3,3,2,2,2,2,2,3,3,3,3,3,3,2,2,2, - 2,3,3,3,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0, - 0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0 - }; - - const unsigned char mitsubishi_3A92[] PROGMEM = - { - 3,2,3,2,2,2,3,2,1,0,1,0, - 1,0,3,2,1,0,3,2,3,2,3,2, - 3,2,3,2,2,2,3,2,3,2,3,2, - 3,2,3,2,3,2,3,2,3,2,3,2, - 3,2,2,2,2,2,3,2,3,2,1,0, - 1,0,1,0,3,2,3,2,3,2,3,2, - 3,2,3,2,2,2,3,2,3,2,3,2, - 3,2,3,2,3,2,3,2,3,2,3,2, - 3,2,3,2,2,2,3,2,1,0,1,0, - 1,0,3,2,3,2,3,2,3,2,3,2, - 3,2,2,2,2,2,3,2,3,2,3,2, - 3,2,3,2,3,2,3,2,3,2,3,2 + + /* 70/110 degrees low to high ratio and sparksensor secondary */ + const unsigned char spark_dizzy_4cyl[] PROGMEM = + { //Split into 5 degree blocks (12 per line) + 0,0,0,0,0,0,0,0,0,0,0,0, + 2,2,3,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1, }; - #endif