auto-sync
This commit is contained in:
parent
a5e76d47c9
commit
309c93f038
|
@ -67,6 +67,8 @@ ADCDriver ADCD3;
|
||||||
/* Driver local functions. */
|
/* Driver local functions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#include "error_handling.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ADC DMA ISR service routine.
|
* @brief ADC DMA ISR service routine.
|
||||||
*
|
*
|
||||||
|
@ -75,6 +77,8 @@ ADCDriver ADCD3;
|
||||||
*/
|
*/
|
||||||
static void adc_lld_serve_rx_interrupt(ADCDriver *adcp, uint32_t flags) {
|
static void adc_lld_serve_rx_interrupt(ADCDriver *adcp, uint32_t flags) {
|
||||||
|
|
||||||
|
efiAssertVoid(getRemainingStack(chThdSelf()) > 32, "sys_adc");
|
||||||
|
|
||||||
/* DMA errors handling.*/
|
/* DMA errors handling.*/
|
||||||
if ((flags & (STM32_DMA_ISR_TEIF | STM32_DMA_ISR_DMEIF)) != 0) {
|
if ((flags & (STM32_DMA_ISR_TEIF | STM32_DMA_ISR_DMEIF)) != 0) {
|
||||||
/* DMA, this could help only if the DMA tries to access an unmapped
|
/* DMA, this could help only if the DMA tries to access an unmapped
|
||||||
|
|
|
@ -61,7 +61,11 @@ void setDodgeNeon1995EngineConfiguration(engine_configuration_s *engineConfigura
|
||||||
// set_cranking_fuel 5
|
// set_cranking_fuel 5
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = 5;
|
engineConfiguration->crankingSettings.baseCrankingFuel = 5;
|
||||||
|
|
||||||
// set_whole_fuel_map 3
|
/**
|
||||||
|
* that's 1995 config
|
||||||
|
*/
|
||||||
|
|
||||||
|
// set_whole_fuel_map 9
|
||||||
setWholeFuelMap(engineConfiguration, 9);
|
setWholeFuelMap(engineConfiguration, 9);
|
||||||
setWholeTimingTable(engineConfiguration, 12);
|
setWholeTimingTable(engineConfiguration, 12);
|
||||||
|
|
||||||
|
@ -82,8 +86,12 @@ void setDodgeNeon1995EngineConfiguration(engine_configuration_s *engineConfigura
|
||||||
// set_injection_offset 510
|
// set_injection_offset 510
|
||||||
engineConfiguration->injectionOffset = 510;
|
engineConfiguration->injectionOffset = 510;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* that's 1995 config
|
||||||
|
*/
|
||||||
|
|
||||||
// set_cranking_charge_angle 70
|
// set_cranking_charge_angle 70
|
||||||
engineConfiguration->crankingChargeAngle = 7;
|
engineConfiguration->crankingChargeAngle = 70;
|
||||||
// set_cranking_timing_angle 0
|
// set_cranking_timing_angle 0
|
||||||
engineConfiguration->crankingTimingAngle = 0;
|
engineConfiguration->crankingTimingAngle = 0;
|
||||||
|
|
||||||
|
@ -142,6 +150,14 @@ void setDodgeNeonNGCEngineConfiguration(engine_configuration_s *engineConfigurat
|
||||||
engineConfiguration->displacement = 1.996;
|
engineConfiguration->displacement = 1.996;
|
||||||
engineConfiguration->cylindersCount = 4;
|
engineConfiguration->cylindersCount = 4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* that's NGC config
|
||||||
|
*/
|
||||||
|
|
||||||
|
// set_whole_fuel_map 12
|
||||||
|
setWholeFuelMap(engineConfiguration, 12);
|
||||||
|
setWholeTimingTable(engineConfiguration, 12);
|
||||||
|
|
||||||
// set_cranking_charge_angle 70
|
// set_cranking_charge_angle 70
|
||||||
engineConfiguration->crankingChargeAngle = 70;
|
engineConfiguration->crankingChargeAngle = 70;
|
||||||
// set_cranking_timing_angle 710
|
// set_cranking_timing_angle 710
|
||||||
|
|
|
@ -431,6 +431,11 @@ static void setWholeTimingMap(float value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void setWholeTimingMapCmd(float value) {
|
||||||
|
scheduleMsg(&logger, "Setting whole timing advance map to %f", value);
|
||||||
|
setWholeTimingMap(value);
|
||||||
|
}
|
||||||
|
|
||||||
static void setWholeFuelMapCmd(float value) {
|
static void setWholeFuelMapCmd(float value) {
|
||||||
scheduleMsg(&logger, "Setting whole fuel map to %f", value);
|
scheduleMsg(&logger, "Setting whole fuel map to %f", value);
|
||||||
if (engineConfiguration->algorithm == LM_SPEED_DENSITY) {
|
if (engineConfiguration->algorithm == LM_SPEED_DENSITY) {
|
||||||
|
@ -713,6 +718,10 @@ static void enableSelfStimulation(void) {
|
||||||
scheduleMsg(&logger, "self stimulation enabled");
|
scheduleMsg(&logger, "self stimulation enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void stopEngine(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static void disableSelfStimulation(void) {
|
static void disableSelfStimulation(void) {
|
||||||
engineConfiguration->directSelfStimulation = false;
|
engineConfiguration->directSelfStimulation = false;
|
||||||
scheduleMsg(&logger, "self stimulation disabled");
|
scheduleMsg(&logger, "self stimulation disabled");
|
||||||
|
@ -774,6 +783,7 @@ void initSettings(engine_configuration_s *engineConfiguration) {
|
||||||
addConsoleActionI("set_cranking_injection_mode", setCrankingInjectionMode);
|
addConsoleActionI("set_cranking_injection_mode", setCrankingInjectionMode);
|
||||||
addConsoleActionI("set_injection_mode", setInjectionMode);
|
addConsoleActionI("set_injection_mode", setInjectionMode);
|
||||||
|
|
||||||
|
addConsoleActionF("set_whole_timing_map", setWholeTimingMapCmd);
|
||||||
addConsoleActionF("set_whole_fuel_map", setWholeFuelMapCmd);
|
addConsoleActionF("set_whole_fuel_map", setWholeFuelMapCmd);
|
||||||
addConsoleActionSSS("set_fuel_map", setFuelMap);
|
addConsoleActionSSS("set_fuel_map", setFuelMap);
|
||||||
|
|
||||||
|
@ -783,6 +793,7 @@ void initSettings(engine_configuration_s *engineConfiguration) {
|
||||||
addConsoleActionI("set_rpm_hard_limit", setRpmHardLimit);
|
addConsoleActionI("set_rpm_hard_limit", setRpmHardLimit);
|
||||||
addConsoleActionI("set_firing_order", setFiringOrder);
|
addConsoleActionI("set_firing_order", setFiringOrder);
|
||||||
addConsoleActionI("set_algorithm", setAlgorithm);
|
addConsoleActionI("set_algorithm", setAlgorithm);
|
||||||
|
addConsoleActionI("stopengine", stopEngine);
|
||||||
|
|
||||||
// todo: refactor this - looks like all boolean flags should be controlled with less code duplication
|
// todo: refactor this - looks like all boolean flags should be controlled with less code duplication
|
||||||
addConsoleAction("enable_injection", enableInjection);
|
addConsoleAction("enable_injection", enableInjection);
|
||||||
|
|
Loading…
Reference in New Issue