Hi,
We tried this code below from one of our samples on the BT817 and the touch was aligned on the slider correctly, you could try this to see if it works,
Do you have any other code in your display list which may also be affecting the tracking area?
Also, do you use any screen rotation etc.
Best Regards, BRT Community
void eve_display(void)
{
uint32_t TrackerVal = 0;
uint8_t TagVal = 0;
uint16_t SlideVal = 0;
uint16_t Button3D = 0;
uint8_t color = 0;
while(1)
{
EVE_LIB_BeginCoProList(); // Begin new screen
EVE_CMD_DLSTART(); // Tell co-processor to create new Display List
EVE_CLEAR_COLOR_RGB(0, 0, 0); // Specify color to clear screen to
EVE_CLEAR(1,1,1); // Clear color, stencil, and tag buffer
EVE_TAG_MASK(1); // Enable tagging
EVE_TAG(2); // Tag following items with tag 2
EVE_CMD_FGCOLOR(0x0000FF); // Blue foreground color
EVE_CMD_BUTTON(100, 200, 80, 30, 27, Button3D, "Button"); // Draw button
EVE_TAG(5); // Tag following items with tag 5
EVE_CMD_SLIDER(300, 100, 200, 30, 0, SlideVal, 255); // Draw a slider
EVE_CMD_TRACK(300, 100, 200, 30, 5); // Place a tracker
EVE_TAG_MASK(0); // Mask tagging so that following items won't be tagged
EVE_BEGIN(EVE_BEGIN_POINTS); // Draw a dot in red at 140, 100)
EVE_POINT_SIZE(30*16);
EVE_COLOR_RGB(color, 0, 0); // Set colour to blue and write some text
EVE_VERTEX2F((140*16), (100*16));
EVE_END();
EVE_DISPLAY(); // Tell EVE that this is end of list
EVE_CMD_SWAP(); // Swap buffers in EVE to make this list active
EVE_LIB_EndCoProList(); // Finish the co-processor list burst write
EVE_LIB_AwaitCoProEmpty(); // Wait until co-processor has consumed all commands
// ------ read tag and tracker values --------
TagVal = HAL_MemRead8(EVE_REG_TOUCH_TAG); // Get Tag value
TrackerVal = HAL_MemRead32(EVE_REG_TRACKER); // Read the value of the tag and track register
if(TagVal == 2)
{// If button pushed tag register will read 2
color = 0xFF; // change red amount to 255
Button3D = 256; // Give the button a pushed-in appearance
}
else
{// Otherwise...
color = 0x00; // change red amount to 0 so dot is not visible
Button3D = 0; // Button has 3D effect (not pushed in))
}
if(TagVal == 5) // if slider touched...
{
SlideVal = (TrackerVal >> 24); // ... then get the tracker value.
// Note: Value of tracking is 16 bits but we only use upper 8 bits since the slider is set for 8 bit resolution
}
// Result of button press and slider value will be displayed next time round
}
}