reduce more useless code

This commit is contained in:
Yunhorn 2023-06-20 11:49:36 +08:00
parent dfb3f6b33e
commit 5cfbc66f6b
1 changed files with 3 additions and 12 deletions

View File

@ -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 );
*/
}