Skip to content

Commit

Permalink
Fix byte encoding in FrameV2
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnColanduoni committed May 18, 2020
1 parent 0e2ae7e commit f3020dd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/SpiAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,13 @@ void SpiAnalyzer::GetWord()
mResults->AddFrame( result_frame );

FrameV2 framev2;
framev2.AddInteger( "mosi", mosi_word );
framev2.AddInteger( "miso", miso_word );
if (bits_per_transfer <= 8) {
framev2.AddByte("mosi", static_cast<U8>(mosi_word));
framev2.AddByte("miso", static_cast<U8>(miso_word));
} else {
framev2.AddInteger( "mosi", mosi_word );
framev2.AddInteger( "miso", miso_word );
}
mResults->AddFrameV2( framev2, "result", first_sample, mClock->GetSampleNumber() + 1 );

mResults->CommitResults();
Expand Down

0 comments on commit f3020dd

Please sign in to comment.