diff --git a/ardustim/.vscode/extensions.json b/ardustim/.vscode/extensions.json index 0f0d740..080e70d 100644 --- a/ardustim/.vscode/extensions.json +++ b/ardustim/.vscode/extensions.json @@ -1,7 +1,10 @@ -{ - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format - "recommendations": [ - "platformio.platformio-ide" - ] -} +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "platformio.platformio-ide" + ], + "unwantedRecommendations": [ + "ms-vscode.cpptools-extension-pack" + ] +} diff --git a/ardustim/src/ardustim.ino b/ardustim/src/ardustim.ino index 86af8ad..3179f6a 100644 --- a/ardustim/src/ardustim.ino +++ b/ardustim/src/ardustim.ino @@ -116,6 +116,11 @@ wheels Wheels[MAX_WHEELS] = { { mitsubishi_3A92_friendly_name, mitsubishi_3A92, 0.6, 144, 720 }, { Toyota_4AGE_CAS_friendly_name, toyota_4AGE_CAS, 0.333, 144, 720 }, { Toyota_4AGZE_friendly_name, toyota_4AGZE, 0.333, 144, 720 }, + { rover_mems_mode1_thirtysix_minus_one_one_friendly_name, rover_mems_mode1_thirtysix_minus_one_one, 0.6, 72, 360 }, + { rover_mems_mode2_thirtysix_minus_one_one_one_one_friendly_name, rover_mems_mode2_thirtysix_minus_one_one_one_one, 0.6, 144, 720 }, + { rover_mems_mode3_thirtysix_minus_one_one_one_one_friendly_name, rover_mems_mode3_thirtysix_minus_one_one_one_one, 0.6, 144, 720 }, + { rover_mems_mode4_thirtysix_minus_one_one_one_one_friendly_name, rover_mems_mode4_thirtysix_minus_one_one_one_one, 0.6, 144, 720 }, + { rover_mems_mode5_thirtysix_minus_one_one_one_one_friendly_name, rover_mems_mode5_thirtysix_minus_one_one_one_one, 0.6, 144, 720 } }; /* Initialization */ diff --git a/ardustim/src/wheel_defs.h b/ardustim/src/wheel_defs.h index 8ceab68..5e7ebfa 100644 --- a/ardustim/src/wheel_defs.h +++ b/ardustim/src/wheel_defs.h @@ -114,7 +114,12 @@ MITSUBISHI_3A92, /* Mitsubishi 3cylinder 3A92 */ TOYOTA_4AGE_CAS, /*Toyota 4AGE CAS, 4 teeth and one cam tooth*/ TOYOTA_4AGZE, /*Toyota 4AGZE, 24 teeth and one cam tooth*/ - MAX_WHEELS, + ROVER_K_MODE1_36_ONE_ONE, /* MEMS pattern 1 36-1-1 with teeth as 17 gap 17 gap */ + ROVER_K_MODE2_36_ONE_ONE_ONE_ONE, /* MEMS pattern 2 36-1-1-1-1 with teeth as 11 gap 5 gap 12 gap 4 gap */ + ROVER_K_MODE3_36_ONE_ONE_ONE_ONE, /* MEMS pattern 3 36-1-1-1-1 with teeth as 2 gap 14 gap 3 gap 13 gap */ + ROVER_K_MODE4_36_ONE_ONE_ONE_ONE, /* MEMS pattern 4 36-1-1-1-1 with teeth as 3 gap 14 gap 2 gap 13 gap */ + ROVER_K_MODE5_36_ONE_ONE_ONE_ONE, /* MEMS pattern 5 36-1-1-1-1 with teeth as 9 gap 7 gap 10 gap 6 gap */ + MAX_WHEELS }WheelType; /* Name strings for EACH wheel type, for serial UI */ @@ -171,6 +176,11 @@ const char mitsubishi_3A92_friendly_name[] PROGMEM = "Mitsubishi 3A92"; const char Toyota_4AGE_CAS_friendly_name[] PROGMEM = "Toyota 4AGE"; const char Toyota_4AGZE_friendly_name[] PROGMEM = "Toyota 4AGZE"; + const char rover_mems_mode1_thirtysix_minus_one_one_friendly_name[] PROGMEM = "Rover 36-1-1 flywheel EARLY MEMS"; + const char rover_mems_mode2_thirtysix_minus_one_one_one_one_friendly_name[] PROGMEM = "Rover 36-1-1-1-1 11 gap 5 gap 12 gap 4 gap"; + const char rover_mems_mode3_thirtysix_minus_one_one_one_one_friendly_name[] PROGMEM = "Rover 36-1-1-1-1 2 gap 14 gap 3 gap 13 gap"; + const char rover_mems_mode4_thirtysix_minus_one_one_one_one_friendly_name[] PROGMEM = "Rover 36-1-1-1-1 3 gap 14 gap 2 gap 13 gap"; + const char rover_mems_mode5_thirtysix_minus_one_one_one_one_friendly_name[] PROGMEM = "Rover 36-1-1-1-1 9 gap 7 gap 10 gap 6 gap"; /* Very simple 50% duty cycle */ @@ -1207,4 +1217,103 @@ 1,1,0,0,0,0,0,0,0,0,0,0, 1,1,0,0,0,0,0,0,0,0,0,0, }; + +/* Rover MEMS engine tooth patterns. 4 available. 1st isn't commoon (36-1-1). 2,3 and 4 are the most common. + * Pattern 1 is MEMS 1.0,1.3,1.6 36-1-1 with the teeth grouped 17-17- + * Pattern 2 is MEMS 1.9 36-1-1-1-1 with the teeth grouped 12-4-11-5 with gaps at 120, 180, 310, 360 + * Pattern 3 is MEMS 2.0 36-1-1-1-1 with the teeth grouped 14-3-13-2 with gaps at 80, 110, 260, 300 + * Pattern 4 is MEMS 3.0 36-1-1-1-1 with the teeth grouped 14-2-13-3 with gaps at 80, 120, 270, 300 + */ + + const unsigned char rover_mems_mode1_thirtysix_minus_one_one [] PROGMEM = + { + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,0,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 0,0 + }; + + const unsigned char rover_mems_mode2_thirtysix_minus_one_one_one_one [] PROGMEM = + { + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,0,0,1,0,1,0,1,0, + 1,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,3,2, + 2,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,3,2, + 3,2,3,0,1,0,0,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,0,0,1,0,1,0,1,0, + 1,0,0,0 + }; + + const unsigned char rover_mems_mode3_thirtysix_minus_one_one_one_one [] PROGMEM = + { + 1,0,1,0,0,0,1,0,1,0, + 0,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,2,3,2,3,2,3,2,3,2, + 2,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,3,2,3,2,2,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,0,1,0,1,0,1,0, + 1,0,0,0,1,0,1,0,1,0, + 0,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0 + }; + + + + const unsigned char rover_mems_mode4_thirtysix_minus_one_one_one_one [] PROGMEM = + { + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,0,0,1,0, + 1,0,1,0,0,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0, + 1,2,3,2,3,2,3,2,3,2, + 3,2,3,2,2,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,3,2,3,2,2,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,1,0,1,0,1,0, + 1,0,1,0,1,0,0,0,1,0, + 1,0,0,0,1,0,1,0,1,0, + 1,0,1,0 + }; + +const unsigned char rover_mems_mode5_thirtysix_minus_one_one_one_one [] PROGMEM = + { + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,0,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,0,0,1,0,1,0, + 1,2,3,2,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, + 2,2,3,2,3,2,3,2,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,2,2,3,2, + 3,2,3,2,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,0,0, + 1,0,1,0,1,0,1,0,1,0, + 1,0,0,0 + }; + + #endif