#include "tool.h" //#include "bsp_time.h" #include "system.h" char JS_RTT_UpBuffer[4096]; // J-Scope RTT Buffer int JS_RTT_Channel = 1; // J-Scope RTT Channel acValBuffer_t acValBuffer; void JS_RTT_Init(void) { SEGGER_RTT_ConfigUpBuffer(JS_RTT_Channel, "JScope_I4I4I4I4I4I4", &JS_RTT_UpBuffer[0], sizeof(JS_RTT_UpBuffer), SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL); } void JS_RTT_Print(signed int Sine1,signed int Sine2,signed int Sine3) { acValBuffer.Sine1 = Sine1; acValBuffer.Sine2 = Sine2; acValBuffer.Sine3 = Sine3; SEGGER_RTT_Write(JS_RTT_Channel, &acValBuffer, sizeof(acValBuffer)); } void JS_RTT_Print_06(signed int Sine1,signed int Sine2,signed int Sine3,signed int Sine4,signed int Sine5,signed int Sine6) { acValBuffer.Sine1 = Sine1; acValBuffer.Sine2 = Sine2; acValBuffer.Sine3 = Sine3; acValBuffer.Sine4 = Sine4; acValBuffer.Sine5 = Sine5; acValBuffer.Sine6 = Sine6; SEGGER_RTT_Write(JS_RTT_Channel, &acValBuffer, sizeof(acValBuffer)); } /** @brief 求变异系数的绝对值 @param p_array-[in] 数组地址 @param len-[in] 数组成员个数 @return 变异系数的绝对值 */ float32_t CoefficientVariation(double *p_array, uint32_t len) { int i; float32_t sum = 0; //总和 float32_t avg; //平均值 float32_t spow = 0; for(i=0;i