From 5cfbc66f6bb8bae38f41d8f418e09e0d1809d3ad Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Tue, 20 Jun 2023 11:49:36 +0800 Subject: [PATCH] reduce more useless code --- Core/Src/yunhorn_sts_motion_sensor_adxl345.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Core/Src/yunhorn_sts_motion_sensor_adxl345.c b/Core/Src/yunhorn_sts_motion_sensor_adxl345.c index 7c61cc6..d6028a6 100644 --- a/Core/Src/yunhorn_sts_motion_sensor_adxl345.c +++ b/Core/Src/yunhorn_sts_motion_sensor_adxl345.c @@ -639,7 +639,7 @@ void Motion_Interrupt_Config(void) unsigned short i=0; uint8_t v_int1=0; uint8_t val=0; - APP_LOG(TS_ON, VLEVEL_L, "========== Start Motion Interrupt Test ======\r\n"); + //APP_LOG(TS_ON, VLEVEL_L, "========== Start Motion Interrupt Test ======\r\n"); //ADXL345_Init(); ADXL345_SetInactivityDetection(ADXL345_REG_ACT_INACT_CTL, ADXL345_INACT_X_EN|ADXL345_INACT_Y_EN|ADXL345_INACT_Z_EN, @@ -665,7 +665,7 @@ void Sine_waveGenerate(void) acc_y[i] = 28.0 * cos(PI2 * i * 97.0/Fss + 28.3) + 46.0* cos(PI2 * i * 458/Fss + 30); acc_z[i] = 22.0 * cos(PI2 * i * 152/Fss) + 14.0* sin(PI2 * i * 358/Fss)+ 36.0 * sin(PI2 * i * 460/Fss ); } - APP_LOG(TS_ON, VLEVEL_L, "\r\n\r\n~~~~~~~~~~~~~~~~ Sine Cos Wave OK~~~~~~~~~~~~~~~~~~~~\r\n"); + //APP_LOG(TS_ON, VLEVEL_L, "\r\n\r\n~~~~~~~~~~~~~~~~ Sine Cos Wave OK~~~~~~~~~~~~~~~~~~~~\r\n"); } @@ -725,19 +725,10 @@ void Process_FFT_and_Amplitude(void) Do_FFT(); -// -// sprintf(outbuf,"\r\nSpectrum Peak: X=%.2f, Y=%.2f, Z=%.2f\r\n", -// spectrumPeak_x, spectrumPeak_y, spectrumPeak_z); -// APP_LOG(TS_ON, VLEVEL_L, outbuf ); freq_at_spectrumPeak_x = bin_at_spectrumPeak_x*Freq_Res; freq_at_spectrumPeak_y = bin_at_spectrumPeak_y*Freq_Res; freq_at_spectrumPeak_z = bin_at_spectrumPeak_z*Freq_Res; -/* - sprintf(outbuf,"\r\n Freq: X=%4d Hz, Y=%4d Hz, Z=%4d Hz\r\n", - (uint16_t)freq_at_spectrumPeak_x, (uint16_t)freq_at_spectrumPeak_y, (uint16_t)freq_at_spectrumPeak_z); - APP_LOG(TS_ON, VLEVEL_M, outbuf ); - -*/ + }