Calc-Funktion weiter, unnötige Funktionen auskommentiert (kompiliert)

This commit is contained in:
Patrick Hangl
2026-02-02 16:12:41 +01:00
parent fa787bec48
commit f6fa0ed021
85 changed files with 16931 additions and 12836 deletions

View File

@@ -58,13 +58,13 @@ typedef struct SingleSignalPath{
// int lms_mu; // The learning rate for the lms algorithm
// int lms_num_fir_coeffs; // Number of coefficients for the adaptive filter
// #if BLOCK_LEN == 1
// //int _delay_line[MAX_FIR_COEFFS]; // The delay line for the adaptive filter //
// BufferDMB delay_line; // The pointer to the delay line
// //int chess_storage(DMB) *ptr_delay_line_current; // The pointer to the current position in the delay line
// //int _sample_line[MAX_FIR_COEFFS]; // The delay line for the adaptive filter //
// BufferDMB sample_line; // The pointer to the delay line
// //int chess_storage(DMB) *ptr_sample_line_current; // The pointer to the current position in the delay line
// #else
// //int chess_storage(%(sizeof(long long))) _delay_line[BLOCK_LEN + MAX_FIR_COEFFS]; // The delay line for the adaptive filter
// BufferPtr delay_line; // The pointer to the delay line
// //int chess_storage(DMA) *ptr_delay_line_current; // The pointer to the current position in the delay line
// //int chess_storage(%(sizeof(long long))) _sample_line[BLOCK_LEN + MAX_FIR_COEFFS]; // The delay line for the adaptive filter
// BufferPtr sample_line; // The pointer to the delay line
// //int chess_storage(DMA) *ptr_sample_line_current; // The pointer to the current position in the delay line
// //int chess_storage(%(sizeof(long long))) fir_coeffs[MAX_FIR_COEFFS]; // The coefficients for the adaptive filter
// #endif
// } LmsFilter;
@@ -76,12 +76,12 @@ typedef struct SingleSignalPath{
#if BLOCK_LEN == 1
BufferPtr extern ptr_fir_lms_coeffs;
BufferPtrDMB extern chess_storage(DMB) ptr_fir_lms_delay_line;
int extern chess_storage(DMB) fir_lms_delay_line[MAX_FIR_COEFFS];
BufferPtrDMB extern chess_storage(DMB) ptr_fir_lms_sample_line;
int extern chess_storage(DMB) fir_lms_sample_line[MAX_FIR_COEFFS];
#else
int extern chess_storage(DMA%(sizeof(long long))) fir_lms_delay_line[BLOCK_LEN + MAX_FIR_COEFFS]; // The delay line for the adaptive filter
BufferPtr extern ptr_fir_lms_delay_line;
int extern chess_storage(DMA%(sizeof(long long))) fir_lms_sample_line[BLOCK_LEN + MAX_FIR_COEFFS]; // The delay line for the adaptive filter
BufferPtr extern ptr_fir_lms_sample_line;
BufferPtr extern ptr_fir_lms_coeffs;
#endif
@@ -113,15 +113,13 @@ typedef enum OutputMode{
// int inline sig_calc_fir_lms_single(LmsFilter *signal, int d, int x); //TODO: inline ?
//void adapt_coeffs_lpdsp32_single(LmsFilter chess_storage(DMB) *filter, int *fir_lms_coeffs, int out);
//sig_calc_fir_lpdsp32_single(BufferPtr *ptr_fir_lms_delay_line, BufferPtr *ptr_fir_lms_coeffs)
//sig_calc_fir_lpdsp32_single(BufferPtr *ptr_fir_lms_sample_line, BufferPtr *ptr_fir_lms_coeffs)
// top level init and calc functions
void init(
void initialize_signal(
SingleSignalPath *c_sensor_signal_t, SingleSignalPath *acc_sensor_signal_t,
double *b_c, double *b_acc, int delay_c, int delay_acc, double weight_c, double weight_acc, double lms_mu, int lms_fir_num_coeffs);
void calc(
void calculate_output(
SingleSignalPath *c_sensor_signal_t,
SingleSignalPath *acc_sensor_signal_t,
int16_t volatile chess_storage(DMB) *c_sensor_input,