Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
light_solar.c File Reference

University of Reading solar radiation sensor interface. More...

#include "mcu_periph/adc.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "modules/meteo/light_solar.h"
+ Include dependency graph for light_solar.c:

Go to the source code of this file.

Macros

#define ADC_CHANNEL_LIGHT_SOLAR_UP   ADC_1
 
#define ADC_CHANNEL_LIGHT_SOLAR_DN   ADC_2
 
#define ADC_CHANNEL_LIGHT_NB_SAMPLES   16
 

Functions

void light_solar_init (void)
 
void light_solar_periodic (void)
 

Variables

uint16_t up [LIGHT_NB]
 
uint16_t dn [LIGHT_NB]
 
int32_t light_cnt
 
static struct adc_buf buf_light_sol_up
 
static struct adc_buf buf_light_sol_dn
 

Detailed Description

University of Reading solar radiation sensor interface.

This reads the values for intensity from the University of Reading solar sensor.

Definition in file light_solar.c.

Macro Definition Documentation

◆ ADC_CHANNEL_LIGHT_NB_SAMPLES

#define ADC_CHANNEL_LIGHT_NB_SAMPLES   16

Definition at line 44 of file light_solar.c.

◆ ADC_CHANNEL_LIGHT_SOLAR_DN

#define ADC_CHANNEL_LIGHT_SOLAR_DN   ADC_2

Definition at line 40 of file light_solar.c.

◆ ADC_CHANNEL_LIGHT_SOLAR_UP

#define ADC_CHANNEL_LIGHT_SOLAR_UP   ADC_1

Definition at line 37 of file light_solar.c.

Function Documentation

◆ light_solar_init()

void light_solar_init ( void  )

Definition at line 54 of file light_solar.c.

References adc_buf_channel(), ADC_CHANNEL_LIGHT_NB_SAMPLES, ADC_CHANNEL_LIGHT_SOLAR_DN, ADC_CHANNEL_LIGHT_SOLAR_UP, buf_light_sol_dn, buf_light_sol_up, and light_cnt.

+ Here is the call graph for this function:

◆ light_solar_periodic()

void light_solar_periodic ( void  )

Variable Documentation

◆ buf_light_sol_dn

struct adc_buf buf_light_sol_dn
static

Definition at line 52 of file light_solar.c.

Referenced by light_solar_init(), and light_solar_periodic().

◆ buf_light_sol_up

struct adc_buf buf_light_sol_up
static

Definition at line 51 of file light_solar.c.

Referenced by light_solar_init(), and light_solar_periodic().

◆ dn

◆ light_cnt

int32_t light_cnt

Definition at line 49 of file light_solar.c.

Referenced by light_solar_init(), and light_solar_periodic().

◆ up