![]() |
N4 Flight Software N4
Flight software used for the N4 flight computers
|
Public Member Functions | |
| DataLogger (uint8_t cs_pin, uint8_t led_pin, char *filename, SerialFlashFile file, uint32_t filesize) | |
| class constructor pass the chip select pin as a parameter for that class instance | |
| bool | loggerInit () |
| Initialize the flash memory. | |
| void | loggerFormat () |
| format the flash memory | |
| void | loggerInfo () |
| print the data about the flash memory | |
| void | loggerTest () |
| test the flash memory write and read function by reading and writing a variable to it | |
| void | loggerWrite (telemetry_type_t) |
| write the provided data to the file created | |
| void | loggerRead (uint8_t file_pointer, char buffer) |
| Read data from the start of the file to the end of the file. | |
| void | loggerSpaces () |
| helper function to print spaces for data formatting | |
| void | loggerEquals () |
| helper function to print = for data formatting | |
| DataLogger::DataLogger | ( | uint8_t | cs_pin, |
| uint8_t | led_pin, | ||
| char * | filename, | ||
| SerialFlashFile | file, | ||
| uint32_t | filesize ) |
class constructor pass the chip select pin as a parameter for that class instance
| cs_pin | chip select pin |
| flash_led | LED to show formatting status |
| filename | the filename of the file being created |
| file_size | the size of the file being created |
| void DataLogger::loggerFormat | ( | ) |
format the flash memory
| none |
| bool DataLogger::loggerInit | ( | ) |
Initialize the flash memory.
| void DataLogger::loggerRead | ( | uint8_t | file_pointer, |
| char | buffer ) |
Read data from the start of the file to the end of the file.
| _file_pointer | pointer to where we want to start reading the file. By default, this value os 0 |
| buffer | char array to read the data into |
| void DataLogger::loggerTest | ( | ) |
test the flash memory write and read function by reading and writing a variable to it
| none |
| void DataLogger::loggerWrite | ( | telemetry_type_t | packet | ) |
write the provided data to the file created
| data | this is a struct pointer to the struct that contains the data that needs to be written to the memory |