Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
test_board.c File Reference
#include <inttypes.h>
#include <string.h>
#include "test_board.h"
#include "std.h"
#include "mcu.h"
#include "mcu_periph/uart.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/sys_time.h"
#include "subsystems/datalink/downlink.h"
#include "led.h"
#include "subsystems/datalink/datalink.h"
#include "generated/settings.h"
#include "lisa/lisa_baro.h"
#include "actuators/actuators_pwm.h"
+ Include dependency graph for test_board.c:

Go to the source code of this file.

Data Structures

struct  TestFuns
 

Macros

#define DATALINK_C
 
#define IdOfMsg(x)   (x[1])
 

Enumerations

enum  UartTestType { OneToThree, ThreeToOne }
 

Functions

static void main_init (void)
 
static void main_periodic_task (void)
 
static void main_event_task (void)
 
static void test_none_start (void)
 
static void test_none_periodic (void)
 
static void test_none_event (void)
 
static void test_baro_start (void)
 
static void test_baro_periodic (void)
 
static void test_baro_event (void)
 
static void test_bldc_start (void)
 
static void test_bldc_periodic (void)
 
static void test_bldc_event (void)
 
static void test_srvo_start (void)
 
static void test_srvo_periodic (void)
 
static void test_srvo_event (void)
 
static void test_uart_start (void)
 
static void test_uart_periodic (void)
 
static void test_uart_event (void)
 
static void all_led_green (void)
 
static void all_led_red (void)
 
static void all_led_off (void)
 
int main (void)
 
void start_test (void)
 
static void test_baro_on_baro_diff (void)
 
static void test_baro_on_baro_abs (void)
 
void dl_parse_msg (void)
 

Variables

struct TestFuns tests []
 
enum TestType cur_test
 
static const uint8_t buf_src [] = { 42, 43, 44, 45, 46, 122, 126, 128 }
 
static uint8_t buf_dest [sizeof(buf_src)]
 
static uint8_t idx_tx
 
static uint8_t idx_rx
 
static enum UartTestType direction
 

Macro Definition Documentation

#define DATALINK_C

Definition at line 25 of file test_board.c.

#define IdOfMsg (   x)    (x[1])

Definition at line 345 of file test_board.c.

Referenced by dl_parse_msg().

Enumeration Type Documentation

Enumerator
OneToThree 
ThreeToOne 

Definition at line 253 of file test_board.c.

Function Documentation

static void all_led_green ( void  )
static

Definition at line 324 of file test_board.c.

References LED_OFF, and LED_ON.

Referenced by test_baro_start(), and test_uart_event().

+ Here is the caller graph for this function:

static void all_led_off ( void  )
static

Definition at line 334 of file test_board.c.

References LED_OFF.

Referenced by start_test().

+ Here is the caller graph for this function:

static void all_led_red ( void  )
static

Definition at line 329 of file test_board.c.

References LED_OFF, and LED_ON.

Referenced by test_uart_event().

+ Here is the caller graph for this function:

void dl_parse_msg ( void  )

NAV

WIND_INFO

Else there is no dl_settings section in the flight plan

Definition at line 347 of file test_board.c.

References DefaultChannel, DefaultDevice, and IdOfMsg.

int main ( void  )

Definition at line 88 of file test_board.c.

References main_event_task(), main_init(), main_periodic_task(), and sys_time_check_and_ack_timer().

+ Here is the call graph for this function:

static void main_event_task ( void  )
inlinestatic

Definition at line 121 of file test_board.c.

References TestFuns::_event, cur_test, and DatalinkEvent.

Referenced by main().

+ Here is the caller graph for this function:

static void main_init ( void  )
inlinestatic

Definition at line 98 of file test_board.c.

References actuators_init(), baro_init(), cur_test, led_init(), mcu_init(), PERIODIC_FREQUENCY, sys_time_register_timer(), and TestTypeBldc.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void main_periodic_task ( void  )
inlinestatic

Definition at line 112 of file test_board.c.

References TestFuns::_periodic, cur_test, DefaultChannel, DefaultDevice, and LED_PERIODIC.

Referenced by main().

+ Here is the caller graph for this function:

void start_test ( void  )

Definition at line 129 of file test_board.c.

References TestFuns::_start, all_led_off(), and cur_test.

+ Here is the call graph for this function:

static void test_baro_event ( void  )
static

Definition at line 181 of file test_board.c.

References BaroEvent, test_baro_on_baro_abs(), and test_baro_on_baro_diff().

+ Here is the call graph for this function:

static void test_baro_on_baro_abs ( void  )
inlinestatic

Definition at line 182 of file test_board.c.

References baro, DefaultChannel, and DefaultDevice.

