STM32F103 发表于 2015-10-13 17:34
我之前遇到过。解决方法是如果用到了FreeRTOS,就增大配置给FreeRTOS的堆栈空间,增大附加给任务的堆栈空间 ...
问题点存在于下述三个语句:
void MainTask(void) {
……
_AddValues();
……
}
static void _AddValues(void) {
……
GRAPH_DATA_YT_AddValue(_ahData, _aValue);
……
}
static void _cbCallback(WM_MESSAGE * pMsg) {
……
_ahData = GRAPH_DATA_YT_Create(_aColor, 500, 0, 0);
……
}
emWin手册上是这么说的:
Additional information
The given data value is added to the data object. If the data object is full, that
means it contains as many data items as specified in parameter MaxNumItems during
the creation, it first shifts the data items by one before adding the new value. So the
first data item is shifted out when adding a data item to a full object.
The value 0x7FFF can be used to handle invalid data values. These values are
excluded when drawing the graph. The following screenshot shows a graph with 2
gaps of invalid data:
英语太渣,目前还没有看懂。所以,暂时的处理就是在数据填充到快满的时候把数据清空一下,效果当然也是很渣的了,但不到于Down机了
GRAPH_DATA_YT_Clear(_ahData);