ControllerQ15.cpp 926 B

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