#include <Adafruit_LIS3DH.h>
#include <Adafruit_Sensor.h>
#include <Arduino.h>
#include <SPI.h>
#include <SPIMemory.h>
#include <STAR_ISM330DH.h>
#include <STAR_MCP3201.h>
#include <SparkFun_LPS28DFW_Arduino_Library.h>
#include <Wire.h>
#include <math.h>
#include "apogee.h"
#include "config.h"
#include "flight_log.h"
#include "flight_state.h"
#include "pins.h"
Go to the source code of this file.
◆ g_adc()
◆ g_flash()
◆ g_lis()
◆ loop()
Definition at line 137 of file main.cpp.
References ADC_COUNTS, apogeePushAltitude(), apogeeShouldConfirm(), applyActuatorOutputs(), delay(), flightStateGet(), flightStateOnApogee(), flightStateOnLaunchDetect(), flightStateTick(), g_accel, g_adc(), g_baro, g_gyro, g_imu, g_imuWakeFlag, g_launchFlag, g_lis(), Launch, logIsm330(), logLis3dh(), logLps28dfw(), logMcp3201(), LPS28DFW_SEA_LEVEL_HPA, millis(), pressureToAltitudeM(), PT_FULL_SCALE_PSI, s_lastLpsMs, s_lastMcpMs, sensorsShouldLog(), and Serial.
◆ onAccelInt()
| void IRAM_ATTR onAccelInt |
( |
| ) |
|
◆ onImuInt()
| void IRAM_ATTR onImuInt |
( |
| ) |
|
◆ pressureToAltitudeM()
| float pressureToAltitudeM |
( |
float | pressureHpa, |
|
|
float | seaLevelHpa ) |
|
static |
◆ setup()
Definition at line 47 of file main.cpp.
References ACCEL_ODR, ACCEL_RANGE, apogeeReset(), delay(), digitalWrite(), flightLogInit(), flightStateInit(), g_baro, g_flash(), g_imu, g_lis(), HIGH, INPUT, INT1_DUR_VALUE, INT1_THS_VALUE, ISM330_ACCEL_FS, ISM330_ROUTE_DRDY_TO_INT1, ISM330_WAKEUP_DUR, ISM330_WKUP_THS, ISM_500dps, ISM_GY_ODR_104Hz, ISM_LP_ODR_DIV_100, ISM_MEDIUM, ISM_XL_ODR_104Hz, LPS28DFW_I2C_ADDR, onAccelInt(), onImuInt(), OUTPUT, PIN_ACCEL_INT1, PIN_ADC_CS, PIN_IMU_CS, PIN_IMU_INT1, PIN_MISO, PIN_MOSI, PIN_MX25_RESET, PIN_SCL, PIN_SCLK, PIN_SDA, pinMode(), and Serial.
◆ g_accel
◆ g_baro
◆ g_gyro
◆ g_imu
◆ g_imuWakeFlag
| volatile bool g_imuWakeFlag = false |
|
static |
◆ g_launchFlag
| volatile bool g_launchFlag = false |
|
static |
◆ s_lastLpsMs
◆ s_lastMcpMs