OMG it works!
This commit is contained in:
parent
1cf04ce26f
commit
52972cec99
|
@ -142,6 +142,7 @@ CPPSRC = $(UTILSRC_CPP) \
|
|||
$(HW_SENSORS_SRC) \
|
||||
$(TRIGGER_SRC_CPP) \
|
||||
$(INIT_SRC_CPP) \
|
||||
$(PROJECT_DIR)/../unit_tests/logicdata.cpp \
|
||||
$(PROJECT_DIR)/../unit_tests/main.cpp \
|
||||
$(PROJECT_DIR)/console/binary_log/log_field.cpp \
|
||||
|
||||
|
|
|
@ -212,7 +212,6 @@ static void writeChannelData(int ch, int64_t *chDeltas, int chLastState,
|
|||
write(ch + 1);
|
||||
write(0);
|
||||
write(realDurationInSamples);
|
||||
printf("realDurationInSamples=%d\n", realDurationInSamples);
|
||||
write(1);
|
||||
write(lastRecord);
|
||||
|
||||
|
@ -403,12 +402,12 @@ static void writeEvents(CompositeEvent *events, int count) {
|
|||
writeChannelDataHeader();
|
||||
|
||||
int64_t *chDeltas = (int64_t*) malloc(sizeof(int64_t) * count);
|
||||
int deltaCount = 0;
|
||||
|
||||
bool useLongDeltas = false;
|
||||
for (int ch = 0; ch < numChannels; ch++) {
|
||||
int chPrevState = -1;
|
||||
int prevTs = 0;
|
||||
int deltaCount = 0;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
CompositeEvent *event = &events[i];
|
||||
|
|
|
@ -9,9 +9,14 @@ void setEvent(CompositeEvent *events, int index,
|
|||
int timestamp, bool primaryTrigger, bool secondaryTrigger, bool trg, bool sync, bool coil, bool injector) {
|
||||
events[index].timestamp = timestamp;
|
||||
events[index].primaryTrigger = primaryTrigger;
|
||||
events[index].secondaryTrigger = secondaryTrigger;
|
||||
events[index].trg = trg;
|
||||
events[index].sync = sync;
|
||||
events[index].coil = coil;
|
||||
events[index].injector = injector;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
void runLogicdataSandbox() {
|
||||
printf(".logicdata Sandbox 20200719\n");
|
||||
|
||||
|
||||
|
@ -26,3 +31,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
printf("Done!\n");
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
runLogicdataSandbox();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue