Skip to content

Commit

Permalink
fck! - to much python programming last weeks, msvc doesn't like logic…
Browse files Browse the repository at this point in the history
…al or

Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
  • Loading branch information
Ho-Ro committed Feb 18, 2022
1 parent 658d559 commit ef608ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openhantek/src/OH_BUILD.h
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 4 additions & 4 deletions openhantek/src/post/mathchannelgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 )
Expand Down

0 comments on commit ef608ad

Please sign in to comment.