Coder Social home page Coder Social logo

Comments (8)

ranjib avatar ranjib commented on June 15, 2024 1

I like the idea. Let me think through about the implementation

from reef-pi.

ranjib avatar ranjib commented on June 15, 2024 1

I am thinking to implement this in reef-pi, but in more generic format. My current thoughts are

  • Introduce a notion of profile in individual channels
  • A profile has type and profile specific configuration
  • Implement fixed, auto and diurnal all as separate profiles
    Does this sound ok ?

from reef-pi.

Massild avatar Massild commented on June 15, 2024 1

If I understand you correctly this sounds good.
I think you mean that this would be similar to the screenshot I made up but with a combobox to select a specific profile instead of a checkbox type?
The profile also would have a configuration (say start end time, min max etc.). Do I understand you correctly?

I am very impressed with reef-pi overall so I am sure that what you plan on implementing is going to be great.

Thank you for being so open to suggestion.

from reef-pi.

ranjib avatar ranjib commented on June 15, 2024 1

Yeah, instead of a checkbox, it will be a drop-down or radio button, since a user can only select one from the available options. I want profile to persist across all DC PWM controllable equipment, including light, wavemaker etc. and the profiles should be interoperable if the user wants. I am thinking of how to simulate thunderstorm etc using the same generic profile. We don't need all of that now, but the abstraction should support future enhancement without significant structural changes (i.e. we should be able to add new profiles under 2.x series)

from reef-pi.

Massild avatar Massild commented on June 15, 2024

To put this in a more programmatic way...

Prelevel=(1-COS((CurrentMinute-StartMinutes)2PI()/(EndMinutes-StartMinutes))^3)

IF CurrentMinute EndMinutes THEN
PctLights = 0
ELSE IF PreLevel > 1 THEN
PctLights = 1
ELSE PctLights = PreLevel
END
PctLights = PctLights * (MaxValue-MinValue)+MinValue

from reef-pi.

Massild avatar Massild commented on June 15, 2024

Good plan. I appreciate reuse :-)

from reef-pi.

ranjib avatar ranjib commented on June 15, 2024

As mentioned earlier in this thread, I have introduced a notion of profiles for individual channels. Fixed intensity, auto (12 values each spaced at 2 hours) and diurnal are all implemented as separate profile.
Here are the screen shots (work ub orogress)

Light
screen shot 2018-07-18 at 8 33 42 am

Details of individual channels under a single light
screen shot 2018-07-18 at 8 33 53 am

Profile choices under individual channels
screen shot 2018-07-18 at 8 34 21 am

Pull request: #455

Diurnal logic implementation: https://github.com/reef-pi/reef-pi/pull/455/files#diff-a9027c13e87105204283f26b41d0af03R30
Example diurnal chart:
screen shot 2018-07-18 at 8 39 03 am

from reef-pi.

Massild avatar Massild commented on June 15, 2024

I like the implementation. It is a little different than I had thought from our discussion, but reading back through, I see this is what you meant. This abstraction will be a huge benefit for future development as well. Very nice work and I appreciate the graph. I am very happy with this implementation.

What I thought you meant would likely be more complicated and would not add a lot of value at this stage.

Just for information, this is what I thought you meant.

A generic profile would be created in a separate dialog or screen where the parameters would be set. This could be a function, points on a graph etc. Then you would save the generic profile with a name. Then when you were in the lighting screen, or wave maker screen, you would have the option to choose a profile to apply to the object (lights, wave maker etc)
When you click update, the object would then follow that profile. This would be similar to how a pitch or throttle curve is setup in a radio controller (open-tx as an example)
This is a 12 point curve (same as auto). You can manually move the points or type in values.
12 point
This is an example where there are only 2 points. This is for a flat or linear option.
fixed

As you can see, you just create a bunch of generic curves and then select them in the lighting interface as to which curve fits your needs. I like your solution better as it is less complicated.

from reef-pi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.