|
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 "SCD40Sensor.h"#include "SHTC3Sensor.h"#include "TMP117Sensor.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) |
| BMP390Sensor | bmp_sensor (500) |
| OzoneSensor | ozone_sensor (500) |
| SCD40Sensor | scd_sensor (1000, &Wire) |
| TMP117Sensor | tmp_sensor (500, &Wire) |
| ENS160Sensor | ens160_sensor (500, &Wire) |
| SHTC3Sensor | shtc_sensor (1000, &Wire) |
| AS7331Sensor | uv_sensor_out (500, UV_I2C_ADDR) |
| SCD40Sensor | scd_sensor_out (1000, &Wire1) |
| TMP117Sensor | tmp_sensor_out (500, &Wire1) |
| ENS160Sensor | ens160_sensor_out (500, &Wire1) |
| SHTC3Sensor | shtc_sensor_out (1000, &Wire1) |
| 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(500) | ( | 500 | ) |
| ENS160Sensor ens160_sensor(500, &Wire) | ( | 500 | , |
| & | Wire | ||
| ) |
| ENS160Sensor ens160_sensor_out(500, &Wire1) | ( | 500 | , |
| & | Wire1 | ||
| ) |
| 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(500) | ( | 500 | ) |
| queue_t qt |
| PCF8523Sensor rtc_sensor(1000) | ( | 1000 | ) |
| SCD40Sensor scd_sensor(1000, &Wire) | ( | 1000 | , |
| & | Wire | ||
| ) |
| SCD40Sensor scd_sensor_out(1000, &Wire1) | ( | 1000 | , |
| & | Wire1 | ||
| ) |
| Sensor* sensors[] |
| SHTC3Sensor shtc_sensor(1000, &Wire) | ( | 1000 | , |
| & | Wire | ||
| ) |
| SHTC3Sensor shtc_sensor_out(1000, &Wire1) | ( | 1000 | , |
| & | Wire1 | ||
| ) |
| TempSensor temp_sensor(1000) | ( | 1000 | ) |
| uint32_t time_paused |
| TMP117Sensor tmp_sensor(500, &Wire) | ( | 500 | , |
| & | Wire | ||
| ) |
| TMP117Sensor tmp_sensor_out(500, &Wire1) | ( | 500 | , |
| & | Wire1 | ||
| ) |
| AS7331Sensor uv_sensor_out(500, UV_I2C_ADDR) | ( | 500 | , |
| UV_I2C_ADDR | |||
| ) |
| bool was_dumping = false |