auto-sync

This commit is contained in:
rusEfi 2015-01-07 22:05:00 -06:00
parent 5cce51a0d1
commit a647f1f3ab
8 changed files with 43 additions and 40 deletions

View File

@ -370,12 +370,7 @@ void setDodgeNeonNGCEngineConfiguration(engine_configuration_s *engineConfigurat
boardConfiguration->tunerStudioSerialSpeed = 9600; boardConfiguration->tunerStudioSerialSpeed = 9600;
engineConfiguration->algorithm = LM_SPEED_DENSITY; engineConfiguration->algorithm = LM_SPEED_DENSITY;
engineConfiguration->isJoystickEnabled = true; setFrankenso0_1_joystick(engineConfiguration);
boardConfiguration->joystickCenterPin = GPIOD_10;
boardConfiguration->joystickAPin = GPIOD_8;
boardConfiguration->joystickBPin = GPIO_UNASSIGNED;
boardConfiguration->joystickCPin = GPIOD_9;
boardConfiguration->joystickDPin = GPIOD_11;
// engineConfiguration->isCanEnabled = true; // engineConfiguration->isCanEnabled = true;
boardConfiguration->canTxPin = GPIOB_6; boardConfiguration->canTxPin = GPIOB_6;

View File

@ -161,12 +161,6 @@ case SPI_CS_HIP9011:
return "SPI_CS_HIP9011"; return "SPI_CS_HIP9011";
case SPI_CS_SD_MODULE: case SPI_CS_SD_MODULE:
return "SPI_CS_SD_MODULE"; return "SPI_CS_SD_MODULE";
case TRIGGER_EMULATOR_3RD:
return "TRIGGER_EMULATOR_3RD";
case TRIGGER_EMULATOR_PRIMARY:
return "TRIGGER_EMULATOR_PRIMARY";
case TRIGGER_EMULATOR_SECONDARY:
return "TRIGGER_EMULATOR_SECONDARY";
} }
return NULL; return NULL;
} }

View File

