Thank You Gargy,
the new version works.
I see you have changed the console.h
static D4D_CNSL_DATA name##_data = { /*line_cnt - 1*/ 0, {0, 0}, D4D_FALSE, 0, 0};
So that the firs line is not written at the end of the array.
I still have a problem with the cursor.
https://community.freescale.com/message/95850#95850
When I put the cursor to a special position with
the command
cursor_position.x = 1;
cursor_position.y = 2;
(void) D4D_CnslGoToXY(&scrMain_Cons, cursor_position);
The cursor is displayed at the last position of the correct line.
After that I insert a character with the command:
(void)D4D_CnslPutString(&scrMain_Cons, "X");
The "X" is on position 1 in line 2, but the cursor is showen at the end of the line.
I have also a by changing the screen. I have buttons in the screens.
// Button in the screen register
static void ScrRegister_OnClickBtnConsole (D4D_OBJECT* pThis)
{
D4D_ActivateScreen(&screen_main, D4D_FALSE);
D4D_RedrawScreen(&screen_main);
}
// Button in the screen main
static void ScrMain_OnClickBtnMonitor(D4D_OBJECT* pThis)
{
D4D_ActivateScreen(&screen_register, D4D_FALSE);
}
I want to change the showen screens from main screen to register screen and back.
This only works two times. After that the buttons are inactive.
Have you got any idea ?
Hop you can help
Thomas