@Override public String getFormattedResult() { return getResult(); }
/** * <p>getFormattedResult.</p> * * @return a {@link java.lang.String} object. */ public String getFormattedResult() { return useImperialUnits ? String.format("%.2f%s", getImperialUnit(), getResultUnit()) : String.format("%d%s", km, getResultUnit()); }
/** * <p>getFormattedResult.</p> * * @return a {@link java.lang.String} object. */ public String getFormattedResult() { return useImperialUnits ? String.format("%.2f%s", getImperialUnit(), getResultUnit()) : String.format("%d%s", km, getResultUnit()); }
cmds.add(new ModuleVoltageCommand()); cmds.add(new EquivalentRatioCommand()); cmds.add(new DistanceMILOnCommand()); cmds.add(new DtcNumberCommand()); cmds.add(new TimingAdvanceCommand()); cmds.add(new TroubleCodesCommand()); cmds.add(new VinCommand());
/** * {@inheritDoc} */ @Override protected void performCalculations() { final String result = getResult(); String workingData; if (result.contains(":")) {//CAN(ISO-15765) protocol. workingData = result.replaceAll(".:", "").substring(9);//9 is xxx490201, xxx is bytes of information to follow. Matcher m = Pattern.compile("[^a-z0-9 ]", Pattern.CASE_INSENSITIVE).matcher(convertHexToString(workingData)); if(m.find()) workingData = result.replaceAll("0:49", "").replaceAll(".:", ""); } else {//ISO9141-2, KWP2000 Fast and KWP2000 5Kbps (ISO15031) protocols. workingData = result.replaceAll("49020.", ""); } vin = convertHexToString(workingData).replaceAll("[\u0000-\u001f]", ""); }
final String result = getResult(); String workingData; int startIndex = 0;//Header size. byte b1 = hexStringToByteArray(workingData.charAt(begin)); int ch1 = ((b1 & 0xC0) >> 6); int ch2 = ((b1 & 0x30) >> 4);
final String result = getResult(); String workingData; int startIndex = 0;//Header size. byte b1 = hexStringToByteArray(workingData.charAt(begin)); int ch1 = ((b1 & 0xC0) >> 6); int ch2 = ((b1 & 0x30) >> 4);
final String result = getResult(); String workingData; int startIndex = 0;//Header size. byte b1 = hexStringToByteArray(workingData.charAt(begin)); int ch1 = ((b1 & 0xC0) >> 6); int ch2 = ((b1 & 0x30) >> 4);
/** {@inheritDoc} */ @Override public String getFormattedResult() { return String.format("%.1f%s", voltage, getResultUnit()); }
/** {@inheritDoc} */ @Override public String getCalculatedResult() { return useImperialUnits ? String.valueOf(getImperialUnit()) : String.valueOf(km); }
/** {@inheritDoc} */ @Override public String getCalculatedResult() { return useImperialUnits ? String.valueOf(getImperialUnit()) : String.valueOf(km); }
@Override public String getCalculatedResult() { return getResult(); }
@Override protected void performCalculations() { final String result = getResult(); ignitionOn = result.equalsIgnoreCase("ON"); }