Coder Social home page Coder Social logo

avr-ssd1306's People

Contributors

efthymios-ks avatar tekl7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

avr-ssd1306's Issues

Probable error in Y axis bounds checking

Hello,

I have a simple program that uses your library. It makes it very simple to display text and basic shapes, thank you for contributing this. Every once in a while it seems something writes all over the memory of my application with values like 0xff or 0x00.

I have some code that adjusts my internally managed X and Y offsets on a timer. So the displayed image is shifted by a few pixels all over the screen very slowly. This is meant to avoid burn in of the display.

I have been trying to understand this problem and was doing some basic code review of your code and noticed what seems like an error in your Y Axis bounds checking

void GLCD_GotoX(const uint8_t X)
{
	if (X < __GLCD_Screen_Width)
		__GLCD.X = X;
}

void GLCD_GotoY(const uint8_t Y)
{
	if (__GLCD.Y < __GLCD_Screen_Height)
		__GLCD.Y = Y;
}

My screen height and width are less than 255.

If I make a call like GLCD_GotoX(255) it will just do nothing.

But I call GLCD_GotoY(255) the first call checks the existing value __GLCD.Y against the maximum height. It then sets __GLCD.Y = 255. Now __GLCD.Y is stuck at too large of a value. Presumably now the graphics library is just writing all over the SRAM of my device.

I think the check in GLCD_GotoY should be if ( Y < __GLCD_ScreenHeight). Do you agree?

Eric

Compile errors in Microchip Studio 7

On SSD1396.c, getting warning in Microchip Studio 7, "extra tokens at end of #ifdef directive" on line 41
On SSD1396.c, getting error in Microchip Studio 7, "missing binary operator before token "("" on line 107
On TWI.c, getting error in Microchip Studio 7, "'F_CPU' undeclared (first use in this function)" on line 23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.