Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sim_MPPT.c
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Copyright (C) 2009 ENAC, Pascal Brisset, Michel Gorraz
5  *
6  * This file is part of paparazzi.
7  *
8  * paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  *
23  */
24 
25 
26 #include "MPPT.h"
27 #ifndef DOWNLINK_DEVICE
28 #define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
29 #endif
30 #include "messages.h"
32 
33 
34 
36 
38 
39 void MPPT_init( void ) {
40  uint8_t i = 0;
41 
42  for(i = 0; i < NB_DATA; i++)
43  MPPT_data[i] = 42 + i;
44 }
45 
46 void MPPT_periodic( void ) {
48 
49  RunOnceEvery(8, DOWNLINK_SEND_MPPT(DefaultChannel, DefaultDevice, NB_DATA, MPPT_data));
50 }
#define MPPT_ITOTAL_INDEX
Definition: MPPT.h:42
uint8_t MPPT_mode
Definition: sim_MPPT.c:35
void MPPT_init(void)
Definition: sim_MPPT.c:39
#define MPPT_IBAT_INDEX
Definition: MPPT.h:40
#define MPPT_ICONV_INDEX
Definition: MPPT.h:41
signed short int16_t
Definition: types.h:17
static int16_t MPPT_data[NB_DATA]
Definition: sim_MPPT.c:37
unsigned char uint8_t
Definition: types.h:14
#define NB_DATA
Definition: generic_com.c:38
void MPPT_periodic(void)
Definition: sim_MPPT.c:46