refactoring: extracting magic constant
This commit is contained in:
parent
9d2cbd682b
commit
74d5799626
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
static GppwmChannel channels[4];
|
static GppwmChannel channels[GPPWM_CHANNELS];
|
||||||
static OutputPin pins[4];
|
static OutputPin pins[GPPWM_CHANNELS];
|
||||||
static SimplePwm outputs[4];
|
static SimplePwm outputs[GPPWM_CHANNELS];
|
||||||
|
|
||||||
static gppwm_Map3D_t table1("GPPWM 1");
|
static gppwm_Map3D_t table1("GPPWM 1");
|
||||||
static gppwm_Map3D_t table2("GPPWM 2");
|
static gppwm_Map3D_t table2("GPPWM 2");
|
||||||
|
|
|
@ -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_LOAD_COUNT 8
|
||||||
#define GPPWM_RPM_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
|
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"
|
custom can_vss_nbc_e 4 bits, U32, @OFFSET@, [0:7], "BMW_e46", "W202"
|
||||||
can_vss_nbc_e canVssNbcType;set can_vss X
|
can_vss_nbc_e canVssNbcType;set can_vss X
|
||||||
|
|
||||||
gppwm_channel[4 iterate] gppwm;
|
gppwm_channel[GPPWM_CHANNELS iterate] gppwm;
|
||||||
|
|
||||||
int[376] mainUnusedEnd;
|
int[376] mainUnusedEnd;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue