Created
November 4, 2018 23:13
-
-
Save johnxx/fbacdfcd589932cae62748ce9e560c62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ardustim/ISRs.cpp b/ardustim/ISRs.cpp | |
index 813dc3e..c4a722e 100644 | |
--- a/ardustim/ISRs.cpp | |
+++ b/ardustim/ISRs.cpp | |
@@ -79,6 +79,7 @@ wheels Wheels[MAX_WHEELS] = { | |
{ oddfire_vr_friendly_name, oddfire_vr, 0.2, 24 }, | |
{ optispark_lt1_friendly_name, optispark_lt1, 3.0, 720 }, | |
{ twelve_minus_three_friendly_name, twelve_minus_three, 0.4, 48 }, | |
+ { subaru_six_seven_name_friendly_name, subaru_six_seven, 3.0, 720 }, | |
{ thirty_six_minus_two_two_two_friendly_name, thirty_six_minus_two_two_two, 0.6, 72 }, | |
{ thirty_six_minus_two_two_two_with_cam_friendly_name, thirty_six_minus_two_two_two_with_cam, 0.6, 144 }, | |
{ fourty_two_hundred_wheel_friendly_name, fourty_two_hundred_wheel, 0.6, 72 }, | |
diff --git a/ardustim/user_defaults.h b/ardustim/user_defaults.h | |
index 903721d..acdfbd4 100644 | |
--- a/ardustim/user_defaults.h | |
+++ b/ardustim/user_defaults.h | |
@@ -25,7 +25,6 @@ | |
#include "wheel_defs.h" | |
-#define DEFAULT_RPM 6000 | |
-#define DEFAULT_WHEEL DIZZY_FOUR_CYLINDER | |
- | |
+#define DEFAULT_RPM 4500 | |
+#define DEFAULT_WHEEL THIRTY_SIX_MINUS_TWO_TWO_TWO_WITH_CAM | |
#endif | |
diff --git a/ardustim/wheel_defs.h b/ardustim/wheel_defs.h | |
index 18435b3..541fd27 100644 | |
--- a/ardustim/wheel_defs.h | |
+++ b/ardustim/wheel_defs.h | |
@@ -20,10 +20,10 @@ | |
* | |
*/ | |
- #ifndef __WHEEL_DEFS_H__ | |
- #define __WHEEL_DEFS_H__ | |
- | |
- #include <avr/pgmspace.h> | |
+#ifndef __WHEEL_DEFS_H__ | |
+#define __WHEEL_DEFS_H__ | |
+ | |
+#include <avr/pgmspace.h> | |
#include <SerialUI.h> | |
/* Wheel patterns! | |
@@ -79,6 +79,7 @@ | |
ODDFIRE_VR, /* Oddfire V-twin */ | |
OPTISPARK_LT1, /* Optispark 360 and 8 */ | |
TWELVE_MINUS_THREE, /* 12-3 */ | |
+ SUBARU_SIX_SEVEN, /* Subaru 6 crank, 7 cam */ | |
THIRTY_SIX_MINUS_TWO_TWO_TWO, /* 36-2-2-2 crank only */ | |
THIRTY_SIX_MINUS_TWO_TWO_TWO_WITH_CAM, /* 36-2-2-2 crank and cam */ | |
FOURTY_TWO_HUNDRED_WHEEL, /* 4200 wheel */ | |
@@ -124,6 +125,7 @@ | |
const char oddfire_vr_friendly_name[] PROGMEM = "odd fire 90 deg pattern 0 and 135 pulses"; | |
const char optispark_lt1_friendly_name[] PROGMEM = "GM OptiSpark LT1 360 and 8"; | |
const char twelve_minus_three_friendly_name[] PROGMEM = "12-3 oddball"; | |
+ const char subaru_six_seven_name_friendly_name[] PROGMEM = "Subaru 6/7 crank and cam"; | |
const char thirty_six_minus_two_two_two_friendly_name[] PROGMEM = "36-2-2-2 Crank only"; | |
const char thirty_six_minus_two_two_two_with_cam_friendly_name[] PROGMEM = "36-2-2-2 Crank and cam"; | |
const char fourty_two_hundred_wheel_friendly_name[] PROGMEM = "GM 4200 crank wheel"; | |
@@ -414,6 +416,53 @@ | |
1,0,0,0,0,0,0,0, /* Tooth 9 and MISSING 10th */ | |
0,0,0,0,0,0,0,0 /* MISSING Teeth 11-12 */ | |
}; | |
+ | |
+ const unsigned char subaru_six_seven[] PROGMEM = | |
+ { /* 6/7 */ | |
+ /* Cyl 1 TDC */ | |
+ 0,0,0,0,0,2,2,2,0,2, 2,2,2,0,2,2,2,0,0,0, /* 00-19 degrees - cam 1-2-3: 5* ATDC */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 20-39 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 40-59 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 60-20 degrees */ | |
+ 0,0,0,1,1,1,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 80-99 degrees - crank 1: 83* ATDC */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,1,1,0,0, /* 100 degrees - crank 2: 115* ATDC */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 120 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 140 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 1,1,1,0,0,0,0,0,0,0, /* 160 degrees - crank 3: 170* ATDC */ | |
+ | |
+ /* Cyl 2 TDC */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 180 degrees */ | |
+ 2,2,2,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 200 degrees - cam 4: 20* ATDC (200*) */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 220 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 240 degrees */ | |
+ 0,0,0,1,1,1,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 260 degrees - crank 4: 83* ATDC (263*) */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,1,1,0,0, /* 280 degrees - crank 5: 115* ATDC (295*) */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 300 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 320 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 1,1,1,0,0,0,0,0,0,0, /* 340 degrees - crank 6: 170* ATDC (350*) */ | |
+ | |
+ /* Cyl 3 TDC */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 360 degrees */ | |
+ 2,2,2,0,2,2,2,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 380 degrees - cam 5-6: 20* ATDC (380*) */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 400 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 420 degrees */ | |
+ 0,0,0,1,1,1,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 440 degrees - crank 1: 83* ATDC (443*) */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,1,1,0,0, /* 460 degrees - crank 2: 115* ATDC (475*) */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 480 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 500 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 1,1,1,0,0,0,0,0,0,0, /* 520 degrees - crank 3: 170* ATDC */ | |
+ | |
+ /* Cyl 4 TDC */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 540 degrees */ | |
+ 2,2,2,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 560 degrees - cam 7: 20* ATDC (560*) */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 580 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 600 degrees */ | |
+ 0,0,0,1,1,1,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 620 degrees - crank 4: 83* ATDC (623*) */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,1,1,0,0, /* 640 degrees - crank 5: 115* ATDC (655*) */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 660 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, /* 680 degrees */ | |
+ 0,0,0,0,0,0,0,0,0,0, 1,1,1,0,0,0,0,0,0,0 /* 700 degrees - crank 6: 170* ATDC (710*) */ | |
+ }; | |
// const unsigned char thirty_six_minus_two_two_two[] PROGMEM = "CM1/2,36,1t,2m,1t,2m,16t,2m,12t"; | |
const unsigned char thirty_six_minus_two_two_two[] PROGMEM = | |
diff --git a/platformio.ini b/platformio.ini | |
index 2d3af41..49c6558 100644 | |
--- a/platformio.ini | |
+++ b/platformio.ini | |
@@ -11,4 +11,6 @@ | |
[env:uno] | |
platform = atmelavr | |
board = uno | |
+upload_port = /dev/ttyUSB0 | |
+monitor_port = /dev/ttyUSB0 | |
framework = arduino |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment