Proper bounds checking on DCPump modes

Requests for new functions or software apps
Post Reply
MisterTang
Posts: 58
Joined: Sat Jan 04, 2014 3:12 pm

Proper bounds checking on DCPump modes

Post by MisterTang »

Hey, so in fiddling with the DCPump class, I noticed that it will gladly go over 100% - and that my pump basically shuts down if it reaches over 100%. My minor suggestion would be to add a simple if statement that verifies the value in ReefCrest or Lagoon or the other modes.

Since they're just adjusting dimming values, maybe it would be better served to do the bounds-checking in the dimming itself, rather than the DCPump code...
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Proper bounds checking on DCPump modes

Post by lnevo »

Its a one line statement and it should be in the libraries. This way you can set dcpump from 0-100 and it will map to 30-100 or whatever you range you define as hard coded. If you could set a per channel boundary then you wouldnt need to define any offset
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Proper bounds checking on DCPump modes

Post by lnevo »

Its a one line statement and it should be in the libraries. This way you can set dcpump from 0-100 and it will map to 30-100 or whatever you range you define as hard coded. If you could set a per channel boundary then you wouldnt need to define any offset
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Proper bounds checking on DCPump modes

Post by lnevo »

Well the incorporation into the dcpump class is more than one line...changing the value from 0-100 to 30-100 is the easy part
MisterTang
Posts: 58
Joined: Sat Jan 04, 2014 3:12 pm

Re: Proper bounds checking on DCPump modes

Post by MisterTang »

lnevo wrote:Well the incorporation into the dcpump class is more than one line...changing the value from 0-100 to 30-100 is the easy part
Well, again, I think it might be more appropriate in the dimming code - after all, isn't the DCPump just wrapping that with some additional logic?

I like your boundary idea, because as some have pointed out, their devices don't work at all below 0+X%, so it makes sense for that to be the lower boundary.

As for me, if the RA attempts to set a Jebao at greater than 100%, it will not work until the value falls at or below 100% again. This caused a fairly major skimmer overflow for me when I set ReefCrest to 85. I was initially mistaken that the second int when calling SetMode was the range +/- the first int, and several hours later, discovered that every time the level went >100, my skimmer would dump its smelly payload into my sump when the pump stopped working and the water level went too high.
Image
Post Reply