cancel
Showing results for 
Search instead for 
Did you mean: 

Any changing in touchgfx libraries doesn't work on our device

Ezgi
Senior

Hi,

While we were writing codes, everything is working perfectly in the simulator. When it was time to try it on our device, we had a problem about touchgfx and couldn't find it for a long time. However we realized that we added a variable to touchgfx's drawable class , which caused our device to stop working.

How could we fix this problem?

4 REPLIES 4
MM..1
Chief II

?? how problem show code

For example, we add "int AddRegister" to touchgfx::Drawable class, it works in simulator but doesn't work on device. A little changing in touchgfx classes, doesn't work on device.

You still dont show how and where you add. show file name location and code

int AddRegister;

This is protected part of Drawable class:

protected:
    Rect rect; ///< The coordinates of this Drawable, relative to its parent.
    /// @cond
    Rect cachedVisibleRect; ///< Cached representation of currently visible area. For TouchGFX internal use.
    /// @endcond
    Drawable* parent;      ///< Pointer to this drawable's parent.
    Drawable* nextSibling; ///< Pointer to the next Drawable. Maintained by containers.
    /// @cond
    Drawable* nextDrawChainElement; ///< Next in draw chain. For TouchGFX internal use.
    int16_t cachedAbsX;             ///< Cached value of absolute x coordinate. For TouchGFX internal use.
    int16_t cachedAbsY;             ///< Cached value of absolute y coordinate. For TouchGFX internal use.
    /// @endcond
    bool touchable; ///< True if this drawable should receive touch events.
    bool visible;   ///< True if this drawable should be drawn.
 
    /// @cond
    static const int16_t UNCACHED_INDICATOR = -1; ///< Constant representing uncached value. For TouchGFX internal use.

if I add a bool variable like this :

protected:
    Rect rect; ///< The coordinates of this Drawable, relative to its parent.
    /// @cond
    Rect cachedVisibleRect; ///< Cached representation of currently visible area. For TouchGFX internal use.
    /// @endcond
    Drawable* parent;      ///< Pointer to this drawable's parent.
    Drawable* nextSibling; ///< Pointer to the next Drawable. Maintained by containers.
    /// @cond
    Drawable* nextDrawChainElement; ///< Next in draw chain. For TouchGFX internal use.
    int16_t cachedAbsX;             ///< Cached value of absolute x coordinate. For TouchGFX internal use.
    int16_t cachedAbsY;             ///< Cached value of absolute y coordinate. For TouchGFX internal use.
    /// @endcond
    bool touchable; ///< True if this drawable should receive touch events.
    bool visible;   ///< True if this drawable should be drawn.
 
    bool Addition; /*It was added by me*/
 
    /// @cond
    static const int16_t UNCACHED_INDICATOR = -1; ///< Constant representing uncached value. For TouchGFX internal use.

even if I don't use it , I don't have a compiler error but it doesn't work on device.