Skip to content

Commit

Permalink
Fixed parsing of monochrome picture graphic IOP data
Browse files Browse the repository at this point in the history
Fixed an issue where bits in a monochrome bitmap were interpreted in reverse,
causing monochrome picture graphics would appear corrupted.
  • Loading branch information
ad3154 committed Apr 25, 2024
1 parent bb24496 commit 8aee801
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2317,7 +2317,7 @@ namespace isobus
{
for (std::uint_fast8_t k = 0; k < 8U; k++)
{
tempObject->add_raw_data((iopData[1] >> k) & 0x01);
tempObject->add_raw_data(static_cast<std::uint8_t>(0 != ((iopData[1]) & (1 << (7 - k)))));
lineAmountLeft--;

if (0 == lineAmountLeft)
Expand Down Expand Up @@ -2393,7 +2393,7 @@ namespace isobus
{
for (std::uint_fast8_t j = 0; j < 8U; j++)
{
tempObject->add_raw_data((iopData[0] >> j) & 0x01);
tempObject->add_raw_data(static_cast<std::uint8_t>(0 != ((iopData[0]) & (1 << (7 - j)))));
lineAmountLeft--;

if (0 == lineAmountLeft)
Expand Down

0 comments on commit 8aee801

Please sign in to comment.