mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
2cb18421be
commit
4927450978
|
@ -36,13 +36,18 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
engineConfiguration->globalTriggerAngleOffset = -42;
|
engineConfiguration->globalTriggerAngleOffset = -42;
|
||||||
|
|
||||||
// set_cranking_timing_angle 15
|
// set_cranking_timing_angle 15
|
||||||
engineConfiguration->crankingTimingAngle = 15;
|
engineConfiguration->crankingTimingAngle = 8;
|
||||||
engineConfiguration->crankingChargeAngle = 70;
|
engineConfiguration->crankingChargeAngle = 70;
|
||||||
|
|
||||||
|
// set_cranking_fuel 9
|
||||||
|
engineConfiguration->cranking.baseFuel = 9;
|
||||||
|
|
||||||
|
engineConfiguration->rpmHardLimit = 6000;
|
||||||
|
|
||||||
engineConfiguration->tpsMin = 80;
|
engineConfiguration->tpsMin = 80;
|
||||||
engineConfiguration->tpsMax = 764;
|
engineConfiguration->tpsMax = 764;
|
||||||
|
|
||||||
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER);
|
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
||||||
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
||||||
|
|
||||||
// set_whole_fuel_map 9
|
// set_whole_fuel_map 9
|
||||||
|
|
|
@ -408,6 +408,14 @@ void initConfigActions(void) {
|
||||||
addConsoleActionI("get_short", getShort);
|
addConsoleActionI("get_short", getShort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo: move this logic somewhere else?
|
||||||
|
static void getKnockInfo(void) {
|
||||||
|
adc_channel_e hwChannel = engineConfiguration->externalKnockSenseAdc;
|
||||||
|
scheduleMsg(&logger, "externalKnockSenseAdc on ADC", getPinNameByAdcChannel(hwChannel, pinNameBuffer));
|
||||||
|
|
||||||
|
scheduleMsg(&logger, "knock now=%s/ever=%s", boolToString(engine->knockNow), boolToString(engine->knockEver));
|
||||||
|
}
|
||||||
|
|
||||||
void initEngineContoller(Logging *sharedLogger, Engine *engine) {
|
void initEngineContoller(Logging *sharedLogger, Engine *engine) {
|
||||||
if (hasFirmwareError()) {
|
if (hasFirmwareError()) {
|
||||||
return;
|
return;
|
||||||
|
@ -502,6 +510,10 @@ void initEngineContoller(Logging *sharedLogger, Engine *engine) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (engineConfiguration->externalKnockSenseAdc != EFI_ADC_NONE) {
|
||||||
|
addConsoleAction("knockinfo", getKnockInfo);
|
||||||
|
}
|
||||||
|
|
||||||
addConsoleAction("analoginfo", printAnalogInfo);
|
addConsoleAction("analoginfo", printAnalogInfo);
|
||||||
|
|
||||||
initConfigActions();
|
initConfigActions();
|
||||||
|
|
|
@ -340,7 +340,7 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECL
|
||||||
|
|
||||||
if (eventIndex == engineConfiguration->ignMathCalculateAtIndex) {
|
if (eventIndex == engineConfiguration->ignMathCalculateAtIndex) {
|
||||||
if (engineConfiguration->externalKnockSenseAdc != EFI_ADC_NONE) {
|
if (engineConfiguration->externalKnockSenseAdc != EFI_ADC_NONE) {
|
||||||
float externalKnockValue = getAdcValue(engineConfiguration->externalKnockSenseAdc);
|
float externalKnockValue = getVoltageDivided(engineConfiguration->externalKnockSenseAdc);
|
||||||
engine->knockNow = externalKnockValue > 2.5;
|
engine->knockNow = externalKnockValue > 2.5;
|
||||||
engine->knockEver |= engine->knockNow;
|
engine->knockEver |= engine->knockNow;
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,5 +276,5 @@ int getRusEfiVersion(void) {
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
if (UNUSED_CCM_SIZE[0] == 0)
|
if (UNUSED_CCM_SIZE[0] == 0)
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
return 20150325;
|
return 20150326;
|
||||||
}
|
}
|
||||||
|
|
|
@ -272,8 +272,12 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
||||||
}
|
}
|
||||||
|
|
||||||
private ImageIcon rescaleImageIcon(ImageIcon imageIcon, int percentOfOriginal) {
|
private ImageIcon rescaleImageIcon(ImageIcon imageIcon, int percentOfOriginal) {
|
||||||
int newHeight = (int) (imageIcon.getImage().getHeight(this) * (percentOfOriginal * .01));
|
int height = imageIcon.getImage().getHeight(this);
|
||||||
int newWidth = (int) (imageIcon.getImage().getWidth(this) * (percentOfOriginal * .01));
|
int newHeight = (int) (height * (percentOfOriginal * .01));
|
||||||
|
int width = imageIcon.getImage().getWidth(this);
|
||||||
|
int newWidth = (int) (width * (percentOfOriginal * .01));
|
||||||
|
if (newHeight == 0 || newWidth == 0)
|
||||||
|
throw new IllegalStateException("rescale error: w " + width + "/" + newWidth + ", h " + height + "/" + newHeight);
|
||||||
|
|
||||||
imageIcon.setImage(imageIcon.getImage().getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH));
|
imageIcon.setImage(imageIcon.getImage().getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH));
|
||||||
return imageIcon;
|
return imageIcon;
|
||||||
|
|
|
@ -34,7 +34,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||||
* @see com.rusefi.StartupFrame
|
* @see com.rusefi.StartupFrame
|
||||||
*/
|
*/
|
||||||
public class Launcher {
|
public class Launcher {
|
||||||
public static final int CONSOLE_VERSION = 20150318;
|
public static final int CONSOLE_VERSION = 20150326;
|
||||||
public static final boolean SHOW_STIMULATOR = false;
|
public static final boolean SHOW_STIMULATOR = false;
|
||||||
public static final String TAB_INDEX = "main_tab";
|
public static final String TAB_INDEX = "main_tab";
|
||||||
private final String port;
|
private final String port;
|
||||||
|
|
Loading…
Reference in New Issue