dead code

This commit is contained in:
Matthew Kennedy 2020-07-29 02:32:48 -07:00
parent bbe7ac43db
commit fc112d2526
5 changed files with 0 additions and 93 deletions

View File

@ -14,7 +14,6 @@
#include "main_trigger_callback.h"
#include "engine_configuration.h"
#include "listener_array.h"
#include "data_buffer.h"
#include "pwm_generator_logic.h"
#include "tooth_logger.h"

View File

@ -16,7 +16,6 @@
#include "global.h"
#include "os_access.h"
#include "eficonsole.h"
#include "data_buffer.h"
#include "pin_repository.h"
#include "allsensors.h"
#include "engine_configuration.h"

View File

@ -1,66 +0,0 @@
/*@
* @file data_buffer.c
*
* @date Dec 8, 2012
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#include "data_buffer.h"
int dbIsFull(data_buffer_s *db) {
return db->size == DB_MAX_SIZE;
}
void dbClear(data_buffer_s *db) {
db->size = 0;
}
void dbCopy(data_buffer_s *source, data_buffer_s *target) {
int s = source->size;
target->size = s;
for (int i = 0; i < s; i++)
target->elements[i] = source->elements[i];
}
void dbAdd(data_buffer_s *db, int value) {
if (db->size == DB_MAX_SIZE)
return;
int s = db->size;
db->elements[s] = value;
db->size = s + 1;
}
int modp(int param) {
return param > EF_PERIOD ? param - EF_PERIOD : param;
}
//void dbPrint(data_buffer_s *db, char *message, int withDiff) {
// int s = db->size;
// print("buffer [%s] size=%d\r\n", message, s);
// int range = db->elements[s - 1] - db->elements[0];
// print("range %d\r\n", range);
//
// for (int i = 0; i < s; i++) {
// print("%d: %d", i, db->elements[i]);
// if (withDiff && i > 0) {
// int diff = modp(db->elements[i]) - modp(db->elements[i - 1]);
// print(" t=%d", diff);
// }
// print("\r\n");
// }
//}
//void dbPrintTable(data_buffer_s *table[], char *caption[], int columns) {
// for (int c = 0; c < columns; c++)
// print("%7s", caption[c]);
// print("\r\n");
//
// for (int r = 0; r < DB_MAX_SIZE; r++) {
// for (int c = 0; c < columns; c++) {
// data_buffer_s *buf = table[c];
// print("%7d", buf->elements[r]);
// }
// print("\r\n");
// }
//}

View File

@ -1,24 +0,0 @@
/*
* data_buffer.h
*
* @date Dec 8, 2012
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#pragma once
#define DB_MAX_SIZE 1024
#define EF_PERIOD 100000000
typedef struct {
int elements[DB_MAX_SIZE];
int size;
} data_buffer_s;
int dbIsFull(data_buffer_s *db);
void dbClear(data_buffer_s *db);
void dbAdd(data_buffer_s *db, int value);
void dbCopy(data_buffer_s *source, data_buffer_s *target);
void dbPrint(data_buffer_s *db, char *message, int withDiff);
void dbPrintTable(data_buffer_s *table[], char *caption[], int columns);

View File

@ -1,7 +1,6 @@
UTIL_DIR=$(PROJECT_DIR)/util
UTILSRC = \
$(UTIL_DIR)/containers/data_buffer.c \
$(UTIL_DIR)/math/crc.c \
$(UTIL_DIR)/os_util.c \
$(UTIL_DIR)/histogram.c \