auto-sync
This commit is contained in:
parent
7b63af2e6b
commit
7bff37858f
|
@ -29,6 +29,9 @@
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
#include "speed_density.h"
|
#include "speed_density.h"
|
||||||
#include "advance_map.h"
|
#include "advance_map.h"
|
||||||
|
#if EFI_PROD_CODE
|
||||||
|
#include "alternatorController.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "acura_rsx.h"
|
#include "acura_rsx.h"
|
||||||
|
@ -167,8 +170,10 @@ void prepareVoidConfiguration(engine_configuration_s *activeConfiguration) {
|
||||||
boardConfiguration->acRelayPin = GPIO_UNASSIGNED;
|
boardConfiguration->acRelayPin = GPIO_UNASSIGNED;
|
||||||
boardConfiguration->acRelayPinMode = OM_DEFAULT;
|
boardConfiguration->acRelayPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
boardConfiguration->alternatorControlPin = GPIO_UNASSIGNED;
|
#if EFI_PROD_CODE
|
||||||
boardConfiguration->alternatorControlPinMode = OM_DEFAULT;
|
setDefaultAlternatorParameters();
|
||||||
|
#endif
|
||||||
|
|
||||||
boardConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
boardConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
||||||
boardConfiguration->mainRelayPinMode = OM_DEFAULT;
|
boardConfiguration->mainRelayPinMode = OM_DEFAULT;
|
||||||
boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||||
|
@ -391,10 +396,6 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
engineConfiguration->HD44780width = 20;
|
engineConfiguration->HD44780width = 20;
|
||||||
engineConfiguration->HD44780height = 4;
|
engineConfiguration->HD44780height = 4;
|
||||||
|
|
||||||
engineConfiguration->alternatorOffset = 0;
|
|
||||||
engineConfiguration->alternatorControlPFactor = 30;
|
|
||||||
boardConfiguration->alternatorDT = 100;
|
|
||||||
|
|
||||||
engineConfiguration->vRefAdcChannel = EFI_ADC_NONE;
|
engineConfiguration->vRefAdcChannel = EFI_ADC_NONE;
|
||||||
engineConfiguration->vbattAdcChannel = EFI_ADC_NONE;
|
engineConfiguration->vbattAdcChannel = EFI_ADC_NONE;
|
||||||
engineConfiguration->clt.adcChannel = EFI_ADC_6;
|
engineConfiguration->clt.adcChannel = EFI_ADC_6;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// this section was generated by config_definition.jar on Sat May 23 20:41:38 EDT 2015
|
// this section was generated by config_definition.jar on Sun May 24 09:49:35 EDT 2015
|
||||||
// begin
|
// begin
|
||||||
#include "rusefi_types.h"
|
#include "rusefi_types.h"
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -495,6 +495,9 @@ typedef struct {
|
||||||
/**
|
/**
|
||||||
offset 384 bit 9 */
|
offset 384 bit 9 */
|
||||||
bool_t useStepperIdle : 1;
|
bool_t useStepperIdle : 1;
|
||||||
|
/**
|
||||||
|
offset 384 bit 10 */
|
||||||
|
bool_t enabledStep1Limiter : 1;
|
||||||
/**
|
/**
|
||||||
* offset 388
|
* offset 388
|
||||||
*/
|
*/
|
||||||
|
@ -562,9 +565,10 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
brain_pin_e hip9011IntHoldPin;
|
brain_pin_e hip9011IntHoldPin;
|
||||||
/**
|
/**
|
||||||
|
* Turn off alternator output above specified TPS
|
||||||
* offset 656
|
* offset 656
|
||||||
*/
|
*/
|
||||||
int unused1280;
|
float alternatorOffAboveTps;
|
||||||
/**
|
/**
|
||||||
* offset 660
|
* offset 660
|
||||||
*/
|
*/
|
||||||
|
@ -738,7 +742,11 @@ typedef struct {
|
||||||
/**
|
/**
|
||||||
* offset 320
|
* offset 320
|
||||||
*/
|
*/
|
||||||
float unused[2];
|
int step1rpm;
|
||||||
|
/**
|
||||||
|
* offset 324
|
||||||
|
*/
|
||||||
|
int step1timing;
|
||||||
/**
|
/**
|
||||||
* offset 328
|
* offset 328
|
||||||
*/
|
*/
|
||||||
|
@ -1337,4 +1345,4 @@ typedef struct {
|
||||||
} persistent_config_s;
|
} persistent_config_s;
|
||||||
|
|
||||||
// end
|
// end
|
||||||
// this section was generated by config_definition.jar on Sat May 23 20:41:38 EDT 2015
|
// this section was generated by config_definition.jar on Sun May 24 09:49:35 EDT 2015
|
||||||
|
|
|
@ -106,8 +106,10 @@
|
||||||
#define iat_bias_resistor_offset 312
|
#define iat_bias_resistor_offset 312
|
||||||
#define iat_bias_resistor_offset_hex 138
|
#define iat_bias_resistor_offset_hex 138
|
||||||
#define iat_adcChannel_offset 316
|
#define iat_adcChannel_offset 316
|
||||||
#define unused_offset 320
|
#define step1rpm_offset 320
|
||||||
#define unused_offset_hex 140
|
#define step1rpm_offset_hex 140
|
||||||
|
#define step1timing_offset 324
|
||||||
|
#define step1timing_offset_hex 144
|
||||||
#define hip9011PrescalerAndSDO_offset 328
|
#define hip9011PrescalerAndSDO_offset 328
|
||||||
#define hip9011PrescalerAndSDO_offset_hex 148
|
#define hip9011PrescalerAndSDO_offset_hex 148
|
||||||
#define knockBandCustom_offset 332
|
#define knockBandCustom_offset 332
|
||||||
|
@ -329,6 +331,7 @@
|
||||||
#define isVerboseAlternator_offset 1008
|
#define isVerboseAlternator_offset 1008
|
||||||
#define useSerialPort_offset 1008
|
#define useSerialPort_offset 1008
|
||||||
#define useStepperIdle_offset 1008
|
#define useStepperIdle_offset 1008
|
||||||
|
#define enabledStep1Limiter_offset 1008
|
||||||
#define logicAnalyzerPins1_offset 1012
|
#define logicAnalyzerPins1_offset 1012
|
||||||
#define logicAnalyzerPins2_offset 1016
|
#define logicAnalyzerPins2_offset 1016
|
||||||
#define logicAnalyzerPins3_offset 1020
|
#define logicAnalyzerPins3_offset 1020
|
||||||
|
@ -434,8 +437,8 @@
|
||||||
#define fsioFrequency16_offset 1270
|
#define fsioFrequency16_offset 1270
|
||||||
#define hip9011CsPin_offset 1272
|
#define hip9011CsPin_offset 1272
|
||||||
#define hip9011IntHoldPin_offset 1276
|
#define hip9011IntHoldPin_offset 1276
|
||||||
#define unused1280_offset 1280
|
#define alternatorOffAboveTps_offset 1280
|
||||||
#define unused1280_offset_hex 500
|
#define alternatorOffAboveTps_offset_hex 500
|
||||||
#define fsio_setting1_offset 1284
|
#define fsio_setting1_offset 1284
|
||||||
#define fsio_setting1_offset_hex 504
|
#define fsio_setting1_offset_hex 504
|
||||||
#define fsio_setting2_offset 1288
|
#define fsio_setting2_offset 1288
|
||||||
|
|
|
@ -79,6 +79,17 @@ static void applyAlternatorPinState(PwmConfig *state, int stateIndex) {
|
||||||
output->setValue(value);
|
output->setValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setDefaultAlternatorParameters(void) {
|
||||||
|
boardConfiguration->alternatorOffAboveTps = 120;
|
||||||
|
|
||||||
|
boardConfiguration->alternatorControlPin = GPIO_UNASSIGNED;
|
||||||
|
boardConfiguration->alternatorControlPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
|
engineConfiguration->alternatorOffset = 0;
|
||||||
|
engineConfiguration->alternatorControlPFactor = 30;
|
||||||
|
boardConfiguration->alternatorDT = 100;
|
||||||
|
}
|
||||||
|
|
||||||
void initAlternatorCtrl(Logging *sharedLogger) {
|
void initAlternatorCtrl(Logging *sharedLogger) {
|
||||||
logger = sharedLogger;
|
logger = sharedLogger;
|
||||||
addConsoleAction("altinfo", showAltInfo);
|
addConsoleAction("altinfo", showAltInfo);
|
||||||
|
|
|
@ -14,5 +14,6 @@
|
||||||
void initAlternatorCtrl(Logging *sharedLogger);
|
void initAlternatorCtrl(Logging *sharedLogger);
|
||||||
void setAltPFactor(float p);
|
void setAltPFactor(float p);
|
||||||
void showAltInfo(void);
|
void showAltInfo(void);
|
||||||
|
void setDefaultAlternatorParameters(void);
|
||||||
|
|
||||||
#endif /* ALTERNATORCONTROLLER_H_ */
|
#endif /* ALTERNATORCONTROLLER_H_ */
|
||||||
|
|
|
@ -159,7 +159,8 @@ MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled
|
||||||
ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here!
|
ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here!
|
||||||
ThermistorConf iat;
|
ThermistorConf iat;
|
||||||
|
|
||||||
float[2] unused;
|
int step1rpm;
|
||||||
|
int step1timing;
|
||||||
int hip9011PrescalerAndSDO;;"integer", 1, 0.0, 0.0, 32, 0
|
int hip9011PrescalerAndSDO;;"integer", 1, 0.0, 0.0, 32, 0
|
||||||
float knockBandCustom;;"kHz", 1, 0.0, 0.0, 10.0, 2
|
float knockBandCustom;;"kHz", 1, 0.0, 0.0, 10.0, 2
|
||||||
|
|
||||||
|
@ -388,6 +389,7 @@ bit is_enabled_spi_2
|
||||||
bit useSerialPort
|
bit useSerialPort
|
||||||
bit useStepperIdle
|
bit useStepperIdle
|
||||||
|
|
||||||
|
bit enabledStep1Limiter;
|
||||||
|
|
||||||
brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins;
|
brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins;
|
||||||
uint8_t[LOGIC_ANALYZER_CHANNEL_COUNT] logicAnalyzerMode;default or inverted input
|
uint8_t[LOGIC_ANALYZER_CHANNEL_COUNT] logicAnalyzerMode;default or inverted input
|
||||||
|
@ -417,7 +419,7 @@ custom fsio_pwm_freq_t 2 scalar, U16, @OFFSET@, "Hz", 1, 0,
|
||||||
|
|
||||||
brain_pin_e hip9011CsPin;
|
brain_pin_e hip9011CsPin;
|
||||||
brain_pin_e hip9011IntHoldPin;
|
brain_pin_e hip9011IntHoldPin;
|
||||||
int unused1280;
|
float alternatorOffAboveTps;Turn off alternator output above specified TPS;"%", 1, 0, 0, 200, 2
|
||||||
|
|
||||||
custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 0
|
custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 0
|
||||||
fsio_setting_t[LE_COMMAND_COUNT iterate] fsio_setting;
|
fsio_setting_t[LE_COMMAND_COUNT iterate] fsio_setting;
|
||||||
|
|
Loading…
Reference in New Issue