refactoring: extracting magic constant

This commit is contained in:
rusefi 2020-05-08 22:05:44 -04:00
parent b4f6c6488f
commit 4364eea7a2
6 changed files with 13 additions and 10 deletions

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Fri May 08 16:32:39 EDT 2020
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Fri May 08 22:00:16 EDT 2020
// by class com.rusefi.output.CHeaderConsumer
// begin
#ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
@ -3144,7 +3144,7 @@ struct engine_configuration_s {
/**
* offset 4144
*/
gppwm_channel gppwm[4];
gppwm_channel gppwm[GPPWM_CHANNELS];
/**
* offset 4496
*/
@ -3452,4 +3452,4 @@ typedef struct persistent_config_s persistent_config_s;
#endif
// end
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Fri May 08 16:32:39 EDT 2020
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Fri May 08 22:00:16 EDT 2020

View File

@ -1159,6 +1159,7 @@
#define gppwm4_table_offset 4432
#define gppwm4_table_offset_hex 1150
#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT"
#define GPPWM_CHANNELS 4
#define GPPWM_LOAD_COUNT 8
#define GPPWM_RPM_COUNT 8
#define gps_rx_pin_offset 656

View File

@ -7,9 +7,9 @@
EXTERN_ENGINE;
static GppwmChannel channels[4];
static OutputPin pins[4];
static SimplePwm outputs[4];
static GppwmChannel channels[GPPWM_CHANNELS];
static OutputPin pins[GPPWM_CHANNELS];
static SimplePwm outputs[GPPWM_CHANNELS];
static gppwm_Map3D_t table1("GPPWM 1");
static gppwm_Map3D_t table2("GPPWM 2");

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Thu May 07 13:45:58 EDT 2020
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Fri May 08 22:00:03 EDT 2020
// by class com.rusefi.output.CHeaderConsumer
// begin
#ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
@ -3144,7 +3144,7 @@ struct engine_configuration_s {
/**
* offset 4144
*/
gppwm_channel gppwm[4];
gppwm_channel gppwm[GPPWM_CHANNELS];
/**
* offset 4496
*/
@ -3452,4 +3452,4 @@ typedef struct persistent_config_s persistent_config_s;
#endif
// end
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Thu May 07 13:45:58 EDT 2020
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Fri May 08 22:00:03 EDT 2020

View File

@ -1159,6 +1159,7 @@
#define gppwm4_table_offset 4432
#define gppwm4_table_offset_hex 1150
#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT"
#define GPPWM_CHANNELS 4
#define GPPWM_LOAD_COUNT 8
#define GPPWM_RPM_COUNT 8
#define gps_rx_pin_offset 656

View File

@ -191,6 +191,7 @@ custom boost_table_t @@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@ array, U08, @O
#define GPPWM_LOAD_COUNT 8
#define GPPWM_RPM_COUNT 8
#define GPPWM_CHANNELS 4
custom gppwm_table_t @@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@ array, U08, @OFFSET@, [@@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@], "duty", 1, 0, 0, 100, 0
@ -1269,7 +1270,7 @@ uint8_t[4] unusuedsw;
custom can_vss_nbc_e 4 bits, U32, @OFFSET@, [0:7], "BMW_e46", "W202"
can_vss_nbc_e canVssNbcType;set can_vss X
gppwm_channel[4 iterate] gppwm;
gppwm_channel[GPPWM_CHANNELS iterate] gppwm;
int[376] mainUnusedEnd;