Referenced by test_baro_event().

+ Here is the caller graph for this function:

static void test_baro_on_baro_diff ( void  )
inlinestatic

Definition at line 185 of file test_board.c.

References baro, DefaultChannel, and DefaultDevice.

Referenced by test_baro_event().

+ Here is the caller graph for this function:

static void test_baro_periodic ( void  )
static

Definition at line 155 of file test_board.c.

References baro_periodic(), DefaultChannel, and DefaultDevice.

+ Here is the call graph for this function:

static void test_baro_start ( void  )
static

Definition at line 154 of file test_board.c.

References all_led_green().

+ Here is the call graph for this function:

static void test_bldc_event ( void  )
static

Definition at line 227 of file test_board.c.

static void test_bldc_periodic ( void  )
static

Definition at line 197 of file test_board.c.

References DefaultChannel, and DefaultDevice.

static void test_bldc_start ( void  )
static

Definition at line 196 of file test_board.c.

static void test_none_event ( void  )
static

Definition at line 144 of file test_board.c.

static void test_none_periodic ( void  )
static

Definition at line 143 of file test_board.c.

static void test_none_start ( void  )
static

Definition at line 142 of file test_board.c.

static void test_srvo_event ( void  )
static

Definition at line 244 of file test_board.c.

static void test_srvo_periodic ( void  )
static

Definition at line 236 of file test_board.c.

References actuators_pwm_commit(), actuators_pwm_values, and foo.

+ Here is the call graph for this function:

static void test_srvo_start ( void  )
static

Definition at line 235 of file test_board.c.

static void test_uart_event ( void  )
static

Definition at line 279 of file test_board.c.

References all_led_green(), all_led_red(), buf_dest, buf_src, DefaultChannel, DefaultDevice, direction, idx_rx, idx_tx, and ThreeToOne.

+ Here is the call graph for this function:

static void test_uart_periodic ( void  )
static

Definition at line 266 of file test_board.c.

References buf_src, direction, idx_tx, OneToThree, and ThreeToOne.

static void test_uart_start ( void  )
static

Definition at line 260 of file test_board.c.

References direction, idx_rx, idx_tx, and OneToThree.

Variable Documentation

uint8_t buf_dest[sizeof(buf_src)]
static

Definition at line 255 of file test_board.c.

Referenced by test_uart_event().

const uint8_t buf_src[] = { 42, 43, 44, 45, 46, 122, 126, 128 }
static

Definition at line 254 of file test_board.c.

Referenced by test_uart_event(), and test_uart_periodic().

enum TestType cur_test

Definition at line 85 of file test_board.c.

Referenced by main_event_task(), main_init(), main_periodic_task(), and start_test().

enum UartTestType direction
static

Definition at line 258 of file test_board.c.

Referenced by test_uart_event(), test_uart_periodic(), and test_uart_start().

uint8_t idx_rx
static

Definition at line 257 of file test_board.c.

Referenced by test_uart_event(), and test_uart_start().

uint8_t idx_tx
static

Definition at line 256 of file test_board.c.

Referenced by test_uart_event(), test_uart_periodic(), and test_uart_start().

struct TestFuns tests[]
Initial value:
= {
{._start=test_none_start, ._periodic=test_none_periodic, ._event=test_none_event},
{._start=test_baro_start, ._periodic=test_baro_periodic, ._event=test_baro_event},
{._start=test_bldc_start, ._periodic=test_bldc_periodic, ._event=test_bldc_event},
{._start=test_srvo_start, ._periodic=test_srvo_periodic, ._event=test_srvo_event},
{._start=test_uart_start, ._periodic=test_uart_periodic, ._event=test_uart_event}
}
static void test_none_start(void)
Definition: test_board.c:142
static void test_uart_periodic(void)
Definition: test_board.c:266
static void test_none_event(void)
Definition: test_board.c:144
static void test_baro_periodic(void)
Definition: test_board.c:155
static void test_baro_start(void)
Definition: test_board.c:154
static void test_uart_start(void)
Definition: test_board.c:260
static void test_srvo_start(void)
Definition: test_board.c:235
static void test_srvo_event(void)
Definition: test_board.c:244
static void test_bldc_event(void)
Definition: test_board.c:227
static void test_bldc_start(void)
Definition: test_board.c:196
static void test_baro_event(void)
Definition: test_board.c:181
static void test_none_periodic(void)
Definition: test_board.c:143
static void test_srvo_periodic(void)
Definition: test_board.c:236
static void test_uart_event(void)
Definition: test_board.c:279
static void test_bldc_periodic(void)
Definition: test_board.c:197

Definition at line 77 of file test_board.c.