merc128: engine config defaults #3236
This commit is contained in:
parent
865dc17d15
commit
6307ffd3a6
|
@ -114,8 +114,6 @@ void setBoardConfigOverrides(void) {
|
|||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
|
||||
engineConfiguration->vrThreshold[0].pin = GPIOD_14;
|
||||
}
|
||||
|
||||
void setPinConfigurationOverrides(void) {
|
||||
|
|
|
@ -24,4 +24,4 @@
|
|||
#define show_Frankenso_presets false
|
||||
#define show_microRusEFI_presets false
|
||||
#define show_Proteus_presets false
|
||||
#define show_Hellen128merc_presets false
|
||||
#define show_Hellen128merc_presets true
|
||||
|
|
|
@ -764,7 +764,7 @@ void setHellen72etb(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
|
||||
void setHellenDefaultVrThresholds(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
for (int i = 0;i<VR_THRESHOLD_COUNT;i++) {
|
||||
setLinearCurve(engineConfiguration->vrThreshold[i].rpmBins, 600, 7000, 100);
|
||||
setLinearCurve(engineConfiguration->vrThreshold[i].rpmBins, 600 / RPM_1_BYTE_PACKING_MULT, 7000 / RPM_1_BYTE_PACKING_MULT, 100 / RPM_1_BYTE_PACKING_MULT);
|
||||
setLinearCurve(engineConfiguration->vrThreshold[i].values, PACK_PERCENT_BYTE_MULT * 0.6, PACK_PERCENT_BYTE_MULT * 1.2, PACK_PERCENT_BYTE_MULT * 0.1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
static void common(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setHellenDefaultVrThresholds(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
engineConfiguration->vrThreshold[0].pin = GPIOD_14;
|
||||
}
|
||||
|
||||
void setHellenMercedes128_4_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
|
|
|
@ -678,6 +678,15 @@ bool validateConfig(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
ensureArrayIsAscending("Idle timing", config->idleAdvanceBins);
|
||||
}
|
||||
|
||||
for (size_t index = 0; index < efi::size(CONFIG(vrThreshold)); index++) {
|
||||
auto& cfg = CONFIG(vrThreshold)[index];
|
||||
|
||||
if (cfg.pin == GPIO_UNASSIGNED) {
|
||||
continue;
|
||||
}
|
||||
ensureArrayIsAscending("VR Bins", cfg.rpmBins);
|
||||
ensureArrayIsAscending("VR values", cfg.values);
|
||||
}
|
||||
|
||||
// Boost
|
||||
ensureArrayIsAscending("Boost control TPS", config->boostTpsBins);
|
||||
|
|
|
@ -33,6 +33,7 @@ TEST(util, negativeZero) {
|
|||
TEST(util, crc) {
|
||||
ASSERT_EQ(4, efiRound(4.4, 1));
|
||||
ASSERT_FLOAT_EQ(1.2, efiRound(1.2345, 0.1));
|
||||
ASSERT_FLOAT_EQ(0.2, efiRound(0.2345, 0.1));
|
||||
|
||||
const char * A = "A";
|
||||
|
||||
|
|
Loading…
Reference in New Issue