cancel
Showing results for 
Search instead for 
Did you mean: 

How to get keypad input as hex

GunGo
Associate

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}​

2 REPLIES 2
Yoann KLEIN
ST Employee

Hello @GunGo​,

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

Maybe you can find something useful there.

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

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