mirror of https://github.com/rusefi/rusefi-1.git
use cylinders_count_t in loops through cylinders (#2563)
to supress signed vs usigned warnings
This commit is contained in:
parent
923967c794
commit
70e0723626
|
@ -135,7 +135,7 @@ static void pinbench(const char *delayStr, const char *onTimeStr, const char *of
|
|||
isBenchTestPending = true; // let's signal bench thread to wake up
|
||||
}
|
||||
|
||||
static void doRunFuel(int humanIndex, const char *delayStr, const char * onTimeStr, const char *offTimeStr,
|
||||
static void doRunFuel(cylinders_count_t humanIndex, const char *delayStr, const char * onTimeStr, const char *offTimeStr,
|
||||
const char *countStr) {
|
||||
if (humanIndex < 1 || humanIndex > engineConfiguration->specs.cylindersCount) {
|
||||
scheduleMsg(logger, "Invalid index: %d", humanIndex);
|
||||
|
@ -240,7 +240,7 @@ static void fuelbench(const char * onTimeStr, const char *offTimeStr, const char
|
|||
fuelbench2("0", "1", onTimeStr, offTimeStr, countStr);
|
||||
}
|
||||
|
||||
static void doRunSpark(int humanIndex, const char *delayStr, const char * onTimeStr, const char *offTimeStr,
|
||||
static void doRunSpark(cylinders_count_t humanIndex, const char *delayStr, const char * onTimeStr, const char *offTimeStr,
|
||||
const char *countStr) {
|
||||
if (humanIndex < 1 || humanIndex > engineConfiguration->specs.cylindersCount) {
|
||||
scheduleMsg(logger, "Invalid index: %d", humanIndex);
|
||||
|
|
|
@ -131,7 +131,7 @@ bool FuelSchedule::addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFF
|
|||
}
|
||||
|
||||
void FuelSchedule::addFuelEvents(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
for (int cylinderIndex = 0; cylinderIndex < CONFIG(specs.cylindersCount); cylinderIndex++) {
|
||||
for (cylinders_count_t cylinderIndex = 0; cylinderIndex < CONFIG(specs.cylindersCount); cylinderIndex++) {
|
||||
InjectionEvent *ev = &elements[cylinderIndex];
|
||||
ev->ownIndex = cylinderIndex; // todo: is this assignment needed here? we now initialize in constructor
|
||||
bool result = addFuelEventsForCylinder(cylinderIndex PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
@ -151,7 +151,7 @@ void FuelSchedule::onTriggerTooth(size_t toothIndex, int rpm, efitick_t nowNt DE
|
|||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < CONFIG(specs.cylindersCount); i++) {
|
||||
for (cylinders_count_t i = 0; i < CONFIG(specs.cylindersCount); i++) {
|
||||
elements[i].onTriggerTooth(toothIndex, rpm, nowNt);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -399,7 +399,7 @@ static int getIgnitionPinForIndex(int cylinderIndex DECLARE_ENGINE_PARAMETER_SUF
|
|||
void prepareIgnitionPinIndices(ignition_mode_e ignitionMode DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
(void)ignitionMode;
|
||||
#if EFI_ENGINE_CONTROL
|
||||
for (int cylinderIndex = 0; cylinderIndex < CONFIG(specs.cylindersCount); cylinderIndex++) {
|
||||
for (cylinders_count_t cylinderIndex = 0; cylinderIndex < CONFIG(specs.cylindersCount); cylinderIndex++) {
|
||||
ENGINE(ignitionPin[cylinderIndex]) = getIgnitionPinForIndex(cylinderIndex PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
#endif /* EFI_ENGINE_CONTROL */
|
||||
|
@ -443,7 +443,7 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
for (int i = 0; i < CONFIG(specs.cylindersCount); i++) {
|
||||
for (cylinders_count_t i = 0; i < CONFIG(specs.cylindersCount); i++) {
|
||||
ENGINE(ignitionPositionWithinEngineCycle[i]) = ENGINE(engineCycle) * i / CONFIG(specs.cylindersCount);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue