init the analogDigitalTransitionStart with 9.2 if nothing set in config

This commit is contained in:
Frank Haverland
2022-10-17 22:22:47 +02:00
parent be8598bcaa
commit bc46149573
3 changed files with 11 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ void test_analogToDigit_Standard() {
// Standard: dig=6.8, ana=1.0 => erg=7
// Transition = nein
// Versatz = nein
TEST_ASSERT_EQUAL_INT(7, undertest->ZeigerEvalAnalogToDigitNeu( 6.8, 8.6, 6, 9.2));
TEST_ASSERT_EQUAL_INT(7, undertest->ZeigerEvalAnalogToDigitNeu( 6.8, 1.0, 1, 9.2));
}
@@ -85,4 +85,12 @@ void test_analogToDigit_Transition() {
TEST_ASSERT_EQUAL_INT(9, undertest->ZeigerEvalAnalogToDigitNeu( 9.8, 0.1, 9, 9.2));
// https://github.com/jomjol/AI-on-the-edge-device/issues/1110#issuecomment-1277425333
// Standard: dig=5.9, ana=9.4 => erg=9
// Transition = ja
// Nulldurchgang = nein
// Versatz = nein
// Besonderheit:
TEST_ASSERT_EQUAL_INT(5, undertest->ZeigerEvalAnalogToDigitNeu( 5.9, 9.4, 9, 9.2));
}