+*/
+void setGraphBuf(uint8_t *buff,int size)
+{
+ int i=0;
+ ClearGraph(0);
+ for (; i < size; ++i){
+ GraphBuffer[i]=buff[i];
+ }
+ GraphTraceLen=size;
+ RepaintGraphWindow();
+ return;
+}
+int getFromGraphBuf(uint8_t *buff)
+{
+ uint32_t i;
+ for (i=0;i<GraphTraceLen;++i){
+ if (GraphBuffer[i]>127) GraphBuffer[i]=127; //trim
+ if (GraphBuffer[i]<-127) GraphBuffer[i]=-127; //trim
+ buff[i]=(uint8_t)(GraphBuffer[i]+128);
+ }
+ return i;
+}