Menu

Error defining OLED mode

AdyJ1
2021-08-08
2021-08-12
  • AdyJ1

    AdyJ1 - 2021-08-08

    Hi Robert,
    Thanks again for the excellent project.
    I have upgraded to version 230 and have a problem when compiling.
    In section 4 of focuserconfig.h I have the following defined;

    #define OLED_MODE   OLED_TEXT       // OLED text only mode
    //#define OLED_MODE     OLED_GRAPHIC    // OLED graphic mode
    

    When I compile, I get the following error;

    In file included from ...\myFP2ESPFirmware-230\src\myFP2ESP\displays.cpp:12:0:
    generalDefinitions.h:27:31: error: expected identifier before numeric constant
    #define OLED_TEXT          1
    

    I get a similar error if I define OLED_GRAPHIC instead of OLED_TEXT

    Attached is my full focuserconfig.h . How have I managed to screw it up this time ;-) ?

    Ady

    P.S. - Also, I notice in displays.h there is a couple of references to OLED_GRAPHICS instead of OLED_GRAPHIC (lines 11,13,21,23) . I assume this is a typo but it does not seem to relate to my error.

     
  • AdyJ1

    AdyJ1 - 2021-08-08

    I forgot to add, if I comment out the offending definition in generalDefinitions.h the program compiles and everything seems to work.

     
  • brownrb

    brownrb - 2021-08-08

    yeah, some of that code is probably wrong.
    Let me look at it and see what I can do.

    do this in generaldefinitions.h

    //#define OLED_TEXT 1
    //#define OLED_GRAPHIC 2

     

    Last edit: brownrb 2021-08-08
  • AdyJ1

    AdyJ1 - 2021-08-12

    Thanks Robert

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.