private static String convertToMixed(int addressLow,int addressHigh){
  if (addressHigh == 0) {
    if (addressLow >= 120) {
      return "c" + String.valueOf(addressLow - 120) + " ("+ String.valueOf(addressLow)+ ")";
    }
 else     if (addressLow >= 110) {
      return "b" + String.valueOf(addressLow - 110) + " ("+ String.valueOf(addressLow)+ ")";
    }
 else     if (addressLow >= 100) {
      return "a" + String.valueOf(addressLow - 100) + " ("+ String.valueOf(addressLow)+ ")";
    }
 else {
      return String.valueOf(addressLow & 0x7f);
    }
  }
 else {
    return String.valueOf(LOCO_ADR(addressHigh,addressLow));
  }
}

private static String convertToMixed ( int addressLow , int addressHigh ) { if ( addressHigh == 0 ) { if ( addressLow >= 120 ) { return "c" + String . valueOf ( addressLow - 120 ) + " (" + String . valueOf ( addressLow ) + ")" ; } else if ( addressLow >= 110 ) { return "b" + String . valueOf ( addressLow - 110 ) + " (" + String . valueOf ( addressLow ) + ")" ; } else if ( addressLow >= 100 ) { return "a" + String . valueOf ( addressLow - 100 ) + " (" + String . valueOf ( addressLow ) + ")" ; } else { return String . valueOf ( addressLow & 0x7f ) ; } } else { return String . valueOf ( LOCO_ADR ( addressHigh , addressLow ) ) ; } }
this function creates a string representation of the loco address in addresslow & addresshigh in a form appropriate for the type of address ( 2 or 4 digit ) using the digitrax ' mixed mode ' if necessary .
