STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
flight_log.cpp File Reference
#include "flight_log.h"
#include <SPIMemory.h>
#include <string.h>
#include "config.h"
#include "flight_state.h"
Include dependency graph for flight_log.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{flight_log.cpp}

Functions

bool anonymous_namespace{flight_log.cpp}::sectorMarked (unsigned idx)
void anonymous_namespace{flight_log.cpp}::sectorMark (unsigned idx)
bool anonymous_namespace{flight_log.cpp}::sectorEnsureErased (uint32_t absAddr)
bool anonymous_namespace{flight_log.cpp}::appendSpanning (const uint8_t *data, size_t len)
bool anonymous_namespace{flight_log.cpp}::appendRecord (uint16_t tag, uint32_t t_ms, const void *payload, uint16_t payload_len)
bool flightLogInit (SPIFlash &flash, uint32_t capacityBytes)
bool sensorsShouldLog ()
void logFlightStateTransition (FlightState from, FlightState to, uint32_t t_ms, uint8_t reason)
void logMcp3201 (uint16_t raw, float psi, uint32_t t_ms)
void logLis3dh (float ax_g, float ay_g, float az_g, uint32_t t_ms)
void logLps28dfw (float hpa, float temp_c, float alt_m, uint32_t t_ms)
void logIsm330 (float ax, float ay, float az, float gx, float gy, float gz, uint32_t t_ms)
void flightLogService ()

Variables

SPIFlash * anonymous_namespace{flight_log.cpp}::s_flash = nullptr
uint32_t anonymous_namespace{flight_log.cpp}::s_logBase = 0
uint32_t anonymous_namespace{flight_log.cpp}::s_logEnd = 0
uint32_t anonymous_namespace{flight_log.cpp}::s_nextAddr = 0
constexpr unsigned anonymous_namespace{flight_log.cpp}::MAX_SECTORS = 128
uint8_t anonymous_namespace{flight_log.cpp}::s_sectorErased [MAX_SECTORS/8]
constexpr uint8_t anonymous_namespace{flight_log.cpp}::REC_VER = 1
constexpr size_t anonymous_namespace{flight_log.cpp}::REC_HEADER = 12

Function Documentation

◆ flightLogInit()

◆ flightLogService()

void flightLogService ( )

Definition at line 152 of file flight_log.cpp.

◆ logFlightStateTransition()

void logFlightStateTransition ( FlightState from,
FlightState to,
uint32_t t_ms,
uint8_t reason )

◆ logIsm330()

void logIsm330 ( float ax,
float ay,
float az,
float gx,
float gy,
float gz,
uint32_t t_ms )

◆ logLis3dh()

void logLis3dh ( float ax_g,
float ay_g,
float az_g,
uint32_t t_ms )

◆ logLps28dfw()

void logLps28dfw ( float hpa,
float temp_c,
float alt_m,
uint32_t t_ms )

◆ logMcp3201()

void logMcp3201 ( uint16_t raw,
float psi,
uint32_t t_ms )

◆ sensorsShouldLog()

bool sensorsShouldLog ( )

Definition at line 95 of file flight_log.cpp.

References flightStateGet(), and Idle.

Referenced by logIsm330(), logLis3dh(), logLps28dfw(), logMcp3201(), and loop().