MRAS
Multi Rocket Avionics System
Loading...
Searching...
No Matches
SDLogger Class Reference

General SD logger class, used by both the ground and rocket SD loggers. This class is not intended to be used directly. Instead, use the RocketSDLogger or GroundSDLogger classes. More...

#include <SDLogger.h>

Inheritance diagram for SDLogger:
Inheritance graph
Collaboration diagram for SDLogger:
Collaboration graph

Public Member Functions

 SDLogger (uint8_t id, uint8_t sdPin)
 Construct a new SDLogger object.
 
- Public Member Functions inherited from Subsystem
virtual const char * get_name ()=0
 
virtual int8_t setup ()=0
 
virtual int8_t loop ()=0
 
uint8_t get_id () const
 
int8_t get_status () const
 
int8_t self_test () const
 
bool add_subscriber (Subsystem *subscriber)
 
 Subsystem (uint8_t id)
 

Protected Attributes

File log_file
 
bool setup_complete = false
 
- Protected Attributes inherited from Subsystem
int8_t status = 0
 
int8_t self_test_result = -1
 

Additional Inherited Members

- Protected Member Functions inherited from Subsystem
void log (const char fmt[],...)
 
virtual void on_message (SystemMessage *msg)=0
 
void publish (SystemMessage *msg)
 
- Static Protected Member Functions inherited from Subsystem
static void buzzer (uint16_t frequency, uint32_t duration, bool block=false)
 

Detailed Description

General SD logger class, used by both the ground and rocket SD loggers. This class is not intended to be used directly. Instead, use the RocketSDLogger or GroundSDLogger classes.

This class contains the setup function for the SD card and stores the log file.

The RocketSDLogger and GroundSDLogger classes contain the loop and on_message functions for logging data.

Constructor & Destructor Documentation

◆ SDLogger()

SDLogger::SDLogger ( uint8_t  id,
uint8_t  sdPin 
)
inline

Construct a new SDLogger object.

Parameters
idThe ID of the subsystem
sdPinThe chip select pin the SD card is connected to

The documentation for this class was generated from the following files: