Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize logging to uSD card #326

Merged
merged 1 commit into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions src/deck/drivers/interface/usddeck.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,19 @@
#include <stdint.h>
#include <stdbool.h>

#define USDLOG_ACC (0x01)
#define USDLOG_GYRO (0x02)
#define USDLOG_BARO (0x04)
#define USDLOG_MAG (0x08)
#define USDLOG_STABILIZER (0x10)
#define USDLOG_CONTROL (0x20)
#define USDLOG_RANGE (0x40)

typedef struct usdLogDataPtr_s {
uint32_t* tick;
float* floats;
int* ints;
uint8_t* data;
} usdLogQueuePtr_t;

typedef struct usdLogConfig_s {
char filename[13];
uint8_t items;
uint16_t frequency;
uint8_t bufferSize;
uint8_t floatSlots;
uint8_t intSlots;
uint16_t numSlots;
uint16_t numBytes;
int* varIds; // dynamically allocated
} usdLogConfig_t;

#define USD_WRITE(FILE, MESSAGE, BYTES, BYTES_WRITTEN, CRC_VALUE, CRC_FINALXOR, CRC_TABLE) \
Expand Down
Loading