software:firmware
MakAir Firmware
end_of_line_test.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 // INCLUDES ===================================================================
11 
12 // Internal
13 
14 #include "../includes/blower.h"
15 #include "../includes/pressure_valve.h"
16 
22 #define EOL_TEST_ACTIVE 0xa240183a
23 
24 // ENUMS =================================================================
25 
26 enum TestStep {
35  // cppcheck-suppress misra-c2012-12.3
38  // cppcheck-suppress misra-c2012-12.3
40  // cppcheck-suppress misra-c2012-12.3
42  // cppcheck-suppress misra-c2012-12.3
44  // cppcheck-suppress misra-c2012-12.3
46  // cppcheck-suppress misra-c2012-12.3
48  // cppcheck-suppress misra-c2012-12.3
50  // cppcheck-suppress misra-c2012-12.3
52  // cppcheck-suppress misra-c2012-12.3
55  // cppcheck-suppress misra-c2012-12.3
57  // cppcheck-suppress misra-c2012-12.3
60  // cppcheck-suppress misra-c2012-12.3
62  // cppcheck-suppress misra-c2012-12.3
68 };
69 
70 enum TestState {
74 };
75 
76 // CLASS ======================================================================
77 
79 // cppcheck-suppress misra-c2012-5.2 ; false positive
80 class EolTest {
81  public:
83  EolTest();
84 
86  void activate();
87 
93  bool isRunning();
94 
96  void onConfirm();
97 
99  void setupAndStart();
100 
101  private:
103  uint32_t testActive;
104 };
105 
106 extern EolTest eolTest;
Controls the running of the embedded auto tests.
void onConfirm()
Handle EOL confirm control setting from telemetry.
void setupAndStart()
Run test mode.
uint32_t testActive
Test mode activation state.
void activate()
Enable test mode.
bool isRunning()
Check if test mode is enabled.
EolTest()
Default constructor.
TestStep
@ CHECK_ALL_BUTTONS
@ END_SUCCESS
@ START
@ USER_CONFIRMATION_BEFORE_O2_TEST
@ MAX_PRESSURE_REACHED_OK
@ START_O2_TEST
@ CONNECT_MAINS
@ SUPPLY_TO_EXPANDER_NOT_CONNECTED
@ CHECK_UI_SCREEN
@ MAX_PRESSURE_NOT_REACHED
@ O2_PRESSURE_NOT_REACH
@ LEAK_IS_TOO_HIGH
@ CHECK_FAN
@ WAIT_USER_BEFORE_LONG_RUN
@ BATTERY_DEEP_DISCHARGE
@ TEST_BAT_DEAD
@ MIN_PRESSURE_NOT_REACHED
@ DISCONNECT_MAINS
@ DISPLAY_FLOW
@ PLUG_AIR_TEST_SYTEM
@ START_LONG_RUN_BLOWER
@ REACH_NULL_PRESSURE
@ START_LEAK_MESURE
@ REACH_MAX_PRESSURE
@ PRESSURE_NOT_STABLE
@ DISPLAY_PRESSURE
@ FLOW_NOT_STABLE
@ CHECK_BUZZER
EolTest eolTest
TestState
@ STATE_IN_PROGRESS
@ STATE_SUCCESS
@ STATE_ERROR