Version 2.8 issues..

Discussion to talk about software related topics only.
Post Reply
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Version 2.8 issues..

Post by pbreed »

We have found two significant issues in 2.8.
One in the ethernet Driver for all 5441X parts, and one in TCP that effects all devices.

We will be putting together 2.8.1 some time in the next week... expect a release in about a week.
We should also do a 2.7.6 a few days after that.

Paul
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: Version 2.8 issues..

Post by ecasey »

One more thing to look at:
in 2.8.0 ostringstream is having trouble with floats and doubles.

This code:

Code: Select all

 ostringstream JSON;
    string Cvalue =  "(=)";
    string Text = "Wind Direction";
    int Precision = 2;
    string UOM = " MPH";
    float Value = 7.212;

    while (1) {
    	JSON.str("");
    	JSON	<< "{\"SENSOR\" : \""
    			<< Text
    			<< "\","
    			<< "\"VALUE\" : \""
    			<< Cvalue
    			<< setiosflags(std::ios::fixed)
    			<< setprecision(Precision)
    			<< Value
    			<< UOM
    			<<"\"}"
    								;
    		iprintf("\n%s\n",JSON.str().c_str());



        OSTimeDly(TICKS_PER_SECOND*20);
    }
outputs:
{"SENSOR" : "Wind Direction","VALUE" : "(=)f MPH"}
Note the "f" where the "7.21" should be. It does this for doubles and floats. Ints are handled correctly.
If I comment out the setiosflags(std::ios::fixed), the "f" becomes a "g".

Insights?
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: Version 2.8 issues..

Post by dciliske »

Uh... Right. This is weird. Thanks for the heads up.
Dan Ciliske
Project Engineer
Netburner, Inc
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: Version 2.8 issues..

Post by dciliske »

Looks like this is probably an issue with the C++ STL. Not sure whether it's a bug in the version we used or a miscompilation.
Dan Ciliske
Project Engineer
Netburner, Inc
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: Version 2.8 issues..

Post by pbreed »

We have a fix for the stream stuff... ask on support....
Should have a 2.8.1 beta early next week..
Post Reply