#490 configuration validation
This commit is contained in:
parent
29878fcb4f
commit
373da8607f
|
@ -1748,9 +1748,9 @@ typedef enum {
|
|||
CUSTOM_OBD_TS_PAGE_MISMATCH = 6052,
|
||||
CUSTOM_OBD_TS_OUTPUT_MISMATCH = 6053,
|
||||
CUSTOM_TOO_LONG_CRANKING_FUEL_INJECTION = 6054,
|
||||
CUSTOM_OBD_55 = 6055,
|
||||
CUSTOM_INTERPOLATE_NAN = 6055,
|
||||
ERROR_HISTO_NAME = 6056,
|
||||
CUSTOM_OBD_57 = 6057,
|
||||
CUSTOM_AUX_OUT_OF_ORDER = 6057,
|
||||
CUSTOM_OBD_58 = 6058,
|
||||
CUSTOM_OBD_59 = 6059,
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ int findIndex(const float array[], int size, float value) {
|
|||
*/
|
||||
float interpolate2d(const char *msg, float value, float bin[], float values[], int size) {
|
||||
if (isnan(value)) {
|
||||
firmwareError(CUSTOM_OBD_55, "NaN in interpolate2d %s", msg);
|
||||
firmwareError(CUSTOM_INTERPOLATE_NAN, "NaN in interpolate2d %s", msg);
|
||||
return NAN;
|
||||
}
|
||||
int index = findIndexMsg("value", bin, size, value);
|
||||
|
|
|
@ -100,5 +100,12 @@ void updateAuxValves(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engine->engineState.auxValveEnd = interpolate2d("aux", x,
|
||||
engineConfiguration->fsioCurve2Bins,
|
||||
engineConfiguration->fsioCurve2, FSIO_CURVE_16);
|
||||
|
||||
if (engine->engineState.auxValveStart >= engine->engineState.auxValveEnd) {
|
||||
// this is a fatal error to make this really visible
|
||||
firmwareError(CUSTOM_AUX_OUT_OF_ORDER, "out of order at %f %f %f", x,
|
||||
engine->engineState.auxValveStart,
|
||||
engine->engineState.auxValveEnd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -260,5 +260,5 @@ int getRusEfiVersion(void) {
|
|||
if (initBootloader() != 0)
|
||||
return 123;
|
||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||
return 20171203;
|
||||
return 20171208;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue