Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
test_digitalSender.cpp File Reference
#include "embedded/digitalSettings.hpp"
#include "unity.h"
#include "embedded/digitalSender.hpp"
#include "metro.h"
Include dependency graph for test_digitalSender.cpp:

Go to the source code of this file.

Macros

#define SDC_LOGIC_CLOSE_SDC_PIN   2
 
#define MASTER_SDC_OUT_PIN   3
 
#define EBS_VALVE_1_PIN   4
 
#define EBS_VALVE_2_PIN   5
 
#define SDC_LOGIC_WATCHDOG_OUT_PIN   6
 
#define UNALLOWED_PIN   0
 

Functions

void setUp (void)
 
void tearDown (void)
 
void test_openSDC_then_closeSDC (void)
 Test the SDC Functions PROTOCOL:
 
void test_enterEmergencyState_and_turn_off_LEDS (void)
 Test the enterEmergency state function PROTOCOL:
 
void test_blinkLED (void)
 Test the blinkLED function The toggle watchdog is the same function as blink LED so we can afirm that passing this test implies that the toggleWatchdog function works PROTOCOL:
 
int main ()
 

Macro Definition Documentation

◆ EBS_VALVE_1_PIN

#define EBS_VALVE_1_PIN   4

Definition at line 13 of file test_digitalSender.cpp.

◆ EBS_VALVE_2_PIN

#define EBS_VALVE_2_PIN   5

Definition at line 14 of file test_digitalSender.cpp.

◆ MASTER_SDC_OUT_PIN

#define MASTER_SDC_OUT_PIN   3

Definition at line 12 of file test_digitalSender.cpp.

◆ SDC_LOGIC_CLOSE_SDC_PIN

#define SDC_LOGIC_CLOSE_SDC_PIN   2

Definition at line 11 of file test_digitalSender.cpp.

◆ SDC_LOGIC_WATCHDOG_OUT_PIN

#define SDC_LOGIC_WATCHDOG_OUT_PIN   6

Definition at line 15 of file test_digitalSender.cpp.

◆ UNALLOWED_PIN

#define UNALLOWED_PIN   0

Definition at line 17 of file test_digitalSender.cpp.

Function Documentation

◆ main()

int main ( void  )

Definition at line 83 of file test_digitalSender.cpp.

Here is the call graph for this function:

◆ setUp()

void setUp ( void  )

Definition at line 22 of file test_digitalSender.cpp.

◆ tearDown()

void tearDown ( void  )

Definition at line 29 of file test_digitalSender.cpp.

◆ test_blinkLED()

void test_blinkLED ( void  )

Test the blinkLED function The toggle watchdog is the same function as blink LED so we can afirm that passing this test implies that the toggleWatchdog function works PROTOCOL:

Attention
PROTOCOL TEST
  1. ASSERT - Observer that LED correctly blinks at 1hz for 10 seconds

Definition at line 73 of file test_digitalSender.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_enterEmergencyState_and_turn_off_LEDS()

void test_enterEmergencyState_and_turn_off_LEDS ( void  )

Test the enterEmergency state function PROTOCOL:

Attention
PROTOCOL TEST
  1. ASSERT - Observe that after only LEDS 2, 3 return on

Definition at line 56 of file test_digitalSender.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_openSDC_then_closeSDC()

void test_openSDC_then_closeSDC ( void  )

Test the SDC Functions PROTOCOL:

Attention
PROTOCOL TEST
  1. ASSERT - Observe that pin 1 and 2 turn on for 3 seconds then turn off

Definition at line 39 of file test_digitalSender.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: