Wifi attachment commands
Re: Wifi attachment commands
Yeah, correct
You got the idea.... For now, this should get you going with storing neg values until a permanent fix is found.
I'll try to patch later today.
You got the idea.... For now, this should get you going with storing neg values until a permanent fix is found.
I'll try to patch later today.
Roberto.
Re: Wifi attachment commands
If you're bored and want to understand more about what Roberto was talking about, try this: http://en.wikipedia.org/wiki/Two%27s_complement
Signed ints are stored using "twos complement notation" inside the arduino. You'll see a little table on the right hand side toward the top of the page, illustrating storage of positive and negative numbers (although in 8-bit format rather than 16 like your situation).
Signed ints are stored using "twos complement notation" inside the arduino. You'll see a little table on the right hand side toward the top of the page, illustrating storage of positive and negative numbers (although in 8-bit format rather than 16 like your situation).
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
Re: Wifi attachment commands
great reference. i don't have my old books that discuss that stuff anymore so i couldn't refer to them to post a response.
Wifi attachment commands
I understand two's compliment and how large numbers are stored in binary representations. I guess the issue for me is that we are storing int's and bytes which are made up of multiple bits. We aren't flipping bits one by one we are doing write() and write_int() one byte at a time. I guess the bigger problem is that from the web we are writing one character at a time and assuming its a digit and dropping non-digits. So the negative is being treated as garbage and being dropped on the floor.
In the case of a /mb request or /mi request we should not drop it on the floor but instead set the signed bit accordingly...
I've got a working front-end storing the value appropriately, but it would simplify a lot if we just did it correctly on the back end.
In the case of a /mb request or /mi request we should not drop it on the floor but instead set the signed bit accordingly...
I've got a working front-end storing the value appropriately, but it would simplify a lot if we just did it correctly on the back end.
Re: Wifi attachment commands
I would argue that, in the long run, end-user apps shouldn't be worrying about bytes and ints at all.
Hopefully in a week or so I'll have something to show for how I envision this working.
I must admit I still haven't figured out where the params in the request are actually parsed from ascii to byte values... (where is "weboption" set?)
Hopefully in a week or so I'll have something to show for how I envision this working.
I must admit I still haven't figured out where the params in the request are actually parsed from ascii to byte values... (where is "weboption" set?)
Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
Re: Wifi attachment commands
This should be good. I look forward to seeing this.enigma32 wrote:I would argue that, in the long run, end-user apps shouldn't be worrying about bytes and ints at all.
Hopefully in a week or so I'll have something to show for how I envision this working.
weboption is set in the ELSE clause inside the pushbuffer function.I must admit I still haven't figured out where the params in the request are actually parsed from ascii to byte values... (where is "weboption" set?)
Re: Wifi attachment commands
Ok, I patched the neg number reading and writing.
Grab the dev branch to test it.
Grab the dev branch to test it.
Roberto.
Re: Wifi attachment commands
Sweet, I'll try it out tomorrow if I can get some time. I've already pulled it and it's ready to go.
What did you end up doing for the write?
What did you end up doing for the write?
Wifi attachment commands
I have successfully patched /mr to take two variables to read a custom range in memory. If for some reason the start number is higher than the end number, it returns ERR.
Syntax: /mrX,Y
X = start
Y = end
Pull request pending.
Syntax: /mrX,Y
X = start
Y = end
Pull request pending.
Re: Wifi attachment commands
This code should be added to the html output so that the new /wifi page can fit the display on the phone. It scales great if you double click the page, but this would set it to be default.
Code: Select all
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" />
Re: Wifi attachment commands
It was already there... It didn't have the min, max and user define, but was there. I added the other ones. Check if it scales now.
On my android, it scales on height, not on width.
On my android, it scales on height, not on width.
Roberto.
Re: Wifi attachment commands
No change...
I am getting a lot of unable to refresh data and I know everything is working. My other software is loading data ok...
I am getting a lot of unable to refresh data and I know everything is working. My other software is loading data ok...
Re: Wifi attachment commands
Actually it may be worse now.... I cant scale it all now on safari. Not sure what it was like before. I was using chrome in previous tests. Also data loading fine in safari so maybe a chrome issue..
Re: Wifi attachment commands
Chrome is not scaling now either ...maybe it was cached..
Re: Wifi attachment commands
I think it is because of user-scalable=0 that you posted.
I reverted back.
I reverted back.
Roberto.
Re: Wifi attachment commands
I'll have to see if i can make a dev copy of your js file and see what i can do...
Re: Wifi attachment commands
This is what I got:
Viewport argument value "device-width;" for key "width" is invalid, and has been ignored. Note that ';' is not a separator in viewport values. The list should be comma-separated.
My original code had comma and when you posted yours, I changed to semi-colon.
So, I updated once again back with a comma. Can you see if it does it now?
Viewport argument value "device-width;" for key "width" is invalid, and has been ignored. Note that ';' is not a separator in viewport values. The list should be comma-separated.
My original code had comma and when you posted yours, I changed to semi-colon.
So, I updated once again back with a comma. Can you see if it does it now?
Roberto.
Re: Wifi attachment commands
Perfect in safari. Still have issues with Chrome. It doesnt get any data and doesn't default to the right width. Safari is perfect.
Re: Wifi attachment commands
These are reversed in practice... When I set the po14,0 it changed the RFG and when I set po15,0 it changed RFB.14-Radion - Blue Channel
15-Radion - Green Channel
A bit off topic but the reason for this discovery... something is changing my RFB and RFI to 100 and I can't figure it out. I have nothing in my code that references the Radion's at all, except that I'm using the Custom mode for the Vortech... I did have 100 in Mem_B_RadionRadionSlopeEndB and Mem_B_RadionRadionSlopeEndI but I corrected that. Then I overrode the channels to 0 and put back to default and it went right back to 100. It's happened a few times and not sure what's triggering it. Any thoughts?
Re: Wifi attachment commands
Thanks!!
What you are getting is the intended result. It was a mistake on that post. I corrected it.
It has to be something within your code.
It is not the override as you can see it in here: http://forum.reefangel.com/status/chart ... filter=rfb
Can you open a new thread?
What you are getting is the intended result. It was a mistake on that post. I corrected it.
It has to be something within your code.
It is not the override as you can see it in here: http://forum.reefangel.com/status/chart ... filter=rfb
Can you open a new thread?
Roberto.
Re: Wifi attachment commands
I'll start a new thread... just the typo was noticed when I tried to see if the override would help reset it.
Re: Wifi attachment commands
what is the usage of the /cal command? can it be used to trigger the calibration modes?
Re: Wifi attachment commands
awesome. thanksrimai wrote:Yes, I updated the OP
Re: Wifi attachment commands
There is no way to read/write a dword (i.e. InternalMemory.read_dword() / InternalMemory.write_dword() )
Need to ad a /md
Need to ad a /md
Re: Wifi attachment commands
Can you add a ticket on github?
Sent from my SPH-L710 using Tapatalk
Sent from my SPH-L710 using Tapatalk
Roberto.
Re: Wifi attachment commands
Yeah, I'll add this and need to add HighATOChannel to DCPump
Re: Wifi attachment commands
I have the same question, is there a schema for the data that /sr or /sa will return? The answer to genuflect is begged!!
Re: Wifi attachment commands
If you want to know what the schema looks like, then you need to view the code. It's located in the RA_Wifi/RA_Wifi.cpp file. Here's a link to the github location of the file:Hamid2 wrote:I have the same question, is there a schema for the data that /sr or /sa will return? The answer to genuflect is begged!!
https://github.com/reefangel/Libraries/ ... A_Wifi.cpp
Around line 300, there will be a line that says "case REQ_R_STATUS:"
That section shows the the XML code that is generated by those 2 commands.