Fix for failing test_corrections_WUE_active on blank board

This commit is contained in:
Josh Stewart 2020-02-03 17:36:07 +11:00
parent fd10cb729c
commit 4f5a2bdc35
3 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,6 @@
void initialiseAll()
{
initialisationComplete = false; //Tracks whether the setup() function has run completely
fpPrimed = false;
pinMode(LED_BUILTIN, OUTPUT);

View File

@ -40,6 +40,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef UNIT_TEST // Scope guard for unit testing
void setup()
{
initialisationComplete = false; //Tracks whether the initialiseAll() function has run completely
initialiseAll();
}

View File

@ -25,6 +25,7 @@ void test_corrections_WUE_active(void)
{
//Check for WUE being active
currentStatus.coolant = 0;
((uint8_t*)WUETable.axisX)[9] = 120 + CALIBRATION_TEMPERATURE_OFFSET; //Set a WUE end value of 120
correctionWUE();
TEST_ASSERT_BIT_HIGH(BIT_ENGINE_WARMUP, currentStatus.engine);
}
@ -33,6 +34,7 @@ void test_corrections_WUE_inactive(void)
{
//Check for WUE being inactive due to the temp being too high
currentStatus.coolant = 200;
((uint8_t*)WUETable.axisX)[9] = 120 + CALIBRATION_TEMPERATURE_OFFSET; //Set a WUE end value of 120
correctionWUE();
TEST_ASSERT_BIT_LOW(BIT_ENGINE_WARMUP, currentStatus.engine);
}