From ef608add099c4a2521c61c0fd3641e7e3a29e2e6 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 18 Feb 2022 17:34:40 +0100 Subject: [PATCH] fck! - to much python programming last weeks, msvc doesn't like logical or Signed-off-by: Martin --- openhantek/src/OH_BUILD.h | 2 +- openhantek/src/post/mathchannelgenerator.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openhantek/src/OH_BUILD.h b/openhantek/src/OH_BUILD.h index 32582aff..96e657d6 100644 --- a/openhantek/src/OH_BUILD.h +++ b/openhantek/src/OH_BUILD.h @@ -1,2 +1,2 @@ // Do not edit, will be re-created at each commit! -#define OH_BUILD "20220218 - commit 953" +#define OH_BUILD "20220218 - commit 954" diff --git a/openhantek/src/post/mathchannelgenerator.cpp b/openhantek/src/post/mathchannelgenerator.cpp index b9994129..6b554832 100644 --- a/openhantek/src/post/mathchannelgenerator.cpp +++ b/openhantek/src/post/mathchannelgenerator.cpp @@ -68,10 +68,10 @@ void MathChannelGenerator::process( PPresult *result ) { } } else { // unary operators (calculate "AC coupling" or DC value) unsigned src = 0; - if ( Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::AC_CH1 or + if ( Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::AC_CH1 || Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::DC_CH1 ) src = 0; - else if ( Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::AC_CH2 or + else if ( Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::AC_CH2 || Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::DC_CH2 ) src = 1; @@ -89,12 +89,12 @@ void MathChannelGenerator::process( PPresult *result ) { average /= double( result->data( src )->voltage.sample.size() ); auto srcIt = result->data( src )->voltage.sample.begin(); - if ( Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::AC_CH1 or + if ( Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::AC_CH1 || Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::AC_CH2 ) // ... and remove DC component to get AC for ( auto dstIt = resultData.begin(), dstEnd = resultData.end(); dstIt != dstEnd; ++srcIt, ++dstIt ) *dstIt = sign * ( *srcIt - average ); - else if ( Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::DC_CH1 or + else if ( Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::DC_CH1 || Dso::getMathMode( scope->voltage[ mathChannel ] ) == Dso::MathMode::DC_CH2 ) // ... and show DC component for ( auto dstIt = resultData.begin(), dstEnd = resultData.end(); dstIt != dstEnd; ++srcIt, ++dstIt )