Skip to main content
GunGo
Associate
January 10, 2023
Question

How to get keypad input as hex

  • January 10, 2023
  • 2 replies
  • 1176 views

Hello everyone.

​

I Tried shared widget keypad with numbers. My question is how can get to hex from wildcard Unicode::UnicodeChar. Idea is to send simple CANBus message where is 9 wildcard input buffers and after char input it saves chars to a gui and saves hex to buffers ID[9] and Data[8]

​

In GUI widget input

ID[0FFAB] DATA[11][00][AB][02][03][00][FF][BE]​

And it saves in bufers like:

ID[9] = {0x00000FFAB}​

Data[8]={0x11,0x00,0xAB,0x02,0x03,0x00,0xFF,0xBE}​

​

This topic has been closed for replies.

2 replies

Yoann KLEIN
ST Employee
January 10, 2023

Hello @GunGo​,

Did you take a look at the documentation of the Unicode class ?

Maybe you can find something useful there.

/Yoann

Yoann KLEINST Software Developer | TouchGFX
GunGo
GunGoAuthor
Associate
January 10, 2023

Can you specify which function can format unicode char A to integer hex A or dec 10

Becouse direct convert from unicode to hex is 0x41

​

I use Tgfx​ 4.21