mirror of https://github.com/FOME-Tech/fome-fw.git
cherry picks
This commit is contained in:
parent
ca536bbc5c
commit
40ce5a1a73
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue