auto-sync

This commit is contained in:
rusEfi 2014-12-04 07:03:27 -06:00
parent 33dc802479
commit 6251811f31
3 changed files with 12 additions and 4 deletions

View File

@ -241,9 +241,9 @@ void setDodgeNeonNGCEngineConfiguration(engine_configuration_s *engineConfigurat
engineConfiguration->iatThermistorConf.bias_resistor = 10000;
/**
* MAP D17/W5
* MAP PA6
*/
engineConfiguration->map.sensor.hwChannel = EFI_ADC_0;
engineConfiguration->map.sensor.hwChannel = EFI_ADC_6;
boardConfiguration->adcHwChannelEnabled[0] = ADC_FAST; // ADC0 - PA0 - MAP
boardConfiguration->adcHwChannelEnabled[1] = ADC_SLOW;

View File

@ -245,6 +245,7 @@ typedef struct {
} board_configuration_s;
// 19010105 decimal
#define HEADER_MAGIC_NUMBER 0x1221239
/**

View File

@ -334,8 +334,14 @@ static void setInt(const char *offsetStr, const char *valueStr) {
}
static void getInt(int offset) {
int *ptr = (int *)(&((char *) engine->engineConfiguration)[offset]);
int value = *ptr;
scheduleMsg(&logger, "int @%d is %d", offset, value);
}
static void getFloat(int offset) {
float *ptr = (float *)(((char *) engine->engineConfiguration)[offset]);
float *ptr = (float *)(&((char *) engine->engineConfiguration)[offset]);
float value = *ptr;
scheduleMsg(&logger, "float @%d is %f", offset, value);
}
@ -351,7 +357,7 @@ static void setFloat(const char *offsetStr, const char *valueStr) {
scheduleMsg(&logger, "invalid value [%s]", valueStr);
return;
}
float *ptr = (float *)(((char *) engine->engineConfiguration)[offset]);
float *ptr = (float *)(&((char *) engine->engineConfiguration)[offset]);
*ptr = value;
scheduleMsg(&logger, "setting float @%d to %f", offset, value);
}
@ -468,5 +474,6 @@ void initEngineContoller(Engine *engine) {
addConsoleActionSS("set_float", (VoidCharPtrCharPtr) setFloat);
addConsoleActionSS("set_int", (VoidCharPtrCharPtr) setInt);
addConsoleActionI("get_float", getFloat);
addConsoleActionI("get_int", getInt);
initEval(engine);
}