console commands cleanup
This commit is contained in:
parent
0396659939
commit
9d271b42d4
|
@ -28,66 +28,14 @@
|
|||
#include "dc_motors.h"
|
||||
#include "idle_hardware.h"
|
||||
|
||||
static void showIdleInfo() {
|
||||
const char * idleModeStr = getIdle_mode_e(engineConfiguration->idleMode);
|
||||
efiPrintf("useStepperIdle=%s useHbridges=%s useRawOutput=%s",
|
||||
boolToString(engineConfiguration->useStepperIdle),
|
||||
boolToString(engineConfiguration->useHbridgesToDriveIdleStepper),
|
||||
boolToString(engineConfiguration->useRawOutputToDriveIdleStepper));
|
||||
efiPrintf("idleMode=%s position=%.2f",
|
||||
idleModeStr, getIdlePosition());
|
||||
|
||||
if (engineConfiguration->useStepperIdle) {
|
||||
if (engineConfiguration->useRawOutputToDriveIdleStepper) {
|
||||
efiPrintf(" A+=%s", hwPortname(engineConfiguration->stepper_raw_output[0]));
|
||||
efiPrintf(" A-=%s", hwPortname(engineConfiguration->stepper_raw_output[1]));
|
||||
efiPrintf(" B+=%s", hwPortname(engineConfiguration->stepper_raw_output[2]));
|
||||
efiPrintf(" B-=%s", hwPortname(engineConfiguration->stepper_raw_output[3]));
|
||||
} else if (engineConfiguration->useHbridgesToDriveIdleStepper) {
|
||||
efiPrintf("Coil A:");
|
||||
efiPrintf(" pin1=%s", hwPortname(engineConfiguration->stepperDcIo[0].directionPin1));
|
||||
efiPrintf(" pin2=%s", hwPortname(engineConfiguration->stepperDcIo[0].directionPin2));
|
||||
showDcMotorInfo(2);
|
||||
efiPrintf("Coil B:");
|
||||
efiPrintf(" pin1=%s", hwPortname(engineConfiguration->stepperDcIo[1].directionPin1));
|
||||
efiPrintf(" pin2=%s", hwPortname(engineConfiguration->stepperDcIo[1].directionPin2));
|
||||
showDcMotorInfo(3);
|
||||
} else {
|
||||
efiPrintf("directionPin=%s reactionTime=%.2f", hwPortname(engineConfiguration->idle.stepperDirectionPin),
|
||||
engineConfiguration->idleStepperReactionTime);
|
||||
efiPrintf("stepPin=%s steps=%d", hwPortname(engineConfiguration->idle.stepperStepPin),
|
||||
engineConfiguration->idleStepperTotalSteps);
|
||||
efiPrintf("enablePin=%s/%d", hwPortname(engineConfiguration->stepperEnablePin),
|
||||
engineConfiguration->stepperEnablePinMode);
|
||||
}
|
||||
} else {
|
||||
if (!engineConfiguration->isDoubleSolenoidIdle) {
|
||||
efiPrintf("idle valve freq=%d on %s", engineConfiguration->idle.solenoidFrequency,
|
||||
hwPortname(engineConfiguration->idle.solenoidPin));
|
||||
} else {
|
||||
efiPrintf("idle valve freq=%d on %s", engineConfiguration->idle.solenoidFrequency,
|
||||
hwPortname(engineConfiguration->idle.solenoidPin));
|
||||
efiPrintf(" and %s", hwPortname(engineConfiguration->secondSolenoidPin));
|
||||
}
|
||||
}
|
||||
|
||||
#if EFI_IDLE_CONTROL
|
||||
if (engineConfiguration->idleMode == IM_AUTO) {
|
||||
engine->module<IdleController>().unmock().getIdlePid()->showPidStatus("idle");
|
||||
}
|
||||
#endif // EFI_IDLE_CONTROL
|
||||
}
|
||||
|
||||
void setIdleMode(idle_mode_e value) {
|
||||
engineConfiguration->idleMode = value ? IM_AUTO : IM_MANUAL;
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
void setManualIdleValvePosition(int positionPercent) {
|
||||
if (positionPercent < 1 || positionPercent > 99)
|
||||
return;
|
||||
efiPrintf("setting idle valve position %d", positionPercent);
|
||||
showIdleInfo();
|
||||
// todo: this is not great that we have to write into configuration here
|
||||
engineConfiguration->manIdlePosition = positionPercent;
|
||||
}
|
||||
|
@ -144,7 +92,6 @@ static void applyPidSettings() {
|
|||
void setTargetIdleRpm(int value) {
|
||||
setTargetRpmCurve(value);
|
||||
efiPrintf("target idle RPM %d", value);
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
void setIdlePFactor(float value) {
|
||||
|
@ -171,7 +118,6 @@ void setIdleDFactor(float value) {
|
|||
void startIdleBench(void) {
|
||||
engine->timeToStopIdleTest = getTimeNowUs() + MS2US(3000); // 3 seconds
|
||||
efiPrintf("idle valve bench test");
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
@ -235,8 +181,6 @@ void startIdleThread() {
|
|||
|
||||
#if ! EFI_UNIT_TEST
|
||||
|
||||
addConsoleAction("idleinfo", showIdleInfo);
|
||||
|
||||
addConsoleActionII("blipidle", blipIdle);
|
||||
|
||||
// split this whole file into manual controller and auto controller? move these commands into the file
|
||||
|
|
|
@ -49,13 +49,6 @@ float processW202(const CANRxFrame& frame) {
|
|||
|
||||
/* End of specific processing functions */
|
||||
|
||||
void canVssInfo(void) {
|
||||
efiPrintf("vss using can option selected %x", engineConfiguration->canVssNbcType);
|
||||
efiPrintf("vss filter for %x canID", filterCanID);
|
||||
efiPrintf("Vss module is %d", isInit);
|
||||
efiPrintf("CONFIG_enableCanVss is %d", engineConfiguration->enableCanVss);
|
||||
}
|
||||
|
||||
expected<float> processCanRxVssImpl(const CANRxFrame& frame) {
|
||||
switch (engineConfiguration->canVssNbcType){
|
||||
case BMW_e46:
|
||||
|
@ -91,8 +84,6 @@ void processCanRxVss(const CANRxFrame& frame, efitick_t nowNt) {
|
|||
}
|
||||
|
||||
void initCanVssSupport() {
|
||||
addConsoleAction("canvssinfo", canVssInfo);
|
||||
|
||||
if (engineConfiguration->enableCanVss) {
|
||||
if (auto canId = look_up_can_id(engineConfiguration->canVssNbcType)) {
|
||||
filterCanID = canId.Value;
|
||||
|
|
|
@ -44,10 +44,8 @@ public class RecentCommands {
|
|||
private static final String ACCELINFO = "accelinfo";
|
||||
private static final String CANINFO = "caninfo";
|
||||
private static final String TSINFO = "tsinfo";
|
||||
private static final String SPEEDINFO = "speedinfo";
|
||||
private static final String FUELINFO = "fuelinfo";
|
||||
private static final String SDINFO = "sdinfo";
|
||||
private static final String FSIOINFO = "fsioinfo";
|
||||
private static final String PINS = "pins";
|
||||
|
||||
private final static Map<String, Icon> COMMAND_ICONS = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
||||
|
@ -55,23 +53,16 @@ public class RecentCommands {
|
|||
static {
|
||||
COMMAND_ICONS.put(STOPENGINE, AutoupdateUtil.loadIcon("stop.jpg"));
|
||||
ImageIcon infoIcon = AutoupdateUtil.loadIcon("info.png");
|
||||
COMMAND_ICONS.put(SHOWCONFIG, infoIcon);
|
||||
COMMAND_ICONS.put(HELP, AutoupdateUtil.loadIcon("help.jpg"));
|
||||
COMMAND_ICONS.put(SENSORINFO, infoIcon);
|
||||
COMMAND_ICONS.put(CMD_TRIGGERINFO, AutoupdateUtil.loadIcon("trigger.jpg"));
|
||||
COMMAND_ICONS.put(IDLEINFO, infoIcon);
|
||||
COMMAND_ICONS.put(ALTINFO, AutoupdateUtil.loadIcon("alternator.jpg"));
|
||||
COMMAND_ICONS.put(ACCELINFO, infoIcon);
|
||||
COMMAND_ICONS.put(TSINFO, infoIcon);
|
||||
COMMAND_ICONS.put(TPSINFO, infoIcon);
|
||||
COMMAND_ICONS.put(MAPINFO, infoIcon);
|
||||
COMMAND_ICONS.put(CANINFO, infoIcon);
|
||||
COMMAND_ICONS.put(FUELINFO, infoIcon);
|
||||
COMMAND_ICONS.put(SDINFO, AutoupdateUtil.loadIcon("sdinfo.jpg"));
|
||||
COMMAND_ICONS.put(FSIOINFO, infoIcon);
|
||||
COMMAND_ICONS.put(PINS, infoIcon);
|
||||
COMMAND_ICONS.put(Fields.CMD_WRITECONFIG, AutoupdateUtil.loadIcon("writeconfig.jpg"));
|
||||
COMMAND_ICONS.put(SPEEDINFO, AutoupdateUtil.loadIcon("speedinfo.jpg"));
|
||||
}
|
||||
|
||||
private final JPanel content = new JPanel(new GridLayout(NUMBER_OF_COMMANDS + 1, 1));
|
||||
|
@ -118,7 +109,6 @@ public class RecentCommands {
|
|||
add(SENSORINFO);
|
||||
add(CMD_TRIGGERINFO);
|
||||
add(TSINFO);
|
||||
add(SPEEDINFO);
|
||||
add(CANINFO);
|
||||
add(Fields.CMD_WRITECONFIG);
|
||||
add("rewriteconfig");
|
||||
|
@ -136,14 +126,10 @@ public class RecentCommands {
|
|||
add("set_idle_position 50");
|
||||
add("sparkbench 5 400 2");
|
||||
add("fuelbench 5 400 2");
|
||||
add(IDLEINFO);
|
||||
add(ALTINFO);
|
||||
add(TPSINFO);
|
||||
add(MAPINFO);
|
||||
add(ACCELINFO);
|
||||
add(FUELINFO);
|
||||
add(SDINFO);
|
||||
add(FSIOINFO);
|
||||
add(PINS);
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 987 B |
Loading…
Reference in New Issue