Skip to content

Logic error in begin(uint8_t mode, uint8_t x, uint8_t y) #77

@GoogleCodeExporter

Description

@GoogleCodeExporter
I may misunderstand your intention, or you use some trick i don't see, but i 
believe you have an in line 77 of TVout.cpp, where you check if size of the 
horizontal resolution is divisible by 8.
In the current code, this logic expression should evaluate to true if the x is 
not divisible by 8:

!(x & 0xF8)

However, as far as i can see this only evaluates to true if x has a value in 
the range of 0-7, or some ranges above 255 (fx. 256 is divisible by 8, but this 
resolution may be outside the capabilities of the library?).
I believe the desired effect will be achieved with:

(i & ~0xF8)

This evaluates to true for all values not divisible by 8 in the range of 0-255.

Hope this helps.
If I have misunderstood the logic or your intentions, i'm sorry for wasting 
your time.

Original issue reported on code.google.com by jesper.b...@gmail.com on 29 Nov 2013 at 11:10

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions