Skip to content

Commit

Permalink
Merge pull request #326 from USC-ACTLab/uSDGenericLogs
Browse files Browse the repository at this point in the history
Generalize logging to uSD card
  • Loading branch information
tobbeanton authored May 30, 2018
2 parents ccfb590 + c4d8087 commit c139156
Show file tree
Hide file tree
Showing 7 changed files with 382 additions and 425 deletions.
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

0 comments on commit c139156

Please sign in to comment.