use define for range count

This commit is contained in:
David Holdeman 2024-04-06 14:40:59 -05:00 committed by rusefillc
parent 975f178da1
commit 2037e97f53
2 changed files with 3 additions and 2 deletions

View File

@ -21,8 +21,8 @@ void GenericGearController::init() {
void GenericGearController::update() {
SelectedGear gear = SelectedGear::Invalid;
// Loop through possible range states
// 1-9 because 0 is SelectedGear::Invalid
for (int i = 1; i <= 9; i++) {
// 1 based because 0 is SelectedGear::Invalid
for (int i = 1; i <= TCU_RANGE_COUNT; i++) {
float *rangeStates = getRangeStateArray(i);
// Loop through inputs
for (size_t p = 0; p < efi::size(engineConfiguration->tcu_rangeInput); p++) {

View File

@ -164,6 +164,7 @@ struct_no_prefix engine_configuration_s
#define TCU_SOLENOID_COUNT 6
#define RANGE_INPUT_COUNT 6
#define TCU_RANGE_COUNT 11
! Matt says: The problem is the driver chip. Tle9201 can't do 20k. The drivers are too slow. On purpose to reduce EMI
! https://rusefi.com/forum/viewtopic.php?p=47307#p47307