Internal webserver UI
Re: Internal webserver UI
I did see the labels not being kept though.
I'll work on this shortly.
I'll work on this shortly.
Roberto.
Re: Internal webserver UI
It happens to me when going from custom, with it's own hard-coded speed and duration, to any other mode. It shows the custom speed and duration until a refresh.
Also, there seems to not be an icon for gyre?
--Colin
Also, there seems to not be an icon for gyre?
--Colin
Re: Internal webserver UI
I implemented a delay when refreshing from that command in my app for the same reason. too fast of request will error out.lnevo wrote:The problem is when you issue a wifi command to change something you get back OK and you don't get the same results like when setting a relay which returns the entire XML. Then you'd have to do a second query.cosmith71 wrote:Changing DC pump modes shows the icon for the previous mode until refreshed.
Edit: Just tried it on a different computer and it works as expected?
Edit part 2: Speed and duration don't automatically refresh. If I go from a specified mode with default speeds to custom mode with hard-coded speeds, the new speed/duration doesn't change until I refresh.
I hope this kind of stuff is what you were looking for, otherwise I'm just being a jerk.
We could do 2 things to streamline that. Instead of sending just OK or ERR. We could put a status flag in the /sa /r99 output. It might break some of the current apps, but we'd just be adding the same tag it's looking for inside the rest of the output.
The other would be making the second call to the web ui to refresh. But I have issues sometimes if I query to quickly so a slight delay wouldn't be horrible. This btw, is all the same behavior of the current UApp also.
Sent from my XT1585 using Tapatalk
Re: Internal webserver UI
Can you post the relevant code for me to replicate the problem?cosmith71 wrote:It happens to me when going from custom, with it's own hard-coded speed and duration, to any other mode. It shows the custom speed and duration until a refresh.
Also, there seems to not be an icon for gyre?
--Colin
Roberto.
Re: Internal webserver UI
Here you go.
Code: Select all
void PumpControl()
{
// ******************* Pump Control *******************
if (InternalMemory.DCPumpMode_read()==11) // If custom mode on Portal
{
ReefAngel.DCPump.UseMemory = false; // Turn off memory control
ReefAngel.DCPump.SetMode(Else,60,30); // If nothing changes it in the next few lines, this is what runs.
ReefAngel.DCPump.Threshold=20;
if (hour()>=22 || hour()<9) ReefAngel.DCPump.SetMode(Gyre,80,30,50); // Gyre max, duration, minimum
if (hour()>=9 && hour()<10) ReefAngel.DCPump.SetMode(Gyre,90,30,60); // Gyre max, duration, minimum
if (hour()>=10 && hour()<11)
{
ReefAngel.DCPump.Threshold=20;
ReefAngel.DCPump.SetMode(Else,40,20); // Else mode from 1000 to 1100. Wake up!
}
}
else ReefAngel.DCPump.UseMemory = true; // If it's not custom mode on the portal, then do what mode the portal says.
}
Re: Internal webserver UI
But if you are using usememory=false, you shouldn't be able to change speed and duration, right?
Roberto.
Re: Internal webserver UI
Yeah you're logic is a bit off..once in custom how do you get out?
Re: Internal webserver UI
Correct. Custom uses the hard coded values. Right now, they are gyre 80/30. The memory values for a non-custom mode are, say, 60/20. If I switch from custom with coded values of 80/30 to, say short pulse, the speed and duration still show the coded values of 80/30 instead of the memory values of 60/20 until I do a refresh. Same if I go back to custom from a memory mode. The mode display updates immediately, but the speed and duration values don't update on the screen until a refresh.
Lee, you can choose any mode you like from the DC Pump page. The code can tell when custom is selected.
--Colin
Lee, you can choose any mode you like from the DC Pump page. The code can tell when custom is selected.
--Colin
Re: Internal webserver UI
Right nevermind. I misread the if statement. If memory is set to non custom the RF.UseMemory is true.
-
- Posts: 121
- Joined: Fri Jul 03, 2015 8:29 am
Re: Internal webserver UI
how do I update to the newest libraries?
Re: Internal webserver UI
To use the latest dev branch, you need to download the latest dev branch files from github and overwrite the current release that you have in Documents\Arduino\libraries
https://github.com/reefangel/Libraries/archive/dev.zip
https://github.com/reefangel/Libraries/archive/dev.zip
Roberto.
-
- Posts: 121
- Joined: Fri Jul 03, 2015 8:29 am
Re: Internal webserver UI
great, thanks! is there anything that doesn't work?