public void registerSensor(Sensor s,int i){
  if ((i < 0) || (i >= mNumInputBits)) {
    log.error("Unexpected sensor ordinal in registerSensor: " + Integer.toString(i + 1));
    return;
  }
  if (sensorArray[i] == null) {
    sensorArray[i]=s;
    if (lastUsedSensor < i) {
      lastUsedSensor=i;
    }
    sensorLastSetting[i]=Sensor.UNKNOWN;
    sensorTempSetting[i]=Sensor.UNKNOWN;
    sensorORedSetting[i]=false;
  }
 else {
    log.warn("multiple registration of same sensor: KS" + Integer.toString(i + 1));
  }
}

public void registerSensor ( Sensor s , int i ) { if ( ( i < 0 ) || ( i >= mNumInputBits ) ) { log . error ( "Unexpected sensor ordinal in registerSensor: " + Integer . toString ( i + 1 ) ) ; return ; } if ( sensorArray [ i ] == null ) { sensorArray [ i ] = s ; if ( lastUsedSensor < i ) { lastUsedSensor = i ; } sensorLastSetting [ i ] = Sensor . UNKNOWN ; sensorTempSetting [ i ] = Sensor . UNKNOWN ; sensorORedSetting [ i ] = false ; } else { log . warn ( "multiple registration of same sensor: KS" + Integer . toString ( i + 1 ) ) ; } }
the numbers here are 0 to maxsensors , not 1 to maxsensors .
