better parameter name

This commit is contained in:
rusefi 2019-02-03 00:50:45 -05:00
parent 2a0d5e4749
commit 5fc0f4dc59
2 changed files with 6 additions and 6 deletions

View File

@ -21,12 +21,12 @@ void SingleWave::init(pin_state_t *pinStates) {
this->pinStates = pinStates; this->pinStates = pinStates;
} }
int SingleWave::getState(int index) { int SingleWave::getState(int switchIndex) {
return pinStates[index]; return pinStates[switchIndex];
} }
void SingleWave::setState(int index, int state) { void SingleWave::setState(int switchIndex, int state) {
pinStates[index] = state; pinStates[switchIndex] = state;
} }
void MultiWave::baseConstructor() { void MultiWave::baseConstructor() {

View File

@ -39,8 +39,8 @@ public:
* todo: confirm that we only deal with two states here, no magic '-1'? * todo: confirm that we only deal with two states here, no magic '-1'?
* @return HIGH or LOW state at given index * @return HIGH or LOW state at given index
*/ */
int getState(int index); int getState(int switchIndex);
void setState(int index, int state); void setState(int switchIndex, int state);
// todo: make this private by using 'getState' and 'setState' methods // todo: make this private by using 'getState' and 'setState' methods
pin_state_t *pinStates; pin_state_t *pinStates;