protected void sendIntensity(double intensity){
  if (log.isDebugEnabled()) {
    log.debug("sendIntensity(" + intensity + ")"+ " lastOutputStep: "+ lastOutputStep+ " maxDimStep: "+ maxDimStep);
  }
  int newStep=(int)Math.round(intensity * maxDimStep);
  if ((newStep < 0) || (newStep > maxDimStep)) {
    log.error("newStep wrong: " + newStep + " intensity: "+ intensity);
  }
  if (newStep == 0) {
    if (log.isDebugEnabled()) {
      log.debug("intensity " + intensity + " within current step, return");
    }
    return;
  }
  X10Sequence out=new X10Sequence();
  out.addExtData(housecode,devicecode,X10Sequence.EXTCMD_DIM,newStep);
  tc.sendX10Sequence(out,null);
  lastOutputStep=newStep;
  if (log.isDebugEnabled()) {
    log.debug("sendIntensity(" + intensity + ") house "+ X10Sequence.houseValueToText(housecode)+ " device "+ devicecode+ " newStep: "+ newStep);
  }
}

protected void sendIntensity ( double intensity ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "sendIntensity(" + intensity + ")" + " lastOutputStep: " + lastOutputStep + " maxDimStep: " + maxDimStep ) ; } int newStep = ( int ) Math . round ( intensity * maxDimStep ) ; if ( ( newStep < 0 ) || ( newStep > maxDimStep ) ) { log . error ( "newStep wrong: " + newStep + " intensity: " + intensity ) ; } if ( newStep == 0 ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "intensity " + intensity + " within current step, return" ) ; } return ; } X10Sequence out = new X10Sequence ( ) ; out . addExtData ( housecode , devicecode , X10Sequence . EXTCMD_DIM , newStep ) ; tc . sendX10Sequence ( out , null ) ; lastOutputStep = newStep ; if ( log . isDebugEnabled ( ) ) { log . debug ( "sendIntensity(" + intensity + ") house " + X10Sequence . houseValueToText ( housecode ) + " device " + devicecode + " newStep: " + newStep ) ; } }
send a dim / bright commands to the x10 hardware to reach a specific intensity . acts immediately , and changes no general state . < p > this sends " dim " commands .
