IZAR Flight Controller 1.0.0
IZAR Flight Controller running with an ESP32.
sensors_reading.c File Reference
#include "sensors_reading/sensors_reading.h"
#include "ble/ble_c.h"
#include "sd/sd_c.h"
#include "sensors_reading/mpu6050/mpu6050_c.h"
#include "sensors_reading/ms5611/ms5611_c.h"
#include "utils/kalman_filter.h"
#include "utils/utils.h"
#include "freertos/queue.h"
#include <esp_log.h>
#include <esp_timer.h>
#include <inttypes.h>
Include dependency graph for sensors_reading.c:

Functions

void sensors_reading ()
 Main FreeRTOS task function for reading all sensors.

Variables

ms5611_t ms5611
mpu6050_dev_t mpu6050 = {0}
FILE * logFile = NULL
ROCKET_STATUS_T rocket_status = PREPARING_FOR_FLIGHT
mpu6050_acceleration_t rocket_accel = {0}
mpu6050_rotation_t rocket_rot = {0}
int32_t rocket_pressure
float rocket_temperature
float rocket_altitude
float rocket_speed
QueueHandle_t xSensorQueue
QueueHandle_t xUpdatedStatusFromFlightController
ROCKET_STATUS_T buff_rocket_status

Function Documentation

◆ sensors_reading()

void sensors_reading ( )

Main FreeRTOS task function for reading all sensors.

Initializes peripherals, reads sensor data in an infinite loop and pushes new data into the queue to notify the flight controller.

< esp_err_t value indicating success (no error)

< esp_err_t value indicating success (no error)

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

Variable Documentation

◆ buff_rocket_status

ROCKET_STATUS_T buff_rocket_status

◆ logFile

FILE* logFile = NULL

◆ mpu6050

mpu6050_dev_t mpu6050 = {0}

◆ ms5611

ms5611_t ms5611

◆ rocket_accel

mpu6050_acceleration_t rocket_accel = {0}

◆ rocket_altitude

float rocket_altitude

◆ rocket_pressure

int32_t rocket_pressure

◆ rocket_rot

mpu6050_rotation_t rocket_rot = {0}

◆ rocket_speed

float rocket_speed

◆ rocket_status

◆ rocket_temperature

float rocket_temperature

◆ xSensorQueue

QueueHandle_t xSensorQueue
extern

◆ xUpdatedStatusFromFlightController

QueueHandle_t xUpdatedStatusFromFlightController
extern