This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC2340R5:从 Temperature_getTemperature 获取十进制值

Guru**** 1133960 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1251449/cc2340r5-get-decimal-from-temperature_gettemperature

器件型号:CC2340R5

您好、TI 成员!

以下是我的建筑环境:

软件

版本

Code Composer Studio

12.3.0.00005  

SimpleLink SDK

7.10.00.35

XDCtools

3.62.1.16_CORE

我们希望从 Temperature_getTemperature ()获得十进制温度。

可用吗? 如果可以,我们如何设置 Temperature_getTemperature ()的输入?

谢谢。

Br、

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、YW:

    函数  

    int16_t Temperature_getTemperature (void);

    以整数形式返回温度、以°C 为单位。  

    因此您不必重新配置任何内容。

    如果您想了解其工作原理、可以查看驱动程序示例文件夹中的示例 tempatureNotify。

    此致、

    亚历克斯

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Alex:

    小数点后的数字如何?

    我是否能够将  Temperature_getTemperature (void)的输出分配为浮点值并将温度显示为35.5°C 的值?

    谢谢。

    Br、

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、YW:

    据我所知、这是不可能实现的。 因为在数字之后该函数不会返回。

    此致、

    亚历克斯