auto-sync
This commit is contained in:
parent
0a25892420
commit
46bc98d4ea
|
@ -639,7 +639,7 @@ bool handlePlainCommand(ts_channel_s *tsChannel, uint8_t command) {
|
|||
scheduleMsg(&tsLogger, "Got naked Query command");
|
||||
handleQueryCommand(tsChannel, TS_PLAIN);
|
||||
return true;
|
||||
} else if (command == 't' || command == 'T') {
|
||||
} else if (command == TS_TEST_COMMAND || command == 'T') {
|
||||
handleTestCommand(tsChannel);
|
||||
return true;
|
||||
} else if (command == TS_PAGE_COMMAND) {
|
||||
|
|
|
@ -49,6 +49,7 @@ typedef struct {
|
|||
|
||||
#define TS_HELLO_COMMAND_DEPRECATED 'H'
|
||||
#define TS_HELLO_COMMAND 'S'
|
||||
#define TS_TEST_COMMAND 't'
|
||||
#define TS_LEGACY_HELLO_COMMAND 'Q'
|
||||
#define TS_OUTPUT_COMMAND 'O'
|
||||
#define TS_READ_COMMAND 'R'
|
||||
|
|
|
@ -127,6 +127,8 @@ case TT_HONDA_CBR_600:
|
|||
return "TT_HONDA_CBR_600";
|
||||
case TT_HONDA_CBR_600_CUSTOM:
|
||||
return "TT_HONDA_CBR_600_CUSTOM";
|
||||
case TT_3_1_CAM:
|
||||
return "TT_3_1_CAM";
|
||||
case TT_DODGE_NEON_1995:
|
||||
return "TT_DODGE_NEON_1995";
|
||||
case TT_GM_LS_24:
|
||||
|
|
|
@ -680,8 +680,8 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->fsioInputModes[i] = PI_DEFAULT;
|
||||
}
|
||||
|
||||
engineConfiguration->communicationPin = GPIOD_15;
|
||||
engineConfiguration->runningPin = GPIOD_12;
|
||||
engineConfiguration->communicationPin = GPIOD_15; // blue LED on discovery
|
||||
engineConfiguration->runningPin = GPIOD_12; // greeb LED on discovery
|
||||
setDefaultBasePins(PASS_ENGINE_PARAMETER_F);
|
||||
engineConfiguration->binarySerialTxPin = GPIOC_10;
|
||||
engineConfiguration->binarySerialRxPin = GPIOC_11;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Aug 01 21:44:40 EDT 2016
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Aug 11 20:02:56 EDT 2016
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -471,6 +471,7 @@ typedef struct {
|
|||
*/
|
||||
pin_output_mode_e hip9011CsPinMode;
|
||||
/**
|
||||
* This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin.
|
||||
* offset 280
|
||||
*/
|
||||
brain_pin_e tachOutputPin;
|
||||
|
@ -1439,10 +1440,12 @@ typedef struct {
|
|||
*/
|
||||
idle_control_e idleControl;
|
||||
/**
|
||||
* blue LED on discovery by default
|
||||
* offset 1924
|
||||
*/
|
||||
brain_pin_e communicationPin;
|
||||
/**
|
||||
* green LED on discovery by default
|
||||
* offset 1928
|
||||
*/
|
||||
brain_pin_e runningPin;
|
||||
|
@ -1535,10 +1538,12 @@ typedef struct {
|
|||
*/
|
||||
float engineLoadAccelEnrichmentMultiplier;
|
||||
/**
|
||||
* RED led on Discovery by default. TODO: start using this property
|
||||
* offset 2216
|
||||
*/
|
||||
brain_pin_e fatalErrorPin;
|
||||
/**
|
||||
* TODO: start using this property
|
||||
* offset 2220
|
||||
*/
|
||||
brain_pin_e warninigPin;
|
||||
|
@ -1598,6 +1603,7 @@ typedef struct {
|
|||
*/
|
||||
float mapAccelTaperMult[MAP_ACCEL_TAPER];
|
||||
/**
|
||||
* This implementation makes a pulse every time one of the coils is charged. See also tachOutputPin
|
||||
* offset 2368
|
||||
*/
|
||||
brain_pin_e dizzySparkOutputPin;
|
||||
|
@ -1904,4 +1910,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Aug 01 21:44:40 EDT 2016
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Aug 11 20:02:56 EDT 2016
|
||||
|
|
|
@ -187,7 +187,10 @@ typedef enum {
|
|||
|
||||
TT_HONDA_CBR_600_CUSTOM = 30,
|
||||
|
||||
TT_UNUSED = 31, // this is used if we want to iterate over all trigger types
|
||||
// skipped 3/1 with cam sensor for testing
|
||||
TT_3_1_CAM = 31,
|
||||
|
||||
TT_UNUSED = 32, // this is used if we want to iterate over all trigger types
|
||||
|
||||
|
||||
Force_4b_trigger_type = ENUM_32_BITS,
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
* @file tachometer.cpp
|
||||
* @brief This is about driving external analog tachometers
|
||||
*
|
||||
* This implementation produces one pulse per engine cycle
|
||||
*
|
||||
* todo: these is a bit of duplication with dizzySparkOutputPin
|
||||
*
|
||||
* @date Aug 18, 2015
|
||||
|
|
|
@ -373,6 +373,43 @@ void initializeSkippedToothTriggerShapeExt(TriggerShape *s, int totalTeethCount,
|
|||
NO_LEFT_FILTER, NO_RIGHT_FILTER);
|
||||
}
|
||||
|
||||
static void configure3_1_cam(TriggerShape *s, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_S) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
|
||||
|
||||
|
||||
const float crankW = 360 / 3 / 2;
|
||||
|
||||
|
||||
trigger_wheel_e crank = T_SECONDARY;
|
||||
|
||||
s->addEvent2(10, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(50, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
|
||||
|
||||
float a = 2 * crankW;
|
||||
|
||||
// #1/3
|
||||
s->addEvent2(a += crankW, crank, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(a += crankW, crank, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
// #2/3
|
||||
s->addEvent2(a += crankW, crank, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(a += crankW, crank, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
// #3/3
|
||||
a += crankW;
|
||||
a += crankW;
|
||||
|
||||
// 2nd #1/3
|
||||
s->addEvent2(a += crankW, crank, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(a += crankW, crank, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
|
||||
// 2nd #2/3
|
||||
s->addEvent2(a += crankW, crank, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(a += crankW, crank, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
|
||||
s->isSynchronizationNeeded = false;
|
||||
}
|
||||
|
||||
|
||||
static void configureOnePlusOne(TriggerShape *s, operation_mode_e operationMode) {
|
||||
float engineCycle = getEngineCycle(operationMode);
|
||||
|
||||
|
@ -464,6 +501,10 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
|
|||
configureOnePlusOne(triggerShape, engineConfiguration->operationMode);
|
||||
break;
|
||||
|
||||
case TT_3_1_CAM:
|
||||
configure3_1_cam(triggerShape, engineConfiguration->operationMode PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_ONE_PLUS_TOOTHED_WHEEL_60_2:
|
||||
configureOnePlus60_2(triggerShape, engineConfiguration->operationMode);
|
||||
break;
|
||||
|
|
|
@ -27,6 +27,7 @@ void turnOnCapturePin(const char *msg, brain_pin_e brainPin);
|
|||
digital_input_s *initWaveAnalyzerDriver(const char *msg, brain_pin_e brainPin);
|
||||
void startInputDriver(digital_input_s *hw, bool isActiveHigh);
|
||||
ICUDriver * getInputCaptureDriver(brain_pin_e hwPin);
|
||||
icuchannel_t getInputCaptureChannel(brain_pin_e hwPin);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ shaft_icu_width_callback, shaft_icu_period_callback };
|
|||
static ICUDriver *turnOnTriggerInputPin(brain_pin_e hwPin) {
|
||||
// configure pin
|
||||
turnOnCapturePin("trigger", hwPin);
|
||||
shaft_icucfg.channel = ICU_CHANNEL_1;
|
||||
shaft_icucfg.channel = getInputCaptureChannel(hwPin);
|
||||
|
||||
ICUDriver *driver = getInputCaptureDriver(hwPin);
|
||||
scheduleMsg(logger, "turnOnTriggerInputPin %s", hwPortname(hwPin));
|
||||
|
|
|
@ -438,7 +438,7 @@ custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fas
|
|||
ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it;
|
||||
int etbDT;
|
||||
pin_output_mode_e hip9011CsPinMode;
|
||||
brain_pin_e tachOutputPin;
|
||||
brain_pin_e tachOutputPin;This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin.
|
||||
pin_output_mode_e tachOutputPinMode;
|
||||
|
||||
brain_input_pin_e[3 iterate] triggerInputPins;
|
||||
|
@ -660,8 +660,8 @@ baro_corr_table_t baroCorrTable;
|
|||
pid_s idleRpmPid;
|
||||
int idleDT;
|
||||
idle_control_e idleControl;
|
||||
brain_pin_e communicationPin;
|
||||
brain_pin_e runningPin;
|
||||
brain_pin_e communicationPin;blue LED on discovery by default
|
||||
brain_pin_e runningPin;green LED on discovery by default
|
||||
brain_pin_e binarySerialTxPin;
|
||||
brain_pin_e binarySerialRxPin;
|
||||
brain_pin_e consoleSerialTxPin;
|
||||
|
@ -690,8 +690,8 @@ baro_corr_table_t baroCorrTable;
|
|||
float engineLoadAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3
|
||||
|
||||
|
||||
brain_pin_e fatalErrorPin;
|
||||
brain_pin_e warninigPin;
|
||||
brain_pin_e fatalErrorPin;RED led on Discovery by default. TODO: start using this property
|
||||
brain_pin_e warninigPin;TODO: start using this property
|
||||
brain_pin_e configResetPin;
|
||||
uint32_t uartConsoleSerialSpeed;;"BPs", 1, 0, 0,1000000, 0
|
||||
float tpsDecelEnleanmentThreshold;;"roc", 1, 0, 0, 200, 3
|
||||
|
@ -709,7 +709,7 @@ baro_corr_table_t baroCorrTable;
|
|||
float[MAP_ACCEL_TAPER] mapAccelTaperBins;;"counter", 1, 0, 0.0, 300, 0
|
||||
float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, 2
|
||||
|
||||
brain_pin_e dizzySparkOutputPin;
|
||||
brain_pin_e dizzySparkOutputPin;This implementation makes a pulse every time one of the coils is charged. See also tachOutputPin
|
||||
pin_output_mode_e dizzySparkOutputPinMode;
|
||||
adc_channel_e[FSIO_ADC_COUNT iterate] fsioAdc;
|
||||
float fixedTiming;Fixed timing, useful for TDC testing;"deg", 1, 0, -720, 720, 2
|
||||
|
|
|
@ -1438,6 +1438,7 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01"
|
|||
field = "#Cam is primary if you have cam sensor"
|
||||
field = "Primary input channel", triggerInputPins1
|
||||
field = "Secondary channel", triggerInputPins2
|
||||
field = "CAM input", camInput
|
||||
field = "Trigger error LED", triggerErrorPin
|
||||
field = "Trigger error LED mode", triggerErrorPinMode
|
||||
dialog = triggerConfiguration
|
||||
|
|
Loading…
Reference in New Issue