3969 发表于 2018-1-10 16:13:58

关于上报数据的问题

本帖最后由 Genius 于 2018-1-12 10:29 编辑

刚学,做实验。我使用MSP430F149方案,WiFi使用安信可8266的12F模块,手机APP配合按键,配网成功,但是手机App里显示的数据都是0,为什么?
谢谢!
MCU使用自动生成的程序,只修改了与数据有关的userHandle()和userInit()两个函数,如下红色部分(本来是被注释掉的)。

void userInit(void)
{
    memset((uint8_t*)¤tDataPoint, 0, sizeof(dataPoint_t));

    /** Warning !!! DataPoint Variables Init , Must Within The Data Range **/

    currentDataPoint.valueMV1 =700 ;
      currentDataPoint.valueMV2 = 0;
      currentDataPoint.valueTEMP = 250;
}



void userHandle(void)
{

    currentDataPoint.valueMV1 =505 ;//Add Sensor Data Collection
    currentDataPoint.valueMV2 =1383 ;//Add Sensor Data Collection
    currentDataPoint.valueTEMP =288 ;//Add Sensor Data Collection

}


————————已解决——————————
确定昨天是烧错txt文件了。




3969 发表于 2018-1-11 09:31:37

确定昨天是烧错txt文件了。怎么结帖?

魂归汝居 发表于 2018-1-10 20:05:57

你上面那个报错的意思不是你定义的数据超范围了吗

3969 发表于 2018-1-10 21:19:25

魂归汝居 发表于 2018-1-10 20:05
你上面那个报错的意思不是你定义的数据超范围了吗

那是注释(警告),不是报错信息。

3969 发表于 2018-1-10 21:22:23

可能是我烧错txt文件了,晚上在家调试,手机端显示数据不再是0。
页: [1]
查看完整版本: 关于上报数据的问题