Question
Gauge Image only half appearing on screen, it simulates ok on ToughGFX designer and also with visual studio.

i have use example from TouchGFX Demo 1, ive gone through code but cant see anything obvious. with the 746 Disco board, above.
i set up the project through TouchGFX designer, only one screen and copied code from example, here is the view.cpp
i have canvas buffer set at 3600, and tried increasing by 1000. but no difference. iI dont have much experience , (student) so any pointers /advice would be appreciated.
i have tried to search forum/google/documentation etc but had no luck as yet.
thanks in advance
Barry
#include <gui/screen1_screen/Screen1View.hpp>
#include "BitmapDatabase.hpp"
#include <texts/TextKeysAndLanguages.hpp>
#include <touchgfx/Color.hpp>
#include <touchgfx/EasingEquations.hpp>
Screen1View::Screen1View(): currentAnimationState(ANIMATION_GAUGE),
tickCounter(0)
{
}
void Screen1View::setupScreen()
{
gauge.setBitmaps(Bitmap(BITMAP_GAUGE_BACKGROUND_CURRENT_ID), Bitmap(BITMAP_GAUGE_NEEDLE_PIN_ID));
gauge.setXY(image1.getX() + (image1.getWidth() - gauge.getWidth())/2 , image1.getY() + (image1.getHeight() - gauge.getHeight()) / 2);
gauge.setLimits(0, 60, 240, 480);
gauge.setValue(40);
gauge.setAnimationDuration(20);
//gauge.setVisible(false);
add(gauge);
//gauge.invalidate();
gauge.setVisible(true);
gauge.invalidate();
currentAnimationState = NO_ANIMATION;
/*gauge.setVisible(true);
gauge.invalidate();*/
/*if (gauge.isVisible())
{
currentAnimationState = ANIMATION_GAUGE;
}*/
//Screen1ViewBase::setupScreen();
}
void Screen1View::tearDownScreen()
{
Screen1ViewBase::tearDownScreen();
}
void Screen1View::handleTickEvent()
{
tickCounter++;
/*gauge.setVisible(true);
gauge.invalidate();*/
if (gauge.isVisible())
{
currentAnimationState = ANIMATION_GAUGE;
}
if (getAnimationState() == ANIMATION_GAUGE)
{
if (tickCounter % 60 == 0)
{
if (gauge.getValue() > 50)
{
gauge.setEasingEquation(EasingEquations::backEaseOut);
gauge.setAnimationDuration(20);
gauge.setValue(0);
}
else
{
int value = gauge.getValue();
int newValue = value + 15;// Utils::randomNumberBetween(-6, 18);
if (newValue < value)
{
gauge.setEasingEquation(EasingEquations::backEaseOut);
gauge.setAnimationDuration((newValue - value) * 2);
}
else
{
gauge.setEasingEquation(EasingEquations::quadEaseOut);
gauge.setAnimationDuration(newValue - value);
}
gauge.setValue(newValue);
}
}
}
}
Screen1View::AnimationState Screen1View::getAnimationState()
{
/*if (currentAnimationState == ANIMATION_THREE_WAY_RUNNING)
{
for (int i = 0; i < NUMBER_OF_BARS; i++)
{
if (barAnimationState[i] == ANIMATION_THREE_WAY_RUNNING)
{
return ANIMATION_THREE_WAY_RUNNING;
}
}
return NO_ANIMATION;
}
*/
return currentAnimationState;
}