mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
73d34cd184
commit
5dffa8e670
|
@ -462,6 +462,8 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
engineConfiguration->hip9011SpiDevice = SPI_DEVICE_2;
|
||||
|
||||
engineConfiguration->isAlternatorControlEnabled = true;
|
||||
|
||||
engineConfiguration->isGpsEnabled = false;
|
||||
boardConfiguration->gps_rx_pin = GPIOB_7;
|
||||
boardConfiguration->gps_tx_pin = GPIOB_6;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated by config_definition.jar on Wed Mar 04 21:22:11 EST 2015
|
||||
// this section was generated by config_definition.jar on Tue Mar 10 21:53:57 EDT 2015
|
||||
// begin
|
||||
#include "rusefi_types.h"
|
||||
typedef struct {
|
||||
|
@ -920,9 +920,12 @@ typedef struct {
|
|||
bool_t isGpsEnabled : 1;
|
||||
/**
|
||||
offset 4876 bit 13 */
|
||||
bool_t hasMafSensor : 1;
|
||||
bool_t isAlternatorControlEnabled : 1;
|
||||
/**
|
||||
offset 4876 bit 14 */
|
||||
bool_t hasMafSensor : 1;
|
||||
/**
|
||||
offset 4876 bit 15 */
|
||||
bool_t hasTpsSensor : 1;
|
||||
/**
|
||||
* offset 4880
|
||||
|
@ -1175,4 +1178,4 @@ typedef struct {
|
|||
} engine_configuration_s;
|
||||
|
||||
// end
|
||||
// this section was generated by config_definition.jar on Wed Mar 04 21:22:11 EST 2015
|
||||
// this section was generated by config_definition.jar on Tue Mar 10 21:53:57 EDT 2015
|
||||
|
|
|
@ -51,6 +51,15 @@ static void setAltPid(float p) {
|
|||
altPid.updateFactors(p, 0, 0);
|
||||
}
|
||||
|
||||
static void applyAlternatorPinState(PwmConfig *state, int stateIndex) {
|
||||
efiAssertVoid(stateIndex < PWM_PHASE_MAX_COUNT, "invalid stateIndex");
|
||||
efiAssertVoid(state->multiWave.waveCount == 1, "invalid idle waveCount");
|
||||
OutputPin *output = state->outputPins[0];
|
||||
int value = state->multiWave.waves[0].pinStates[stateIndex];
|
||||
if (!value || engineConfiguration->isAlternatorControlEnabled)
|
||||
output->setValue(value);
|
||||
}
|
||||
|
||||
void initAlternatorCtrl(Logging *sharedLogger) {
|
||||
logger = sharedLogger;
|
||||
if (boardConfiguration->alternatorControlPin == GPIO_UNASSIGNED)
|
||||
|
@ -58,7 +67,7 @@ void initAlternatorCtrl(Logging *sharedLogger) {
|
|||
|
||||
startSimplePwmExt(&alternatorControl, "Alternator control", boardConfiguration->alternatorControlPin,
|
||||
&alternatorPin,
|
||||
ALTERNATOR_VALVE_PWM_FREQUENCY, 0.1, applyPinState);
|
||||
ALTERNATOR_VALVE_PWM_FREQUENCY, 0.1, applyAlternatorPinState);
|
||||
chThdCreateStatic(alternatorControlThreadStack, sizeof(alternatorControlThreadStack), LOWPRIO,
|
||||
(tfunc_t) AltCtrlThread, NULL);
|
||||
|
||||
|
|
|
@ -774,6 +774,8 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
|||
engineConfiguration->isJoystickEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "altdebug")) {
|
||||
boardConfiguration->isVerboseAlternator = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "altcontrol")) {
|
||||
engineConfiguration->isAlternatorControlEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "sd")) {
|
||||
boardConfiguration->isSdCardEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "can")) {
|
||||
|
|
|
@ -408,6 +408,7 @@ bit hasMapSensor;@see isMapAveragingEnabled
|
|||
bit hasVehicleSpeedSensor
|
||||
bit isJoystickEnabled
|
||||
bit isGpsEnabled
|
||||
bit isAlternatorControlEnabled
|
||||
bit hasMafSensor
|
||||
bit hasTpsSensor
|
||||
|
||||
|
|
|
@ -37,9 +37,8 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated by ConfigDefinition.jar on Wed Mar 04 21:22:13 EST 2015
|
||||
; this section was generated by ConfigDefinition.jar on Tue Mar 10 21:53:59 EDT 2015
|
||||
|
||||
pageSize = 14008
|
||||
page = 1
|
||||
engineType = bits, S32, 0, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB"
|
||||
;skipping headerMagicValue offset 4
|
||||
|
@ -389,8 +388,9 @@ page = 1
|
|||
hasVehicleSpeedSensor = bits, U32, 4876, [10:10], "false", "true"
|
||||
isJoystickEnabled = bits, U32, 4876, [11:11], "false", "true"
|
||||
isGpsEnabled = bits, U32, 4876, [12:12], "false", "true"
|
||||
hasMafSensor = bits, U32, 4876, [13:13], "false", "true"
|
||||
hasTpsSensor = bits, U32, 4876, [14:14], "false", "true"
|
||||
isAlternatorControlEnabled= bits, U32, 4876, [13:13], "false", "true"
|
||||
hasMafSensor = bits, U32, 4876, [14:14], "false", "true"
|
||||
hasTpsSensor = bits, U32, 4876, [15:15], "false", "true"
|
||||
hipOutputChannel = bits, U32, 4880, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5"
|
||||
;skipping idleMode offset 4884
|
||||
isInjectionEnabled = bits, U32, 4888, [0:0], "false", "true"
|
||||
|
|
Loading…
Reference in New Issue