Skip to content

Commit a069cc6

Browse files
committed
Cleanup with the meta_logging and rocket_state.h
Just some small bug fixes. Right now I'm stuck on what 'MultipleLogSink<Sinks...> sinks;' is and why it isn't working. I'm assuming its because of the other files.
1 parent 9826820 commit a069cc6

File tree

7 files changed

+20
-6
lines changed

7 files changed

+20
-6
lines changed

MIDAS/GroundStation

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit a066162245425367a4bda452001b6c0ff4578e21

MIDAS/src/data_logging_meta.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ enum MetaDataCode {
1212
EVENT_TMAIN,
1313

1414
// Non-events
15-
DATA_LAUNCHSITE_ALT_BARO,
16-
DATA_LAUNCHSITE_ALT_GPS,
17-
DATA_LAUNCH_INITIAL_TILT
15+
DATA_LAUNCHSITE_BARO,
16+
DATA_LAUNCHSITE_GPS,
17+
DATA_LAUNCH_INITIAL_TILT,
18+
DATA_TILT_AT_BURNOUT,
19+
DATA_TILT_AT_IGNITION
1820
};
1921

2022
struct MetaLogging {

MIDAS/src/esp_eeprom_checksum.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// autogenerated on build by applying crc32 on esp_eeprom_format.h
2+
#define EEPROM_CHECKSUM (0xcfa22d7d)

MIDAS/src/finite-state-machines/fsm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ class FSM {
3434

3535
FSMState tick_fsm(FSMState& curr_state, StateEstimate state_estimate, CommandFlags& commands);
3636

37+
// Constructor for the metadata
38+
// Created so that FSMState, StateEstimate, and CommandFlags objects can supercede the mutex lock
39+
FSMState tick_fsm(RocketData& sys);
40+
3741
private:
3842
double launch_time;
3943
double burnout_time;

MIDAS/src/hardware/SDLog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ErrorCode SDSink::init() {
2424
char file_name[16] = "data";
2525
char meta_name[24];
2626
char dfext[] = ".launch";
27-
sdFileNamer(file_name, ext, SD_MMC);
27+
sdFileNamer(file_name, dfext, SD_MMC);
2828

2929
strcpy(meta_name, file_name);
3030
char* extpos = strrchr(meta_name, '.');

MIDAS/src/rocket_state.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
#include "hal.h"
77
#include "Buffer.h"
88

9+
// temprary macro
10+
// originally declared in data_loggng_meta.h
11+
#define META_LOGGING_MAX_SIZE 64
12+
913
/**
1014
* @brief The RocketState struct stores everything that is needed by more than one system/thread of the Rocket.
1115
*
@@ -153,6 +157,8 @@ class Latency {
153157
}
154158
};
155159

160+
#define META_LOGGING_MAX_SIZE 64
161+
156162
enum MetaDataCode {
157163
// Launch events
158164
EVENT_TLAUNCH,
@@ -202,7 +208,6 @@ struct MetaLogging {
202208
}
203209
};
204210

205-
206211
/**
207212
* @struct CommandFlags
208213
*

MIDAS/src/systems.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ DECLARE_THREAD(logger, RocketSystems* arg) {
3030

3131
if (meta_delay_ctr >= 100) {
3232
MetaLogging::MetaLogEntry entry;
33-
if(arg->meta_log.get_queued(&entry)) {
33+
if(arg->meta_logging.get_queued(&entry)) {
3434
uint8_t buf[72];
3535
size_t total_size = sizeof(MetaDataCode) + entry.size;
3636
memcpy(buf, &entry.log_type, sizeof(MetaDataCode));

0 commit comments

Comments
 (0)