repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
Cc618/OctOs | src/kernel/std/mem.h | #pragma once
// Functions to handle memory
#include <std/types.h>
namespace std
{
// Constants //
// Video
constexpr sz VIDEO_MEMORY_WIDTH = 80;
constexpr sz VIDEO_MEMORY_HEIGHT = 25;
constexpr sz VIDEO_MEMORY_START = 0xB8000;
constexpr sz VIDEO_MEMORY_CHAR_COUNT = VIDEO_MEMORY_WIDTH * VIDEO_MEMORY_HEIGHT;
co... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/High_lvl/High_lvl.c | /*
* Flight_mode.c
*
* Created on: Dec 13, 2020
* Author: Théo
*/
#include "../High_lvl/High_lvl.h"
static system_t * sys ;
static high_level_state_names_e current_state = HIGH_LVL_STATE_IDLE;
static high_level_state_names_e next_state = HIGH_LVL_STATE_IDLE;
// ------------------------- Define flights... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/State_Space_Model/Model.h | /*
* Model.h
*
* Created on: 3 juin 2021
* Author: Théo
*/
#ifndef STATE_SPACE_MODEL_MODEL_H_
#define STATE_SPACE_MODEL_MODEL_H_
#include "State_Space_Model.h"
#include "Kalman.h"
typedef enum state_vector_e{
STATE_VECTOR_ANGLE_Y,
STATE_VECTOR_ANGLE_RATE_Y,
STATE_VECTOR_SIZE
}state_vector_e;
typedef e... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/Sensors/acc.c | <reponame>Keyrim/STM32_Test_Area<filename>F407_Kalman/Core/Sensors/acc.c<gh_stars>0
/*
* acc.c
*
* Created on: 1 déc. 2020
* Author: Theo
*/
#include "acc.h"
#include "math.h"
#include "../OS/events/events.h"
static void acc_data_callback(void);
float filter_config [3] = {0.04f, 1.6f, -0.64f};
//float fi... |
Keyrim/STM32_Test_Area | F407_discovery/Core/Sensors/sensors.h | /*
* sensors.h
*
* Created on: Nov 22, 2020
* Author: Théo
*/
#ifndef SENSORS_SENSORS_H_
#define SENSORS_SENSORS_H_
typedef enum sensor_connectivity_e{
USE_UART,
USE_UART_DMA,
USE_I2C,
USE_I2C_DMA
}sensor_connectivity_e;
typedef enum sensor_state_e{
SENSOR_IDDLE,
SENSOR_NOT_INIT,
SENSOR_NOT_DETEC... |
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/scheduler/scheduler.c | <reponame>Keyrim/STM32_Test_Area
/*
* scheduler.c
*
* Created on: 12 ao�t 2020
* Author: Theo
*/
#include "scheduler.h"
#include "../time.h"
//Variables privées
static task_t * task_queu[TASK_COUNT+1]; //+1 sinon le memoove fait de la merde :/
static uint32_t task_queu_size = 0 ;
static uint32_t task_queu_p... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/Regulation/Regu_orientation.c | /*
* Regu_orientation.c
*
* Created on: Dec 13, 2020
* Author: Théo
*/
#include "Regu_orientation.h"
static regu_orientation_t * regu_orientation ;
static orientation_t * orientation ;
// ------------------------------ Angular Speed Regulation settings -----------------------------------------
float filte... |
Keyrim/STM32_Test_Area | F407_discovery/Drivers/Inc/Sequence_led.h | <reponame>Keyrim/STM32_Test_Area<filename>F407_discovery/Drivers/Inc/Sequence_led.h
/*
* sequence_led.h
*
* Created on: 22 juin 2020
* Author: Th�o
*/
#ifndef LIB_PERSO_SEQUENCE_LED_H_
#define LIB_PERSO_SEQUENCE_LED_H_
#include "stm32f4xx_hal.h"
#include "../../Core/OS/macro_types.h"
#define SEQUENCE_LED_... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/Sensors/sensors.h | /*
* sensors.h
*
* Created on: Nov 22, 2020
* Author: Théo
*/
#ifndef SENSORS_SENSORS_H_
#define SENSORS_SENSORS_H_
typedef enum sensor_connectivity_e{
USE_UART,
USE_UART_DMA,
USE_I2C,
USE_I2C_DMA
}sensor_connectivity_e;
typedef enum sensor_init_e{
SENSOR_INIT_OK,
SENSOR_INIT_FAIL
}sensor_init_e;
t... |
Keyrim/STM32_Test_Area | F407_Kalman/MatLab/kalman_linearised_continuous_ert_rtw/kalman_linearised_continuous.h | /*
* Primary and Secondary School License - for use in teaching and meeting
* course requirements at primary and secondary schools only. Not for
* government, commercial, university, or other organizational use.
*
* File: kalman_linearised_continuous.h
*
* Code generated for Simulink model 'kalman_linearised_co... |
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/events/events.c | /*
* events.c
*
* Created on: 13 sept. 2020
* Author: Th�o
*/
#include "mask_def.h"
#include "flags.h"
#include "events.h"
//Ensemble des flags
volatile static Mask_t flags ;
volatile static bool_e new_flag_it = FALSE ;
static TIM_HandleTypeDef * htim_event ;
static system_t * sys ;
//Si false, init du m... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/State_Space_Model/State_Space_Model.h | /*
* State_Space_Model.h
*
* Created on: 2 juin 2021
* Author: Théo
*/
#ifndef STATE_SPACE_MODEL_STATE_SPACE_MODEL_H_
#define STATE_SPACE_MODEL_STATE_SPACE_MODEL_H_
#include "../DSP/Include/arm_math.h"
#define STATE_VECTOR_MAX_SIZE 3 //n
#define INPUT_MAX_SIZE 2 //m
#define OUTPUT_MAX_SIZE 3 //l
ty... |
Keyrim/STM32_Test_Area | F407_Kalman/MatLab/kalman_linearised_continuous_ert_rtw/kalman_linearised_continuous.c | <filename>F407_Kalman/MatLab/kalman_linearised_continuous_ert_rtw/kalman_linearised_continuous.c
/*
* Primary and Secondary School License - for use in teaching and meeting
* course requirements at primary and secondary schools only. Not for
* government, commercial, university, or other organizational use.
*
* F... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/High_lvl/iddle.c | <gh_stars>0
/*
* iddle.c
*
* Created on: 10 avr. 2021
* Author: Théo
*/
#include "../High_lvl/High_lvl.h"
void idle_entrance(system_t * sys){
REGULATION_ORIENTATION_Set_Regulation_Mode(REGULATION_MODE_OFF);
}
void idle_main(system_t * sys, uint32_t time_us){
//For now we just do nada
}
|
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/events/events.c | <reponame>Keyrim/STM32_Test_Area
/*
* events.c
*
* Created on: 13 sept. 2020
* Author: Th�o
*/
#include "mask_def.h"
#include "flags.h"
#include "events.h"
#define CLEAR_FLAG_FLIGHT_MODE flags = MASK_and(flags, mask_flight_mode_clear)
//Ensemble des flags
static Mask_t flags ;
//Si false, init du module ... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/scheduler/scheduler.c | <gh_stars>0
/*
* scheduler.c
*
* Created on: 12 ao�t 2020
* Author: Theo
*/
#include "scheduler.h"
#include "../time.h"
//Variables privées
static task_t * task_queu[TASK_COUNT];
static uint32_t task_queu_size = 0 ;
static uint32_t task_queu_position = 0 ;
static system_t * sys ;
//Task to add or delete
st... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/State_Space_Model/Model.c | <reponame>Keyrim/STM32_Test_Area
/*
* Model.c
*
* Created on: 3 juin 2021
* Author: Théo
*/
#include "Model.h"
//Model's dimension
#define X_SIZE STATE_VECTOR_SIZE
#define U_SIZE CONTROL_VECTOR_SIZE
#define Z_SIZE MEASUREMENT_VECTOR_SIZE
//State space model matrix
static arm_matrix_instance_f32 F ;
sta... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/events/flags.h | /*
* flags.h
*
* Created on: 16 sept. 2020
* Author: Theo
*/
#ifndef EVENTS_FLAGS_H_
#define EVENTS_FLAGS_H_
typedef enum Flags_e{
//Flags
//GYRO
FLAG_GYRO_OK,
FLAG_GYRO_READING,
FLAG_GYRO_DATA_READY,
FLAG_GYRO_FILTERED_DATA_READY,
//ACC
FLAG_ACC_OK,
FLAG_ACC_READING,
FLAG_ACC_DATA_READY,
FL... |
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/events/events.h | <gh_stars>0
/*
* events.h
*
* Created on: 13 sept. 2020
* Author: Th�o
*/
#ifndef EVENTS_EVENTS_H_
#define EVENTS_EVENTS_H_
#include "stm32f4xx_hal.h"
#include "mask_def_enum.h"
#include "mask.h"
#include "../system_d.h"
#define EVENT_NB_MASK_PER_EVENT_MAX 7
typedef enum events_id_main_e{
//Event list... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/events/mask_def_enum.h | <filename>F407_Kalman/Core/OS/events/mask_def_enum.h
/*
* mask_def_enum.h
*
* Created on: 4 oct. 2020
* Author: Th�o
*/
#ifndef EVENTS_MASK_DEF_ENUM_H_
#define EVENTS_MASK_DEF_ENUM_H_
typedef enum{
//MASK_DEF
//Gyro
MASK_GYRO_INIT_OK = 0,
MASK_GYRO_INIT_COUNT,
MASK_GYRO_DATA_READY = 0,
MASK_GYRO_DA... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/events/mask.h | /*
* mask.h
*
* Created on: 16 sept. 2020
* Author: Theo
*/
#ifndef EVENTS_MASK_H_
#define EVENTS_MASK_H_
#define NB_ARRAY_MASK 2
#include "../macro_types.h"
#include "flags.h"
typedef struct{
uint32_t array[NB_ARRAY_MASK] ;
}Mask_t;
//Fonctions qui g�rent les bits / les flags sur les masques
bool_e M... |
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/events/mask_def.c | /*
* mask_def.c
*
* Created on: 17 sept. 2020
* Author: Theo
*/
#include "mask_def.h"
void mask_def_gyro_dma_done(Event_t * event){
//Pas de conditions, si le flag est présent on déclenche ^^
MASK_set_flag(&event->mask_and[MASK_GYRO_DMA_DONE_DMA_IT], FLAG_DMA_GYRO_DONE);
MASK_set_flag(&event->mask_or[... |
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/tasks/task.c | /*
* task.c
*
* Created on: 13 aout 2020
* Author: Theo
*/
#include "task.h"
#include "../scheduler/scheduler.h"
static system_t * sys;
void tasks_init(system_t * sys_){
//On mémorise où se trouve notre structure système
sys = sys_ ;
//Activation des tâches
SCHEDULER_enable_task(TASK_LED, TRUE);
SCH... |
Keyrim/STM32_Test_Area | F407_Kalman/Drivers/Src/Led_rgb.c | /*
* Led_rgb.c
*
* Created on: Dec 3, 2020
* Author: Théo
*/
#include "../Inc/Led_rgb.h"
void LED_RGB_init(led_rgb_t * leds, GPIO_TypeDef * gpio, uint16_t * pin_colors, uint16_t * led_pins, uint8_t nb_led){
//Gpio set
leds->gpio = gpio ;
//Pins color
leds->pin_colors[LED_RGB_COLOR_BLUE] = pin_colors[... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/events/events.h | /*
* events.h
*
* Created on: 13 sept. 2020
* Author: Th�o
*/
#ifndef EVENTS_EVENTS_H_
#define EVENTS_EVENTS_H_
#include "stm32f4xx_hal.h"
#include "mask_def_enum.h"
#include "mask.h"
#include "../system_d.h"
#define EVENT_NB_MASK_PER_EVENT_MAX 7
typedef enum events_id_main_e{
// ----------------- Low... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/tasks/task.c | <gh_stars>0
/*
* task.c
*
* Created on: 13 aout 2020
* Author: Theo
*/
#include "task.h"
#include "../scheduler/scheduler.h"
#include "../Data_Logger/Data_logger.h"
#include "../High_lvl/High_lvl.h"
#include "../events/events.h"
#include "../OS/time.h"
#include "../../config.h"
static system_t * sys;
s... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/time.c | /*
* time.c
*
* Created on: Nov 21, 2020
* Author: Théo
*/
#include "time.h"
uint32_t TIME_us(void)
{
uint32_t t_us;
static uint32_t previous_t_us = 0;
__disable_irq();
t_us = HAL_GetTick() * 1000 + 1000 - SysTick->VAL / 64;
__enable_irq();
//Parfois la hal_get_tick ne s ait pas encore fait incrém... |
Keyrim/STM32_Test_Area | F407_Kalman/Drivers/Src/Pid.c | <reponame>Keyrim/STM32_Test_Area
/*
* pid.c
*
* Created on: 22 mars 2020
* Author: Theo
*/
#include "../Inc/Pid.h"
//renvoit la sortie du pid
float PID_compute(PID_t * pid, float consigne, float measurement){
//Calcul de l'erreur
pid->error = measurement - consigne ;
//Calcul des P I D
pid->P = pid->s... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/Sensors/mpu.c | /*
* mpu.c
*
* Created on: 26 nov. 2020
* Author: Théo
*/
#include "mpu.h"
#include "../OS/time.h"
//Ces trois tableaux sont liés et permettent de savoir pour un I2C donné, quelle est le mpu associé
static I2C_HandleTypeDef * I2C_handlers[NB_MPU_USED] ;
static mpu_t * mpu_handlers[NB_MPU_USED];
static ... |
Keyrim/STM32_Test_Area | F407_Kalman/Drivers/Src/Filters.c | /*
* Filter.c
*
* Created on: 20 ao�t 2020
* Author: Th�o
*/
#include "../Inc/Filters.h"
void FILTER_init(Filter_t * filter, float settings[3], Filter_order_e order){
//Param�tre le filtre
for(int32_t s = 0; s < 3; s++)
filter->settings[s] = settings[s] ;
//Mode de filtrage, first order or second order... |
Keyrim/STM32_Test_Area | F407_Kalman/Drivers/Inc/Filters.h | /*
* filters.h
*
* Created on: 20 ao�t 2020
* Author: Th�o
*/
#ifndef BTM_FILTERS_H_
#define BTM_FILTERS_H_
#include "stm32f4xx_hal.h"
#include "../../Core/OS/macro_types.h"
typedef enum {
FILTER_FIRST_ORDER = 0,
FILTER_SECOND_ORDER,
FILTER_NO_FILTERING
}Filter_order_e;
//Filter structure
typedef str... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/Sensors/mpu.h | /*
* mpu.h
*
* Created on: 26 nov. 2020
* Author: Théo
*/
#ifndef SENSORS_MPU_H_
#define SENSORS_MPU_H_
#include "stm32f4xx_hal.h"
#include "sensors.h"
#include "../OS/macro_types.h"
#define NB_MPU_USED 1
#define MPU_USE_SPI
/* Default I2C address */
#define MPU6050_I2C_ADDR 0xD0
/* MPU6050 regist... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/State_Space_Model/Kalman.h | /*
* Kalman.h
*
* Created on: 10 mai 2021
* Author: Théo
*/
#ifndef KALMAN_KALMAN_H_
#define KALMAN_KALMAN_H_
#include "../DSP/Include/arm_math.h"
#include "../State_Space_Model/State_Space_Model.h"
typedef enum kalman_state_e{
KALMAN_NOT_INIT,
KALMAN_INIT_FAILED,
KALMAN_OK
}kalman_state_e;
typedef st... |
Keyrim/STM32_Test_Area | F407_Kalman/Drivers/Inc/Pid.h | <filename>F407_Kalman/Drivers/Inc/Pid.h
/*
* pid.h
*
* Created on: 22 mars 2020
* Author: Theo
*/
#ifndef PID_H_
#define PID_H_
#include "../../Core/OS/macro_types.h"
#include "Filters.h"
typedef enum{
PID_KP = 0,
PID_KI,
PID_KD,
PID_FREQUENCY,
PID_MAX_OUTPUT,
PID_NB_SETTINGS,
}PID_Settings_nam... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/system_d.h | <filename>F103-nucleo/Core/OS/system_d.h
/*
* system_d.h
*
* Created on: Nov 21, 2020
* Author: Théo
*/
#ifndef OS_SYSTEM_D_H_
#define OS_SYSTEM_D_H_
#include "macro_types.h"
#include "stm32f1xx_hal.h"
#include "../../Drivers/Inc/Sequence_led.h"
typedef struct{
sequence_led_t led ;
}system_t;
#endif ... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/Regulation/Regu_orientation.h | <reponame>Keyrim/STM32_Test_Area<gh_stars>0
/*
* Regu_orientation.h
*
* Created on: Dec 13, 2020
* Author: Théo
*/
#ifndef REGULATION_REGU_ORIENTATION_H_
#define REGULATION_REGU_ORIENTATION_H_
#include "../Estimators/orientation.h"
#include "../../Drivers/Inc/Pid.h"
#include "../config.h"
#define REGU_ORI... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/Estimators/orientation.c | <filename>F407_Kalman/Core/Estimators/orientation.c
/*
* orientation.c
*
* Created on: Dec 6, 2020
* Author: Théo
*/
#include "orientation.h"
#define ORIENTATION_ALPHA 0.998f
static bool_e first_use = TRUE ;
static float angle_180(float x);
static float angle_180(float x){
if(x > 180)
x -= 360;
els... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/events/mask_def.c | <reponame>Keyrim/STM32_Test_Area<filename>F407_Kalman/Core/OS/events/mask_def.c
/*
* mask_def.c
*
* Created on: 17 sept. 2020
* Author: Theo
*/
#include "mask_def.h"
//Prototypes
// ---------------- GYRO ------------------------
static void mask_def_gyro_data_ready(Event_t * event);
static void mask_def_... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/system_d.h | /*
* system_d.h
*
* Created on: Nov 21, 2020
* Author: Théo
*/
#ifndef OS_SYSTEM_D_H_
#define OS_SYSTEM_D_H_
#include "macro_types.h"
#include "stm32f4xx_hal.h"
#include "../Sensors/gyro.h"
#include "../Sensors/acc.h"
#include "../../Drivers/Inc/Motors.h"
#include "../Estimators/orientation.h"
#include "..... |
Keyrim/STM32_Test_Area | F407_Kalman/Drivers/Src/Motors.c | <reponame>Keyrim/STM32_Test_Area<gh_stars>0
/*
* Motors.c
*
* Created on: Dec 13, 2020
* Author: Théo
*/
#include "../Inc/Motors.h"
#include "math.h"
#ifndef MOTOR_MAX_POWER
#define MOTOR_MAX_POWER 500
#endif
void MOTORS_Init(motors_t * motors, TIM_HandleTypeDef * htim, float * input, motor_direction_e d... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/events/mask_def.c | /*
* mask_def.c
*
* Created on: 17 sept. 2020
* Author: Theo
*/
#include "mask_def.h"
|
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/events/events.c | /*
* events.c
*
* Created on: 13 sept. 2020
* Author: Th�o
*/
#include "mask_def.h"
#include "flags.h"
#include "events.h"
#include "../scheduler/scheduler.h"
//Ensemble des flags
volatile static Mask_t flags ;
volatile static bool_e new_flag = FALSE ;
static system_t * sys ;
//Si false, init du module ev... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/Data_Logger/Data_logger.h | <filename>F407_Kalman/Core/Data_Logger/Data_logger.h
/*
* Data_logger.h
*
* Created on: 22 déc. 2020
* Author: theom
*/
#ifndef DATA_LOGGER_DATA_LOGGER_H_
#define DATA_LOGGER_DATA_LOGGER_H_
#include "../OS/system_d.h"
typedef enum data_id_e{
//Complementary filter estimation
DATA_ID_ROLL_ANGLE,
DATA_I... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/time.h | <reponame>Keyrim/STM32_Test_Area<filename>F407_Kalman/Core/OS/time.h<gh_stars>0
/*
* time.h
*
* Created on: Nov 21, 2020
* Author: Théo
*/
#ifndef OS_TIME_H_
#define OS_TIME_H_
#include "stm32f4xx_hal.h"
uint32_t TIME_us(void);
void TIME_delay_us_blocking(uint32_t duration_us);
#endif /* OS_TIME_H_ */
|
Keyrim/STM32_Test_Area | F407_Kalman/Core/Sensors/gyro.c | /*
* gyro.c
*
* Created on: Nov 22, 2020
* Author: Théo
*/
#include "gyro.h"
#include "../OS/events/events.h"
//float filter[3] = {0.02326917552f, 1.694915254f, -0.7181844298f};
float filter[3] = {0.04f, 1.6f, -0.64f};
static void gyro_data_callback(void);
void GYRO_init(gyro_t * gyro, mpu_t * mpu, float... |
Keyrim/STM32_Test_Area | F103-nucleo/Drivers/Src/Sequence_led.c | /*
* sequence_led.c
*
* Created on: 22 juin 2020
* Author: Th�o
*/
#include "../Inc/Sequence_led.h"
//On initialise les paramètres
void LED_SEQUENCE_init(sequence_led_t * seq_led, GPIO_TypeDef* gpio, uint16_t gpio_pin, int32_t init_seq, uint32_t periode, int8_t length_sequence, bool_e output_logic){
//In... |
Keyrim/STM32_Test_Area | F407_Kalman/MatLab/pendulum_simulink_open_loop_ert_rtw/pendulum_simulink_open_loop.h | <reponame>Keyrim/STM32_Test_Area
/*
* Primary and Secondary School License - for use in teaching and meeting
* course requirements at primary and secondary schools only. Not for
* government, commercial, university, or other organizational use.
*
* File: pendulum_simulink_open_loop.h
*
* Code generated for Simu... |
Keyrim/STM32_Test_Area | F407_discovery/Core/Sensors/mpu.c | <gh_stars>0
/*
* mpu.c
*
* Created on: 26 nov. 2020
* Author: Théo
*/
#include "mpu.h"
//Private functions
void convert_gyro(mpu_t * mpu){
mpu->gyro_raw[GYRO_AXE_X] = (int16_t)(mpu->gyro_data[0] << 8 | mpu->gyro_data[1]);
mpu->gyro_raw[GYRO_AXE_Y] = (int16_t)(mpu->gyro_data[2] << 8 | mpu->gyro_data[3]);... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/Data_Logger/Data_logger.c | <reponame>Keyrim/STM32_Test_Area
/*
* Data_logger.c
*
* Created on: 22 déc. 2020
* Author: theom
*/
#include "Data_logger.h"
#include "string.h"
#include "../OS/tasks/task.h"
#include "../OS/scheduler/scheduler.h"
#include "../High_lvl/High_lvl.h"
#include "../State_Space_Model/Model.h"
static system_t * sy... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/High_lvl/full_manual.c | /*
* full_manual.c
*
* Created on: 10 avr. 2021
* Author: Théo
*/
#include "High_lvl.h"
void full_manual_entrance(system_t * sys){
REGULATION_ORIENTATION_Set_Regulation_Mode(REGULATION_MODE_MANUAL);
}
void full_manual_main(system_t * sys, uint32_t time_us){
//nada
}
|
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/tasks/task.h | /*
* task.h
*
* Created on: 13 août 2020
* Author: Théo
*/
#ifndef TASKS_TASK_H_
#define TASKS_TASK_H_
#include "stdint.h"
#include "stdio.h"
#include "../system_d.h"
#define TASK_STAT_AVERAGE_OVER 20 //Moyenne glissante sur X valeurs
#define TASK_DURATION_MAX 800 //On considère qu une tache ne peut dure... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/High_lvl/High_lvl.h | <reponame>Keyrim/STM32_Test_Area
/*
* Flight_mode.h
*
* Created on: Dec 13, 2020
* Author: Théo
*/
#ifndef HIGH_LVL_HIGH_LVL_H_
#define HIGH_LVL_HIGH_LVL_H_
#include "../OS/system_d.h"
typedef enum high_level_state_names_e{
HIGH_LVL_STATE_IDLE = 0x00,
HIGH_LVL_STATE_FULL_MANUAL,
HIGH_LVL_STATE_COUNT
}... |
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/scheduler/scheduler.h | <filename>F407_discovery/Core/OS/scheduler/scheduler.h
/*
* scheduler.h
*
* Created on: 12 ao�t 2020
* Author: Theo
*/
#ifndef SCHEDULER_SCHEDULER_H_
#define SCHEDULER_SCHEDULER_H_
#include "../tasks/task.h"
#include "../macro_types.h"
#include "../debug/debug.h"
#include "../system_d.h"
#include "string.h... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/events/mask_def_enum.h | <filename>F103-nucleo/Core/OS/events/mask_def_enum.h
/*
* mask_def_enum.h
*
* Created on: 4 oct. 2020
* Author: Th�o
*/
#ifndef EVENTS_MASK_DEF_ENUM_H_
#define EVENTS_MASK_DEF_ENUM_H_
typedef enum{
//MASK_DEF
MASK_DEF_LAST
}mask_def_ids_t;
#endif /* EVENTS_MASK_DEF_ENUM_H_ */
|
Keyrim/STM32_Test_Area | F407_Kalman/MatLab/pendulum_simulink_open_loop_ert_rtw/pendulum_simulink_open_loop.c | /*
* Primary and Secondary School License - for use in teaching and meeting
* course requirements at primary and secondary schools only. Not for
* government, commercial, university, or other organizational use.
*
* File: pendulum_simulink_open_loop.c
*
* Code generated for Simulink model 'pendulum_simulink_ope... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/events/events.h | <reponame>Keyrim/STM32_Test_Area
/*
* events.h
*
* Created on: 13 sept. 2020
* Author: Th�o
*/
#ifndef EVENTS_EVENTS_H_
#define EVENTS_EVENTS_H_
#include "mask_def_enum.h"
#include "mask.h"
#define EVENT_NB_MASK_PER_EVENT_MAX 7
typedef enum{
//Event list
EVENT_COUNT
}Id_Events_t;
typedef enum{
EVE... |
Keyrim/STM32_Test_Area | F407_Kalman/Drivers/Inc/Led_rgb.h | <gh_stars>0
/*
* led_rgb.h
*
* Created on: Dec 3, 2020
* Author: Théo
*/
#ifndef INC_LED_RGB_H_
#define INC_LED_RGB_H_
#include "stm32f4xx_hal.h"
#define NB_MAX_LED 2
typedef enum Led_rgb_color_e{
LED_RGB_COLOR_RED,
LED_RGB_COLOR_GREEN,
LED_RGB_COLOR_BLUE
}Led_rgb_color_e;
typedef struct led_rgb_t{
... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/debug/debug.c | <reponame>Keyrim/STM32_Test_Area
/*
* debug.c
*
* Created on: Nov 21, 2020
* Author: Théo
*/
#include "debug.h"
#include "retarget.h"
extern UART_HandleTypeDef huart2 ;
void DEBUG_init(void){
RetargetInit(&huart2);
}
|
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/tasks/task.h | <reponame>Keyrim/STM32_Test_Area<filename>F407_Kalman/Core/OS/tasks/task.h
/*
* task.h
*
* Created on: 13 août 2020
* Author: Théo
*/
#ifndef TASKS_TASK_H_
#define TASKS_TASK_H_
#include "stdint.h"
#include "stdio.h"
#include "../system_d.h"
#define TASK_STAT_AVERAGE_OVER 20 //Moyenne glissante sur X vale... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/OS/debug/debug.h | <filename>F407_Kalman/Core/OS/debug/debug.h
/*
* debug.h
*
* Created on: Nov 21, 2020
* Author: Théo
*/
#ifndef OS_DEBUG_DEBUG_H_
#define OS_DEBUG_DEBUG_H_
#include "retarget.h"
#include "stdio.h"
void DEBUG_init(void);
#endif /* OS_DEBUG_DEBUG_H_ */
|
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/macro_types.h | /*
* macro_types.h
*
* Created on: 30 oct. 2013
* Author: Nirgal
*/
#ifndef MACRO_TYPES_H_
#define MACRO_TYPES_H_
#include <stdio.h>
//Macro permettant d'activer un envoi sur l'UART de ce qui est affich� sur le LCD...
//Utile si on a pas de LCD par exemple.
#define PRINT_ON_UART_LCD_DISPLAY
#define UNUS... |
Keyrim/STM32_Test_Area | F407_discovery/Core/Sensors/gyro.h | <reponame>Keyrim/STM32_Test_Area<filename>F407_discovery/Core/Sensors/gyro.h
/*
* gyro.h
*
* Created on: Nov 22, 2020
* Author: Théo
*/
#ifndef SENSORS_GYRO_H_
#define SENSORS_GYRO_H_
#include "stm32f4xx_hal.h"
#include "sensors.h"
#include "mpu.h"
#define USE_GYRO_MPU //Gyro currently used
typedef str... |
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/system_d.h | /*
* system_d.h
*
* Created on: Nov 21, 2020
* Author: Théo
*/
#ifndef OS_SYSTEM_D_H_
#define OS_SYSTEM_D_H_
#include "macro_types.h"
#include "stm32f4xx_hal.h"
#include "../Sensors/gyro.h"
#include "../../Drivers/Inc/Sequence_led.h"
typedef struct sensors_t{
//Sensor type
gyro_t gyro ;
//Sensors
mpu... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/State_Space_Model/Kalman.c | /*
* Kalman.c
*
* Created on: 10 mai 2021
* Author: Théo
*/
#include "Kalman.h"
kalman_state_e KALMAN_Init(kalman_t *kalman, State_Space_Model_t * ss ,arm_matrix_instance_f32 * P_predict, arm_matrix_instance_f32 * Q, arm_matrix_instance_f32 * R){
kalman->ss = ss;
//Covariance
kalman->Q = Q;
kalman->R... |
Keyrim/STM32_Test_Area | F407_Kalman/Drivers/Inc/Motors.h | <gh_stars>0
/*
* motors.h
*
* Created on: Dec 13, 2020
* Author: Théo
*/
#ifndef INC_MOTORS_H_
#define INC_MOTORS_H_
#include "stm32f4xx_hal.h"
#include "../../Core/OS/macro_types.h"
typedef enum motors_state_e{
MOTORS_STATE_IDDLE,
MOTORS_STATE_RUNNING
}motors_state_e;
typedef enum motor_direction_e{
... |
Keyrim/STM32_Test_Area | F407_discovery/Core/Sensors/gyro.c | /*
* gyro.c
*
* Created on: Nov 22, 2020
* Author: Théo
*/
#include "gyro.h"
sensor_state_e GYRO_init(gyro_t * gyro, mpu_t *mpu){
#ifdef USE_GYRO_MPU
gyro->raw = gyro->mpu->gyro ;
gyro->mpu = mpu ;
gyro->state = MPU_init_gyro(gyro->mpu, MPU_GYRO_2000s);
#else
gyro->state = SENSOR_ERROR ;
#endif
ret... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/events/flags.h | /*
* flags.h
*
* Created on: 16 sept. 2020
* Author: Theo
*/
#ifndef EVENTS_FLAGS_H_
#define EVENTS_FLAGS_H_
typedef enum{
//Flags
FLAG_COUNT
}Flags_t;
#endif /* EVENTS_FLAGS_H_ */
|
Keyrim/STM32_Test_Area | F407_Kalman/Core/Telemetry/Telemetry.c | <gh_stars>0
/*
* Telemetry.c
*
* Created on: Dec 18, 2020
* Author: Théo
*/
#include "Telemetry.h"
#include "../Data_Logger/Data_logger.h"
#define MAX_TRANSMIT_SPEED 10000 //Permet de rajouter une limite de vitesse (utile dans une précédente application de ce module)
#define PERIODE_1_OCTET (1000000 ... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/Sensors/gyro.c | <filename>F103-nucleo/Core/Sensors/gyro.c
/*
* gyro.c
*
* Created on: Nov 22, 2020
* Author: Théo
*/
#include "gyro.h"
sensor_init_e GYRO_init(gyro_t * gyro, gyros_e name, I2C_HandleTypeDef * hi2c, sensor_connectivity_e connectivity){
sensor_init_e to_return = SENSOR_INIT_FAIL ;
//Config la structure g... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/Sensors/gyro.h | /*
* gyro.h
*
* Created on: Nov 22, 2020
* Author: Théo
*/
#ifndef SENSORS_GYRO_H_
#define SENSORS_GYRO_H_
#include "stm32f1xx_hal.h"
#include "sensors.h"
/* Default I2C address */
#define MPU6050_I2C_ADDR 0xD0
typedef enum gyros_e{
GYRO_MPU6050,
GYRO_COUNT
}gyros_e;
typedef struct gyro_t{
//Prop... |
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/events/mask_def.h | <reponame>Keyrim/STM32_Test_Area<filename>F407_discovery/Core/OS/events/mask_def.h
/*
* mask_def.h
*
* Created on: 17 sept. 2020
* Author: Theo
*/
#ifndef EVENTS_MASK_DEF_H_
#define EVENTS_MASK_DEF_H_
#include "events.h"
#include "mask_def_enum.h"
void mask_def_gyro_dma_done(Event_t * event);
#endif /* E... |
Keyrim/STM32_Test_Area | F407_discovery/Core/OS/events/mask.c | /*
* mask.c
*
* Created on: 16 sept. 2020
* Author: Theo
*/
#include "mask.h"
//Renvoit un mask vide
Mask_t MASK_get_empty_mask(){
Mask_t mask_return ;
for(int32_t m = 0; m < NB_ARRAY_MASK; m++)
mask_return.array[m] = 0 ;
return mask_return ;
}
//Clean tous les flags d un mask
void MASK_clean_every_fl... |
Keyrim/STM32_Test_Area | F407_Kalman/Core/Telemetry/Telemetry.h | <filename>F407_Kalman/Core/Telemetry/Telemetry.h
/*
* Telemetry.h
*
* Created on: Dec 18, 2020
* Author: Théo
*/
#ifndef TELEMETRY_TELEMETRY_H_
#define TELEMETRY_TELEMETRY_H_
#include "stm32f4xx_hal.h"
#define SIZE_PORTION_BUFFER 30
#define NB_PORTION_BUFFER 10
#define LEN_RX_BUFFER 512
typedef enum... |
Keyrim/STM32_Test_Area | F103-nucleo/Core/OS/tasks/task.c | <filename>F103-nucleo/Core/OS/tasks/task.c
/*
* task.c
*
* Created on: 13 aout 2020
* Author: Theo
*/
#include "task.h"
#include "../scheduler/scheduler.h"
static system_t * sys;
void tasks_init(system_t * sys_){
//On mémorise où se trouve notre structure système
sys = sys_ ;
//Activation des tâches
... |
nigelthecoder/sparkfun_articles | 005 - critical sections/examples/cs_example/critical_section.h | /*
* Critical section support macros
*
* MIT License:
*
* Copyright 2022 <NAME>
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* t... |
nigelthecoder/sparkfun_articles | 001 - serial/examples/serial_print_example/serial_utils.h | <filename>001 - serial/examples/serial_print_example/serial_utils.h
/** \file serial_utils.h
* \brief Macros and functions to support printf-like serial output.
*
* This header contains a series of macros and functions to make
* it easier to send printf-like output to the Arduino Serial Monitor app
* when debu... |
nigelthecoder/sparkfun_articles | 006 - fast adc/examples/ex3-generic/fast_adc.h | /** \file fast_adc.h
*
* Fast ADC class declration.
*
* MIT License:
*
* Copyright 2022 <NAME>
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without ... |
nicmcd/libfio | src/fio/InFile.h | <reponame>nicmcd/libfio
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - ... |
satoshichain/satoshicore-old | src/common.h | <gh_stars>1-10
#ifndef LIBCOIN_SERVER_INCLUDE_COMMON_H_
#define LIBCOIN_SERVER_INCLUDE_COMMON_H_
#include <v8.h>
#define REQ_FUN_ARG(I, VAR) \
if (args.Length() <= (I) || !args[I]->IsFunction()) \
return v8::ThrowExcepti... |
slac-epics/pvDatabaseCPP | test/src/powerSupply.h | /* powerSupply.h */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvData is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/**
* @author mrk
* @date 2013.04.02
*/
#ifndef POWERSUPPLY_H
#define POWERSUP... |
slac-epics/pvDatabaseCPP | src/pv/pvPlugin.h | <gh_stars>0
/* pvPlugin.h */
/*
* The License for this software can be found in the file LICENSE that is included with the distribution.
*/
/**
* @author <NAME>
* @date 2017.03
*/
#ifndef PVPLUGIN_H
#define PVPLUGIN_H
#include <string>
#include <map>
#include <pv/lock.h>
#include <pv/bitSet.h>
#include <shareLib... |
slac-epics/pvDatabaseCPP | src/pv/pvStructureCopy.h | <filename>src/pv/pvStructureCopy.h
/* pvStructureCopy.h */
/*
* Copyright information and license terms for this software can be
* found in the file LICENSE that is included with the distribution
*/
/**
* @author <NAME>
* @date 2013.04
*/
#ifndef PVSTRUCTURECOPY_H
#define PVSTRUCTURECOPY_H
#include <string>
#inc... |
slac-epics/pvDatabaseCPP | test/pvDatabaseAllTests.c | /*
* Run pvDatabase tests as a batch.
*
* Do *not* include performance measurements here, they don't help to
* prove functionality (which is the point of this convenience routine).
*/
#include <stdio.h>
#include <epicsThread.h>
#include <epicsUnitTest.h>
#include <epicsExit.h>
/* src */
int testExampleRecord(voi... |
slac-epics/pvDatabaseCPP | src/pv/addRecord.h | <reponame>slac-epics/pvDatabaseCPP<gh_stars>0
/* addRecord.h */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvData is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/**
* @author mrk
* @date 2013.04.1... |
decoda/recastnavigation | RecastDemo/Include/Command.h | <filename>RecastDemo/Include/Command.h
#ifndef COMMAND_H
#define COMMAND_H
void command(int argc, char** argv);
#endif
|
philipocalito/penppml | src/penppml_types.h | #include <Rcpp.h>
#include <RcppEigen.h>
using namespace Rcpp;
typedef Eigen::Map<Eigen::MatrixXd> MapMatd;
typedef Eigen::Map<Eigen::VectorXd> MapVecd;
|
dcirne/study_group | glade/main.c | // Copyright 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... |
dcirne/study_group | gtkmm/hello_world/helloworld.h | //$Id: helloworld.h 2 2003-01-21 13:41:59Z murrayc $ -*- c++ -*-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
*... |
dcirne/study_group | gtkmm/derived/deriveddialog.h | <reponame>dcirne/study_group<gh_stars>1-10
/* libglademm example Copyright (C) 2003 libglademm development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* This program... |
CheranMahalingam/Distributed-Video-Processor | src/file_system/chunk_server.h | <reponame>CheranMahalingam/Distributed-Video-Processor<filename>src/file_system/chunk_server.h
#ifndef CHUNK_SERVER_H
#define CHUNK_SERVER_H
#include <grpc++/grpc++.h>
#include "async_server.h"
#include "concensus_module.h"
#include "chunk_manager.h"
#include "log.h"
#include "grpc_msg_defs.h"
#include "file_system.g... |
CheranMahalingam/Distributed-Video-Processor | src/file_system/chunk_cache_manager.h | <reponame>CheranMahalingam/Distributed-Video-Processor<gh_stars>0
#ifndef CHUNK_CACHE_MANAGER_H
#define CHUNK_CACHE_MANAGER_H
namespace file_system {
class ChunkCacheManager {
public:
ChunkCacheManager();
};
}
#endif
|
CheranMahalingam/Distributed-Video-Processor | src/file_system/lock_manager.h | <filename>src/file_system/lock_manager.h<gh_stars>0
#ifndef LOCK_MANAGER_H
#define LOCK_MANAGER_H
#include <shared_mutex>
#include <unordered_map>
#include <string>
#include <memory>
#include <functional>
namespace file_system {
class LockManager {
public:
enum class LockType {
Read,
Write,
... |
CheranMahalingam/Distributed-Video-Processor | src/common/log.h | #ifndef LOGGER_H
#define LOGGER_H
#include <sstream>
#include <ctime>
#include <iostream>
#include <mutex>
#include <string>
enum class LogLevel {
Error,
Warning,
Info,
Debug
};
class Log {
public:
Log(LogLevel level = LogLevel::Error);
~Log();
template <typename T>
Log& operator<<(... |
CheranMahalingam/Distributed-Video-Processor | src/raft/concensus_module.h | #ifndef CONSENSUS_MODULE_H
#define CONSENSUS_MODULE_H
#include <boost/asio.hpp>
#include <grpc++/grpc++.h>
#include <vector>
#include <string>
#include <memory>
#include <tuple>
#include <random>
#include "raft_client.h"
#include "command_log.h"
#include "commit_channel.h"
#include "snapshot.h"
#include "chunk_manage... |
CheranMahalingam/Distributed-Video-Processor | src/raft/command_log.h | #ifndef COMMAND_LOG_H
#define COMMAND_LOG_H
#include <memory>
#include <string>
#include <vector>
#include <unordered_map>
#include "snapshot.h"
#include "raft.grpc.pb.h"
namespace raft {
class CommandLog {
public:
CommandLog(const std::vector<std::string>& peer_ids);
void AppendLog(const rpc::LogEntry& ne... |
CheranMahalingam/Distributed-Video-Processor | src/orchestrator/orchestration_client.h | #ifndef ORCHESTRATION_CLIENT_H
#define ORCHESTRATION_CLIENT_H
namespace orchestrator {
class OrchestrationClient {
};
}
#endif
|
CheranMahalingam/Distributed-Video-Processor | src/raft/raft_client.h | <filename>src/raft/raft_client.h
#ifndef RAFT_CLIENT_H
#define RAFT_CLIENT_H
#include <grpc++/grpc++.h>
#include <string>
#include <vector>
#include <memory>
#include <unordered_map>
#include "log.h"
#include "grpc_msg_defs.h"
#include "raft.grpc.pb.h"
#include "server.grpc.pb.h"
namespace raft {
using grpc::Channe... |
CheranMahalingam/Distributed-Video-Processor | src/raft/client_callback_queue.h | #ifndef CLIENT_CALLBACK_QUEUE_H
#define CLIENT_CALLBACK_QUEUE_H
#include <grpc++/grpc++.h>
#include <memory>
#include <vector>
#include <string>
#include "concensus_module.h"
#include "log.h"
#include "grpc_msg_defs.h"
#include "raft.grpc.pb.h"
namespace raft {
using grpc::ClientContext;
using grpc::ClientAsyncResp... |
CheranMahalingam/Distributed-Video-Processor | src/raft/raft_server.h | #ifndef RAFT_SERVER_H
#define RAFT_SERVER_H
#include <vector>
#include <grpc++/grpc++.h>
#include "async_server.h"
#include "concensus_module.h"
#include "log.h"
#include "grpc_msg_defs.h"
#include "raft.grpc.pb.h"
#include "server.grpc.pb.h"
namespace raft {
using grpc::ServerCompletionQueue;
using grpc::ServerAsy... |
CheranMahalingam/Distributed-Video-Processor | src/server/server_impl.h | #ifndef SERVER_IMPL_H
#define SERVER_IMPL_H
#include <string>
#include <memory>
#include <grpc++/grpc++.h>
#include "grpc_msg_defs.h"
#include "concensus_module.h"
#include "chunk_manager.h"
#include "chunk_server.h"
#include "raft_server.h"
#include "server.grpc.pb.h"
using grpc::Server;
using grpc::ServerBuilder;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.