2019-01-04 12:02 PM
I started a project from scratch in CubeMX.
and the set TouchGFX for portrait as :
Middleware->Graphics->TouchGFX, changed width : 272 and Height : 480.
In TouchGFX designer it displays correctly as Portrait(see PortraitFromTouchGFX).PNG) but when I compiled using IAR and deployed it on the target bd, it doesn’t display correctly (see From STM32F746-Disco Display.jpg )
In Hal.hpp : It automatically sets the display orientation based on width/height, so I don't think I need to do anything else. (Changing LTDC etc)
HAL(DMA_Interface& dmaInterface, LCD& display, TouchController& touchCtrl, uint16_t width, uint16_t height) :
dma(dmaInterface),
lcdRef(display),
touchController(touchCtrl),
mcuInstrumentation(0),
buttonController(0),
taskDelayFunc(0),
frameBuffer0(0),
frameBuffer1(0),
frameBuffer2(0),
refreshStrategy(REFRESH_STRATEGY_DEFAULT),
fingerSize(1),
lockDMAToPorch(true),
touchSampleRate(1),
mcuLoadPct(0),
vSyncCnt(0),
vSyncForFrame(1),
vSyncCompensationEnabled(false),
clientDirty(false),
swapRequested(false),
lastTouched(false),
updateMCULoad(0),
cc_begin(0),
displayOrientationChangeRequested(false)
{
instance = this;
DISPLAY_WIDTH = width;
DISPLAY_HEIGHT = height;
DISPLAY_ROTATION = rotate0;
FRAME_BUFFER_WIDTH = DISPLAY_WIDTH;
FRAME_BUFFER_HEIGHT = DISPLAY_HEIGHT;
nativeDisplayOrientation = ((width >= height) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
}
Solved! Go to Solution.
2019-01-11 01:28 AM
I'll just post it here for others see. Let me know if it helps!
http://ftp.draupnergraphics.com/TouchGFX/knowledgebase/f746grotation.zip
2019-01-11 03:36 AM
Martin,
Thanks. I'll look into that.
2019-01-11 03:39 AM
Sounds good. It's based on TouchGFX 4.10.0. I couldn't see what version you were using from this thread.
2020-05-10 01:00 AM
Hi,Martin
I'm using TouchGFX 4.13.0 Designer, and add "screen_orientation := -rotate90" to the file(config/gcc/app.mk), it didn't work.
then, i found the "image_configuration" in the file (.config), and add "screen_orientation := -rotate90", as shown in the figure below.
when generated code in TouchGFX Designer, i got error information "Unknown option 'screen_orientation' in configuration file",
so, how should I add the statement "screen_orientation"??
Thanks