??? 03/15/12 08:43 Read: times |
#186683 - serialangle data type Responding to: ???'s previous message |
Per Westermark said:
So what data type is serialangle?
(20+20)*10 = 400. So it must be better than an 8-bit data type. serialangle is signed int. Earlier i said my code was like this. serialangle = (serialangle + 20) * 10; It is actually like this serialangle = (accdeg + 20) * 10; in which accdeg is a float type which it can vary fromm -20 to + 20 Per Westermark said:
You shouldn't do any "| 0x30". If the intention is to make it into ASCII digits, then you should use '0'. I used '|0x30' cause I was told to do so and it worked fine. I will try using '0' |
Topic | Author | Date |
I'm having problems calculating negative float values | 01/01/70 00:00 | |
float values? | 01/01/70 00:00 | |
65536 no | 01/01/70 00:00 | |
negative float numbers | 01/01/70 00:00 | |
Two comparisons | 01/01/70 00:00 | |
Insufficient justification | 01/01/70 00:00 | |
re:insufficient justification | 01/01/70 00:00 | |
how are numbers transmitted? | 01/01/70 00:00 | |
serial Tx code | 01/01/70 00:00 | |
Data type? | 01/01/70 00:00 | |
Data type? | 01/01/70 00:00 | |
serialangle data type | 01/01/70 00:00 | |
Just a question of readability | 01/01/70 00:00 | |
re: just a question of readability | 01/01/70 00:00 | |
why do you keep babbeling about 'float' | 01/01/70 00:00 | |
float reason | 01/01/70 00:00 | |
fixed point | 01/01/70 00:00 | |
re:fixed point | 01/01/70 00:00 | |
typecast | 01/01/70 00:00 |