- Joined
- Jun 22, 2011
- Messages
- 2,431
- Points
- 83
Thanks for testing, That seems correct. Even with rerender false it's still choppy? on 1.4 and smooth on 1.5?
Last edited:
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
float value = 2.2;
void setup()
{
Serial.begin( 9600 );
}
void loop()
{
Serial.println( value, 8 );
delay( 100 );
}
Well, I could make it stitch the points (that only takes two lines of code), but that won't solve the actual problem (that the datapoints are unevenly spaced due to slowness).
I managed to do some simulations by limiting my computer to 40% of it's clockrate (about 1.2GHz) and forcing Java to run on a single core. It didn't slow down to the point of producing gaps while not rerendering, but it does produce gaps if rerender=true. I also compared to Trevor's version and unfortunately mine seems to be slower, even after disabling oversampling and comparing my "roll" end action to his "monitoring" (which are pretty much the same thing). This only made a difference when rerendering (i.e. after the graph passes the first 60s), though.
TBH I don't think I'll be able to "fix" this. I don't know of a (sort of automatic) way to profile processing applications and it would take time that I don't have to analyse this manually. If I were to do that I'd rather rewrite it from scratch in something more efficient than Java/Processing. I don't think this slowness makes a difference to most users, but those with older computers that are noticing slowness should probably use Trevor's version instead.
Edit: I had done this so long ago I forgot you have to set "Comm.Serial.AutoConnectPort" to your port name (and remove the first # of the line) on your data/Peregrine.conf file for it to autoconnect.
@Trevor: while doing the simulations I noticed Peregrine 1.5 does not auto detect my LPM correctly. It thinks it's a Kenometer and keeps attempting handshakes (I'm using simple mode). Since there's no way to force it to a specific protocol I had to comment out the contents of HandshakeProcess() on Serial.pde to get it to work. Here's the simplified code I was using (on an Arduino Mega), in case you want to test it:
Code:float value = 2.2; void setup() { Serial.begin( 9600 ); } void loop() { Serial.println( value, 8 ); delay( 100 ); }
@netwave: I'm also using the 2.0b7 Trevor mentioned. It's over 300MB, if it was smaller I'd upload it for you. But just use the executables included, like Trevor said.
@Trevor: I noticed the protocol was wrong on the debug pane and that the handshake counter was rolling. Then I just searched the source files for lines that had "INPUT_KENOMETER" and that function came up, I commented the contents out and it worked (detected my Arduino as simple). Didn't invastigate any further than that
Tested with a nano and it worked fine. Might be something specific about the mega.