From 8aa1806d759021bc6803c18f2b8d8d31320ee07e Mon Sep 17 00:00:00 2001 From: crhunt <crhunt@iastate.edu> Date: Mon, 6 Feb 2023 01:09:12 -0600 Subject: [PATCH] Updates reading/startup commands for TestStand See Issue #145 --- crazyflie_groundstation/src/ccrazyflie/CCrazyflie.cpp | 1 + .../src/ccrazyflie/CCrazyflie_loggingFuncs.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crazyflie_groundstation/src/ccrazyflie/CCrazyflie.cpp b/crazyflie_groundstation/src/ccrazyflie/CCrazyflie.cpp index 2b32bfc1c..49d8cbae5 100644 --- a/crazyflie_groundstation/src/ccrazyflie/CCrazyflie.cpp +++ b/crazyflie_groundstation/src/ccrazyflie/CCrazyflie.cpp @@ -425,6 +425,7 @@ enum State CCrazyflie::getCurrentState() { void* CCrazyflie::startTestStand(void* args) { CCrazyflie *quad = (CCrazyflie*) args; + quad->testStand.setupTestStand(0); quad->testStandLoop(); return(NULL); diff --git a/crazyflie_groundstation/src/ccrazyflie/CCrazyflie_loggingFuncs.cpp b/crazyflie_groundstation/src/ccrazyflie/CCrazyflie_loggingFuncs.cpp index ce8b7309b..faeab6ce0 100644 --- a/crazyflie_groundstation/src/ccrazyflie/CCrazyflie_loggingFuncs.cpp +++ b/crazyflie_groundstation/src/ccrazyflie/CCrazyflie_loggingFuncs.cpp @@ -254,9 +254,8 @@ double CCrazyflie::readTestStand() { // this->test_stand->readline(); // result = this->test_stand->readline(); // this->test_stand->flushInput(); - this->test_stand->write(&reqSer, 1); - result = this->test_stand->readline(); - + result = this->testStand.getCurrentValue(); + double value; try { value = std::stod(result); -- GitLab