2021-12-18 08:10 AM
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?
2021-12-18 10:26 AM
?? how problem show code
2021-12-18 10:36 AM
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.
2021-12-18 11:04 AM
You still dont show how and where you add. show file name location and code
int AddRegister;
2021-12-19 11:19 PM
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.