This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sdk:castint2float [2017/06/14 12:49] – juraschek | sdk:castint2float [2018/02/02 15:45] (current) – preisig | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| We are assuming that in Register 0x0002 are the MSB and in 0x0001 are the LSB. | We are assuming that in Register 0x0002 are the MSB and in 0x0001 are the LSB. | ||
| - | Therfore we need to shit the Register 2 16bit to the right and perform an Bitwise-" | + | Therfore we need to shift the Register 2 16bit to the right and perform an Bitwise-" |
| Afterthat we need to copy this integer value into a memory resoure and retrieve it as a float again. | Afterthat we need to copy this integer value into a memory resoure and retrieve it as a float again. | ||
| Line 23: | Line 23: | ||
| mputint(mem, | mputint(mem, | ||
| tempfloat=mgetfloat(mem, | tempfloat=mgetfloat(mem, | ||
| + | free(mem); | ||
| </ | </ | ||