1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #include "asj_pe_pullup_warpper.h"
- int main()
- {
- PullUp_ST pullup_t;
- pullup_t.asjPullUpLine[0].x = 0.0;
- pullup_t.asjPullUpLine[0].y = 0.0;
- pullup_t.asjPullUpLine[1].x = 0.0;
- pullup_t.asjPullUpLine[1].y = 0.0;
- pullup_t.arm_bend_flag = 1;
- pullup_t.hand_back_flag = 1;
- pullup_t.body_straight_flag = 1;
- pullup_t.hand_off_bar_flag = 1;
- pullup_t.exam_interval_sencond = 1;
- void* pullup = pullup_create();
- int init_ret = pullup_examInit(pullup, pullup_t);
- printf("[%s Line:%d] ------init_ret:%d\n", __FUNCTION__, __LINE__, init_ret);
- {
- int prepareStatus = 0;
- sampleRunJoint_RESULT_S *mResult;
- mResult = (sampleRunJoint_RESULT_S*)malloc(sizeof(sampleRunJoint_RESULT_S));
- mResult->nObjectSize = 0;
- for(int i = 0;i < 12;i++)
- {
- int processPrepare_ret = pullup_processPrepare(pullup, mResult, &prepareStatus);
- printf("[%s Line:%d] ------processPrepare_ret:%d\n", __FUNCTION__, __LINE__, processPrepare_ret);
- printf("[%s Line:%d] ------prepareStatus:%d\n", __FUNCTION__, __LINE__, prepareStatus);
- }
- }
- {
- PullUpResult_ST *result;
- result = (PullUpResult_ST*)malloc(sizeof(PullUpResult_ST));
- sampleRunJoint_RESULT_S *mResult;
- mResult = (sampleRunJoint_RESULT_S*)malloc(sizeof(sampleRunJoint_RESULT_S));
- mResult->nObjectSize = 0;
- for(int i = 0;i < 12;i++)
- {
- int processExam_ret = pullup_processExam(pullup, mResult, result);
- printf("[%s Line:%d] ------processExam_ret:%d\n", __FUNCTION__, __LINE__, processExam_ret);
- printf("[%s Line:%d] ------score:%d illegal_flag:%d\n", __FUNCTION__, __LINE__, result->pullUpCount, result->pullup_illegal_flag);
- }
- }
- printf("[%s Line:%d] ------------Prepare------------\n", __FUNCTION__, __LINE__);
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpPrepareCode2String(PULLUP_PREPARE_BACKHAND));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpPrepareCode2String(PULLUP_PREPARE_HANDSNOTONBAR));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpPrepareCode2String(PULLUP_PREPARE_HANDSNOTSTRAIGHTEN));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpPrepareCode2String(PULLUP_PREPARE_HANDSWIDERTHANSHOULDERS));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpPrepareCode2String(PULLUP_PREPARE_NOHUMAN));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpPrepareCode2String(PULLUP_PREPARE_SUCCESS));
- printf("[%s Line:%d] ------------Exam------------\n", __FUNCTION__, __LINE__);
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpExamCode2String(PULLUP_EXAM_NOTOVERBAR));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpExamCode2String(PULLUP_EXAM_BODYOVERSWING));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpExamCode2String(PULLUP_EXAM_BACKHAND));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpExamCode2String(PULLUP_EXAM_DROPBAR));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpExamCode2String(PULLUP_EXAM_HANDNOTSTRAIGHTEN));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpExamCode2String(PULLUP_EXAM_KNEEBEND));
- printf("[%s Line:%d] ------%s\n", __FUNCTION__, __LINE__, PullUpExamCode2String(PULLUP_EXAM_OVERTIME));
- return 0;
- }
|