cherry picks

This commit is contained in:
Matthew Kennedy 2023-03-16 11:37:30 -07:00
parent ca536bbc5c
commit 40ce5a1a73
2 changed files with 5 additions and 2 deletions

View File

@ -86,7 +86,7 @@ public class PwmHardwareTest extends RusefiTestBase {
sleep(2 * Timeouts.SECOND);
/* +-1% is still acceptable */
EcuTestHelper.assertSomewhatClose("Idle PWM freq", FREQUENCY, SensorCentral.getInstance().getValue(Sensor.debugIntField1), 0.01);
/* +-2% is still acceptable */
EcuTestHelper.assertSomewhatClose("Idle PWM freq", FREQUENCY, SensorCentral.getInstance().getValue(Sensor.debugIntField1), 0.02);
}
}

View File

@ -29,6 +29,9 @@ public class Value implements Comparable<Value> {
}
public int getIntValue() {
if (value.toLowerCase().startsWith("0x"))
return Integer.parseInt(value.substring(2), 16);
return Integer.parseInt(value);
}