|
ASCEND Flight Software
|
Main functions for Core 0, responsible for reading data from sensor peripherals. More...
#include <Arduino.h>#include "ErrorDisplay.h"#include "Logger.h"#include "PayloadConfig.h"#include "CommandMessage.h"#include "Sensor.h"#include "AS7331Sensor.h"#include "BMP390Sensor.h"#include "ENS160Sensor.h"#include "ICM20948Sensor.h"#include "INA260Sensor.h"#include "MTK3339Sensor.h"#include "OzoneSensor.h"#include "PCF8523Sensor.h"#include "SHTC3Sensor.h"#include "TMP11xSensor.h"#include "TempSensor.h"Functions | |
| int | verifySensors () |
| void | handleCommand () |
| Handle commands read from serial input. | |
| int | verifySensorRecovery () |
| Uses Device abstraction to verify sensors Incompatible with initial header generation. | |
| String | readSensorData () |
| Read data from each verified Sensor. | |
| uint16_t | readSensorDataPacket (uint8_t *packet) |
| Reads sensor data into a packet byte array. | |
| String | decodePacket (uint8_t *packet) |
| Decodes the packet to a CSV row. | |
| void | handleDataInterface () |
| void | setup () |
| Setup for core 0. | |
| void | loop () |
| Loop for core 0, handling sensor reads. | |
| void | real_setup1 () |
| Setup for core 1. | |
| void | real_loop1 () |
| Loop for core 1. | |
| void | setup1 () |
| void | loop1 () |
Variables | |
| INA260Sensor | ina260_sensor (1000) |
| TempSensor | temp_sensor (1000) |
| MTK3339Sensor | gps_sensor (2000) |
| ICM20948Sensor | icm_sensor (0) |
| PCF8523Sensor | rtc_sensor (1000) |
| TMP11xSensor | tmp_sensor (500, &STRATOCORE_I2c) |
| AS7331Sensor | uv_sensor_out (500, UV_I2C_ADDR) |
| ENS160Sensor | ens160_sensor_out (500, &STRATOSENSE_I2C) |
| BMP390Sensor | bmp_sensor_out (500, &STRATOSENSE_I2C) |
| TMP11xSensor | tmp_sensor_out (500, &STRATOSENSE_I2C) |
| SHTC3Sensor | shtc3_sensor_out (500, &STRATOSENSE_I2C) |
| OzoneSensor | ozone_sensor_out (500) |
| Sensor * | sensors [] |
| const int | sensors_len = sizeof(sensors) / sizeof(sensors[0]) |
| String | header_condensed = "" |
| queue_t | qt |
| uint32_t | time_paused |
| uint32_t | max_pause_duration = 60'000 * 2 |
| bool | was_dumping = false |
| unsigned int | it = 0 |
Main functions for Core 0, responsible for reading data from sensor peripherals.
| String decodePacket | ( | uint8_t * | packet | ) |
Decodes the packet to a CSV row.
| packet | Pointer to the packet array |
| void handleCommand | ( | ) |
Handle commands read from serial input.
Pause data collection and storage for a specified duration to execute a command, including STATUS, DOWNLOAD, DELETE, etc.
| void handleDataInterface | ( | ) |
| void loop | ( | ) |
Loop for core 0, handling sensor reads.
| void loop1 | ( | ) |
| String readSensorData | ( | ) |
Read data from each verified Sensor.
| uint16_t readSensorDataPacket | ( | uint8_t * | packet | ) |
Reads sensor data into a packet byte array.
| packet | Pointer to the packet array |
| void real_loop1 | ( | ) |
Loop for core 1.
| void real_setup1 | ( | ) |
Setup for core 1.
| void setup | ( | ) |
Setup for core 0.
| void setup1 | ( | ) |
| int verifySensorRecovery | ( | ) |
Uses Device abstraction to verify sensors Incompatible with initial header generation.
| int verifySensors | ( | ) |
| BMP390Sensor bmp_sensor_out(500, &STRATOSENSE_I2C) | ( | 500 | , |
| & | STRATOSENSE_I2C | ||
| ) |
| ENS160Sensor ens160_sensor_out(500, &STRATOSENSE_I2C) | ( | 500 | , |
| & | STRATOSENSE_I2C | ||
| ) |
| MTK3339Sensor gps_sensor(2000) | ( | 2000 | ) |
| String header_condensed = "" |
| ICM20948Sensor icm_sensor(0) | ( | 0 | ) |
| INA260Sensor ina260_sensor(1000) | ( | 1000 | ) |
| unsigned int it = 0 |
| uint32_t max_pause_duration = 60'000 * 2 |
| OzoneSensor ozone_sensor_out(500) | ( | 500 | ) |
| queue_t qt |
| PCF8523Sensor rtc_sensor(1000) | ( | 1000 | ) |
| Sensor* sensors[] |
| SHTC3Sensor shtc3_sensor_out(500, &STRATOSENSE_I2C) | ( | 500 | , |
| & | STRATOSENSE_I2C | ||
| ) |
| TempSensor temp_sensor(1000) | ( | 1000 | ) |
| uint32_t time_paused |
| TMP11xSensor tmp_sensor(500, &STRATOCORE_I2c) | ( | 500 | , |
| & | STRATOCORE_I2c | ||
| ) |
| TMP11xSensor tmp_sensor_out(500, &STRATOSENSE_I2C) | ( | 500 | , |
| & | STRATOSENSE_I2C | ||
| ) |
| AS7331Sensor uv_sensor_out(500, UV_I2C_ADDR) | ( | 500 | , |
| UV_I2C_ADDR | |||
| ) |
| bool was_dumping = false |