From 53133573e137f104543206bf49ec3263fc0e5b06 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 3 Mar 2023 14:58:03 +0100 Subject: [PATCH] measurement base code and comment --- fsfw | 2 +- linux/devices/AcsBoardPolling.cpp | 21 ++++++++++++-------- linux/devices/GpsHyperionLinuxController.cpp | 3 +-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/fsfw b/fsfw index 78cf0031..64537d44 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 78cf00315d5bb9a05d47976a564d16c5978f1f41 +Subproject commit 64537d442a335500bdc87ff382099de65f0b7aa7 diff --git a/linux/devices/AcsBoardPolling.cpp b/linux/devices/AcsBoardPolling.cpp index 5685cbde..3b35167d 100644 --- a/linux/devices/AcsBoardPolling.cpp +++ b/linux/devices/AcsBoardPolling.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -31,14 +32,18 @@ ReturnValue_t AcsBoardPolling::performOperation(uint8_t operationCode) { semaphore->acquire(); // Give all tasks or the PST some time to submit all consecutive requests. TaskFactory::delayTask(2); - gyroAdisHandler(gyro0Adis); - gyroAdisHandler(gyro2Adis); - gyroL3gHandler(gyro1L3g); - gyroL3gHandler(gyro3L3g); - mgmRm3100Handler(mgm1Rm3100); - mgmRm3100Handler(mgm3Rm3100); - mgmLis3Handler(mgm0Lis3); - mgmLis3Handler(mgm2Lis3); + { + // Measured to take 0-1 ms in debug build. + // Stopwatch watch; + gyroAdisHandler(gyro0Adis); + gyroAdisHandler(gyro2Adis); + gyroL3gHandler(gyro1L3g); + gyroL3gHandler(gyro3L3g); + mgmRm3100Handler(mgm1Rm3100); + mgmRm3100Handler(mgm3Rm3100); + mgmLis3Handler(mgm0Lis3); + mgmLis3Handler(mgm2Lis3); + } // To prevent task being not reactivated by tardy tasks TaskFactory::delayTask(20); } diff --git a/linux/devices/GpsHyperionLinuxController.cpp b/linux/devices/GpsHyperionLinuxController.cpp index e3982a1c..3beb0d87 100644 --- a/linux/devices/GpsHyperionLinuxController.cpp +++ b/linux/devices/GpsHyperionLinuxController.cpp @@ -19,8 +19,7 @@ GpsHyperionLinuxController::GpsHyperionLinuxController(object_id_t objectId, object_id_t parentId, bool debugHyperionGps) - : ExtendedControllerBase(objectId), gpsSet(this), debugHyperionGps(debugHyperionGps) { -} + : ExtendedControllerBase(objectId), gpsSet(this), debugHyperionGps(debugHyperionGps) {} GpsHyperionLinuxController::~GpsHyperionLinuxController() { gps_stream(&gps, WATCH_DISABLE, nullptr);