auto-sync
This commit is contained in:
parent
b298f29f14
commit
ff9af5294f
|
@ -201,6 +201,9 @@ void setDodgeNeonNGCEngineConfiguration(engine_configuration_s *engineConfigurat
|
|||
setThermistorConfiguration(&engineConfiguration->cltThermistorConf, 0, 32500, 30, 7550, 100, 700);
|
||||
engineConfiguration->cltThermistorConf.bias_resistor = 10000;
|
||||
|
||||
setThermistorConfiguration(&engineConfiguration->iatThermistorConf, 0, 32500, 30, 7550, 100, 700);
|
||||
engineConfiguration->iatThermistorConf.bias_resistor = 10000;
|
||||
|
||||
/**
|
||||
* MAP D17/W5
|
||||
*/
|
||||
|
|
|
@ -117,10 +117,16 @@ void readFromFlash(void) {
|
|||
engineConfiguration->firmwareVersion = getRusEfiVersion();
|
||||
}
|
||||
|
||||
void initFlash(void) {
|
||||
static void rewriteConfig(Engine *engine) {
|
||||
doResetConfiguration();
|
||||
writeToFlash();
|
||||
}
|
||||
|
||||
void initFlash(Engine *engine) {
|
||||
initLogging(&logger, "Flash memory");
|
||||
|
||||
addConsoleAction("readconfig", readFromFlash);
|
||||
addConsoleAction("writeconfig", writeToFlash);
|
||||
addConsoleAction("resetconfig", doResetConfiguration);
|
||||
addConsoleActionP("rewriteconfig", (VoidPtr)rewriteConfig, engine);
|
||||
}
|
||||
|
|
|
@ -10,16 +10,13 @@
|
|||
#define FLASH_MAIN_H_
|
||||
|
||||
#include "engine_configuration.h"
|
||||
#include "engine.h"
|
||||
|
||||
#define FLASH_DATA_VERSION 5014
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
void readFromFlash(void);
|
||||
void initFlash(void);
|
||||
void initFlash(Engine *engine);
|
||||
|
||||
/**
|
||||
* Because of hardware-related issues, stm32f4 chip is totally
|
||||
* frozen while we are writing to internal flash. Writing the configuration takes
|
||||
|
@ -34,8 +31,4 @@ void setNeedToWriteConfiguration(void);
|
|||
bool getNeedToWriteConfiguration(void);
|
||||
void writeToFlashIfPending(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* FLASH_MAIN_H_ */
|
||||
|
|
|
@ -173,7 +173,7 @@ void initHardware(Logging *logger, Engine *engine) {
|
|||
|
||||
palSetPadMode(CONFIG_RESET_SWITCH_PORT, CONFIG_RESET_SWITCH_PIN, PAL_MODE_INPUT_PULLUP);
|
||||
|
||||
initFlash();
|
||||
initFlash(engine);
|
||||
/**
|
||||
* this call reads configuration from flash memory or sets default configuration
|
||||
* if flash state does not look right.
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "status_loop.h"
|
||||
#include "engine_configuration.h"
|
||||
#include "console_io.h"
|
||||
#include "flash_main.h"
|
||||
|
||||
#if EFI_ENGINE_CONTROL
|
||||
#include "main_trigger_callback.h"
|
||||
|
|
|
@ -249,5 +249,5 @@ void firmwareError(const char *fmt, ...) {
|
|||
}
|
||||
|
||||
int getRusEfiVersion(void) {
|
||||
return 20141101;
|
||||
return 20141102;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue