[DO NOT MERGE] test param save from HPWORK

This commit is contained in:
Daniel Agar
2021-03-25 15:33:01 -04:00
parent a124426541
commit b499b53cc1
52 changed files with 9 additions and 211 deletions
@@ -55,27 +55,6 @@ void WQueueTest::hp_worker_cb(void *p)
wqep->do_hp_work();
}
void WQueueTest::lp_worker_cb(void *p)
{
WQueueTest *wqep = (WQueueTest *)p;
wqep->do_lp_work();
}
void WQueueTest::do_lp_work()
{
static int iter = 0;
printf("done lp work\n");
if (iter > 5) {
_lpwork_done = true;
}
++iter;
work_queue(LPWORK, &_lpwork, (worker_t)&lp_worker_cb, this, 1000);
}
void WQueueTest::do_hp_work()
{
static int iter = 0;
@@ -98,11 +77,6 @@ int WQueueTest::main()
//Put work on HP work queue
work_queue(HPWORK, &_hpwork, (worker_t)&hp_worker_cb, this, 1000);
//Put work on LP work queue
work_queue(LPWORK, &_lpwork, (worker_t)&lp_worker_cb, this, 1000);
// Wait for work to finsh
while (!appState.exitRequested() && !(_hpwork_done && _lpwork_done)) {
printf(" Sleeping for 2 sec...\n");
@@ -54,13 +54,10 @@ public:
static px4::AppState appState; /* track requests to terminate app */
private:
static void hp_worker_cb(void *p);
static void lp_worker_cb(void *p);
void do_lp_work(void);
void do_hp_work(void);
bool _lpwork_done {false};
bool _hpwork_done {false};
work_s _lpwork {};
work_s _hpwork {};
};