auto-sync

This commit is contained in:
rusEfi 2015-03-04 21:08:26 -06:00
parent 18f479b3eb
commit b2484dd38e
9 changed files with 27 additions and 7 deletions

View File

@ -389,6 +389,8 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
boardConfiguration->tunerStudioSerialSpeed = 9600;
engineConfiguration->algorithm = LM_SPEED_DENSITY;
boardConfiguration->alternatorControlPin = GPIOD_5;
// engineConfiguration->isCanEnabled = true;
boardConfiguration->canTxPin = GPIOB_6;
boardConfiguration->canRxPin = GPIOB_12;

View File

@ -54,6 +54,8 @@
*/
#define EFI_CLI_SUPPORT TRUE
#define EFI_ALTERNATOR_CONTROL TRUE
#define EFI_SIGNAL_EXECUTOR_SLEEP FALSE
#define EFI_SIGNAL_EXECUTOR_ONE_TIMER TRUE
#define EFI_SIGNAL_EXECUTOR_HW_TIMER FALSE

View File

@ -533,6 +533,8 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
boardConfiguration->isFastAdcEnabled = true;
boardConfiguration->isEngineControlEnabled = true;
boardConfiguration->isVerboseAlternator = true;
boardConfiguration->tunerStudioSerialSpeed = TS_DEFAULT_SPEED;
}

View File

@ -1,4 +1,4 @@
// this section was generated by config_definition.jar on Fri Feb 27 21:32:08 EST 2015
// this section was generated by config_definition.jar on Wed Mar 04 21:22:11 EST 2015
// begin
#include "rusefi_types.h"
typedef struct {
@ -437,6 +437,9 @@ typedef struct {
/**
offset 372 bit 6 */
bool_t isHip9011Enabled : 1;
/**
offset 372 bit 7 */
bool_t isVerboseAlternator : 1;
/**
* offset 376
*/
@ -635,7 +638,7 @@ typedef struct {
int16_t directSelfStimulation;
/**
* todo: extract these two fields into a structure
* todo: we need two sets of TPS parameters - modern ETBs have to sensors
* todo: we need two sets of TPS parameters - modern ETBs have two sensors
* offset 338
*/
int16_t tpsMin;
@ -1172,4 +1175,4 @@ typedef struct {
} engine_configuration_s;
// end
// this section was generated by config_definition.jar on Fri Feb 27 21:32:08 EST 2015
// this section was generated by config_definition.jar on Wed Mar 04 21:22:11 EST 2015

View File

@ -35,7 +35,9 @@ static msg_t AltCtrlThread(int param) {
chThdSleepMilliseconds(100);
float result = altPid.getValue(14, getVBatt(engineConfiguration), 1);
scheduleMsg(logger, "alt duty: %f", result);
if (boardConfiguration->isVerboseAlternator) {
scheduleMsg(logger, "alt duty: %f", result);
}
alternatorControl.setSimplePwmDutyCycle(result / 100);
}
@ -57,8 +59,8 @@ void initAlternatorCtrl(Logging *sharedLogger) {
startSimplePwmExt(&alternatorControl, "Alternator control", boardConfiguration->alternatorControlPin,
&alternatorPin,
ALTERNATOR_VALVE_PWM_FREQUENCY, 0.1, applyPinState);
chThdCreateStatic(alternatorControlThreadStack, sizeof(alternatorControlThreadStack), LOWPRIO, (tfunc_t) AltCtrlThread, NULL);
chThdCreateStatic(alternatorControlThreadStack, sizeof(alternatorControlThreadStack), LOWPRIO,
(tfunc_t) AltCtrlThread, NULL);
addConsoleActionF("alt_pid", setAltPid);
}

View File

@ -47,6 +47,7 @@
#include "engine.h"
#include "algo.h"
#include "LocalVersionHolder.h"
#include "alternatorController.h"
#if HAL_USE_ADC || defined(__DOXYGEN__)
#include "AdcConfiguration.h"
@ -462,6 +463,10 @@ void initEngineContoller(Logging *sharedLogger, Engine *engine) {
initMalfunctionCentral();
#if EFI_ALTERNATOR_CONTROL || defined(__DOXYGEN__)
initAlternatorCtrl(sharedLogger);
#endif
#if EFI_ELECTRONIC_THROTTLE_BODY || defined(__DOXYGEN__)
initElectronicThrottle();
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */

View File

@ -772,6 +772,8 @@ static void enableOrDisable(const char *param, bool isEnabled) {
boardConfiguration->isFastAdcEnabled = isEnabled;
} else if (strEqualCaseInsensitive(param, "joystick")) {
engineConfiguration->isJoystickEnabled = isEnabled;
} else if (strEqualCaseInsensitive(param, "altdebug")) {
boardConfiguration->isVerboseAlternator = isEnabled;
} else if (strEqualCaseInsensitive(param, "sd")) {
boardConfiguration->isSdCardEnabled = isEnabled;
} else if (strEqualCaseInsensitive(param, "can")) {

View File

@ -332,6 +332,7 @@ bit is_enabled_spi_2
bit isFastAdcEnabled
bit isEngineControlEnabled
bit isHip9011Enabled
bit isVerboseAlternator
brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins;
uint8_t[LOGIC_ANALYZER_CHANNEL_COUNT] logicAnalyzerMode;default or inverted input

View File

@ -37,7 +37,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated by ConfigDefinition.jar on Fri Feb 27 21:32:10 EST 2015
; this section was generated by ConfigDefinition.jar on Wed Mar 04 21:22:13 EST 2015
pageSize = 14008
page = 1
@ -248,6 +248,7 @@ page = 1
isFastAdcEnabled = bits, U32, 1244, [4:4], "false", "true"
isEngineControlEnabled = bits, U32, 1244, [5:5], "false", "true"
isHip9011Enabled = bits, U32, 1244, [6:6], "false", "true"
isVerboseAlternator = bits, U32, 1244, [7:7], "false", "true"
logicAnalyzerPins1 = bits, U32, 1248, [0:6], "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOA_5", "INVALID", "INVALID", "GPIOA_8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOC_6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOE_5", "INVALID", "GPIOE_7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
logicAnalyzerPins2 = bits, U32, 1252, [0:6], "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOA_5", "INVALID", "INVALID", "GPIOA_8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOC_6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOE_5", "INVALID", "GPIOE_7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
logicAnalyzerPins3 = bits, U32, 1256, [0:6], "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOA_5", "INVALID", "INVALID", "GPIOA_8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOC_6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOE_5", "INVALID", "GPIOE_7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"