Submitted a bug report.
Weird. As a workaround you could store the previous point and if the current point’s position is too similar simply skip appending it.
Yeah. Before we even selected CSDK for this project. I made a test for streaming data to update graphics. CSDK was lightning fast compared to our Javascript solution when updating graphics at a rate of 100 times per second. I didn’t expect any problems with the graphics. Obviously our test data didn’t have any duplicates.
Even after trapping the duplicates with a simple boolean == we still saw the wonky behavior. I woke up this morning with the thought that maybe there is a threshold below which Graphics 2.0 treats the value as the same, even when equivalence tests say it is different. Seems like that’s what happens. In normal drawing situations no one would ever append two identical values or put a place holder value at the start that is identical to the original point, so I can see how it might have been missed in development.
I think I’m going to remove duplicates further back in the stream in the c-code that monitors the robot movement. We update 2-4 iPod touch devices for every data point, so we don’t want to send a value over the network if it isn’t going to be plotted. We might scale our sample rate for the speed of the robot movement, but I think we’ll just round the values to .0x with c-code, trap the duplicates and send only values that are different enough to be plotted across the network.
I’m actually loving CSDK for our collaborative classroom network projects that use IOS/Android devices. We do a lot of science and math activities that use robots, probes, sensors, etc., so graphing will be really important for us. The networking is fast, straight forward and really stable.
Corona Labs has a nice product.