1 #include "ControllerQ15.h" 2 #include "Error.h" 3 4 test_pid_q15()5 void ControllerQ15::test_pid_q15() 6 { 7 for(int i=0; i < this->nbSamples; i++) 8 { 9 *this->pDst++ = arm_pid_q15(&instPid, *this->pSrc++); 10 } 11 } 12 setUp(Testing::testID_t id,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)13 void ControllerQ15::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr) 14 { 15 16 17 std::vector<Testing::param_t>::iterator it = params.begin(); 18 this->nbSamples = *it; 19 20 samples.reload(ControllerQ15::SAMPLES_Q15_ID,mgr,this->nbSamples); 21 output.create(this->nbSamples,ControllerQ15::OUT_SAMPLES_Q15_ID,mgr); 22 23 switch(id) 24 { 25 case TEST_PID_Q15_1: 26 arm_pid_init_q15(&instPid,1); 27 28 this->pSrc=samples.ptr(); 29 this->pDst=output.ptr(); 30 break; 31 32 } 33 34 } 35 tearDown(Testing::testID_t id,Client::PatternMgr * mgr)36 void ControllerQ15::tearDown(Testing::testID_t id,Client::PatternMgr *mgr) 37 { 38 } 39