@ -736,6 +736,16 @@ void commonFrankensoAnalogInputs(engine_configuration_s *engineConfiguration) {
engineConfiguration->bc.adcHwChannelEnabled[14] = ADC_SLOW; engineConfiguration->bc.adcHwChannelEnabled[14] = ADC_SLOW;
} }
void setFrankenso0_1_joystick(engine_configuration_s *engineConfiguration) {
engineConfiguration->isJoystickEnabled = true;
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
boardConfiguration->joystickCenterPin = GPIOC_8;
boardConfiguration->joystickAPin = GPIOD_10;
boardConfiguration->joystickBPin = GPIO_UNASSIGNED;
boardConfiguration->joystickCPin = GPIOD_9;
boardConfiguration->joystickDPin = GPIOD_11;
}
void copyFuelTable(fuel_table_t const source, fuel_table_t destination) { void copyFuelTable(fuel_table_t const source, fuel_table_t destination) {
for (int k = 0; k < FUEL_LOAD_COUNT; k++) { for (int k = 0; k < FUEL_LOAD_COUNT; k++) {
for (int r = 0; r < FUEL_RPM_COUNT; r++) { for (int r = 0; r < FUEL_RPM_COUNT; r++) {

View File

@ -639,6 +639,7 @@ void incrementGlobalConfigurationVersion(void);
int getGlobalConfigurationVersion(void); int getGlobalConfigurationVersion(void);
void commonFrankensoAnalogInputs(engine_configuration_s *engineConfiguration); void commonFrankensoAnalogInputs(engine_configuration_s *engineConfiguration);
void setFrankenso0_1_joystick(engine_configuration_s *engineConfiguration);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -63,10 +63,6 @@ typedef enum {
IO_INVALID, IO_INVALID,
TRIGGER_EMULATOR_PRIMARY,
TRIGGER_EMULATOR_SECONDARY,
TRIGGER_EMULATOR_3RD,
ELECTRONIC_THROTTLE_CONTROL_1, ELECTRONIC_THROTTLE_CONTROL_1,
ELECTRONIC_THROTTLE_CONTROL_2, ELECTRONIC_THROTTLE_CONTROL_2,
ELECTRONIC_THROTTLE_CONTROL_3, ELECTRONIC_THROTTLE_CONTROL_3,

View File

@ -33,33 +33,38 @@ static MenuItem miTrigger(tree.root, "trigger");
static MenuItem miBench(tree.root, "bench test"); static MenuItem miBench(tree.root, "bench test");
static MenuItem miAbout(tree.root, "about"); static MenuItem miAbout(tree.root, "about");
static MenuItem miTestFan(&miAbout, "test fan"); static MenuItem miClt(&miSensors, LL_CLT_TEMPERATURE);
static MenuItem miTestFuelPump(&miAbout, "test pump"); static MenuItem miIat(&miSensors, LL_IAT_TEMPERATURE);
static MenuItem miTestSpark1(&miAbout, "test spark1");
static MenuItem miTestSpark2(&miAbout, "test spark2"); static MenuItem miTestFan(&miBench, "test fan");
static MenuItem miTestSpark3(&miAbout, "test spark3"); static MenuItem miTestFuelPump(&miBench, "test pump");
static MenuItem miTestSpark4(&miAbout, "test spark4"); static MenuItem miTestSpark1(&miBench, "test spark1");
static MenuItem miTestInj1(&miAbout, "test injector1"); static MenuItem miTestSpark2(&miBench, "test spark2");
static MenuItem miTestInj2(&miAbout, "test injector2"); static MenuItem miTestSpark3(&miBench, "test spark3");
static MenuItem miTestInj3(&miAbout, "test injector3"); static MenuItem miTestSpark4(&miBench, "test spark4");
static MenuItem miTestInj4(&miAbout, "test injector4"); static MenuItem miTestInj1(&miBench, "test injector1");
static MenuItem miTestInj2(&miBench, "test injector2");
static MenuItem miTestInj3(&miBench, "test injector3");
static MenuItem miTestInj4(&miBench, "test injector4");
static MenuItem miVersion(&miAbout, LL_VERSION); static MenuItem miVersion(&miAbout, LL_VERSION);
static MenuItem miConfig(&miAbout, LL_CONFIG); static MenuItem miConfig(&miAbout, LL_CONFIG);
//static MenuItem miAlgo(&miAbout, LL_ALGORITHM);
#define DISP_LINES (engineConfiguration->HD44780height - 1) #define DISP_LINES (engineConfiguration->HD44780height - 1)
static int infoIndex = 0;
static int cursorY = 0;
void onJoystick(joystick_button_e button) { void onJoystick(joystick_button_e button) {
if (cursorY == TOTAL_OPTIONS - 1) { /**
cursorY = infoIndex = 0; * this method is invoked on EXTI IRQ thread
} else { */
cursorY++; if (button == JB_CENTER) {
if (cursorY - DISP_LINES >= infoIndex) tree.enterSubMenu();
infoIndex++; } else if (button == JB_BUTTON_D) {
tree.nextItem();
} else if (button == JB_BUTTON_A) {
tree.back();
} }
// actual repaint happends in the repaint loop
} }
char * appendStr(char *ptr, const char *suffix) { char * appendStr(char *ptr, const char *suffix) {
@ -207,7 +212,7 @@ void updateHD44780lcd(Engine *engine) {
p = p->next; p = p->next;
} }
for(; count < tree.linesCount && p != NULL; count++) { for (; count < tree.linesCount; count++) {
lcd_HD44780_set_position(count, 0); lcd_HD44780_set_position(count, 0);
for (int r = 0; r < 20; r++) { for (int r = 0; r < 20; r++) {
lcd_HD44780_print_char(' '); lcd_HD44780_print_char(' ');

View File

@ -26,6 +26,8 @@ extern PwmConfig triggerSignal;
extern OutputPin outputs[IO_PIN_COUNT]; extern OutputPin outputs[IO_PIN_COUNT];
static OutputPin emulatorOutputs[3];
void initTriggerEmulator(Engine *engine) { void initTriggerEmulator(Engine *engine) {
engine_configuration_s *engineConfiguration = engine->engineConfiguration; engine_configuration_s *engineConfiguration = engine->engineConfiguration;
@ -34,9 +36,9 @@ void initTriggerEmulator(Engine *engine) {
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__) #if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
print("Emulating %s\r\n", getConfigurationName(engineConfiguration->engineType)); print("Emulating %s\r\n", getConfigurationName(engineConfiguration->engineType));
triggerSignal.outputPins[0] = &outputs[(int)TRIGGER_EMULATOR_PRIMARY]; triggerSignal.outputPins[0] = &emulatorOutputs[0];
triggerSignal.outputPins[1] = &outputs[(int)TRIGGER_EMULATOR_SECONDARY]; triggerSignal.outputPins[1] = &emulatorOutputs[1];
triggerSignal.outputPins[2] = &outputs[(int)TRIGGER_EMULATOR_3RD]; triggerSignal.outputPins[2] = &emulatorOutputs[2];
#if EFI_PROD_CODE #if EFI_PROD_CODE
// todo: refactor, make this a loop // todo: refactor, make this a loop

View File

@ -2598,7 +2598,7 @@
<group> <group>
<name>lcd</name> <name>lcd</name>
<file> <file>
<name>$PROJ_DIR$\..\hw_layer\lcd\lcd_HD44780.c</name> <name>$PROJ_DIR$\..\hw_layer\lcd\lcd_HD44780.cpp</name>
</file> </file>
<file> <file>
<name>$PROJ_DIR$\..\hw_layer\lcd\lcd_HD44780.h</name> <name>$PROJ_DIR$\..\hw_layer\lcd\lcd_HD44780.h</name>