Giter Club home page Giter Club logo

Comments (2)

SMFSW avatar SMFSW commented on August 16, 2024

Hello,

you probably want to save space, but typically, you would need a second queue for this, one xIFO to accumulate data for a day (or a simple buffer you're averaging on as you acquire new data) and the daily FIFO.

In a queue, once you put an item in it, there's no real reason to change the stored data.
I already had a use case where I needed to reformat the data from a queue; I used 2 queues for this, one to get the "raw" data, and the other one to store the reformated data.

Your q_delPrev() function would act somewhat like a LIFO on a FIFO.

I understand your use case, and constraints you may have, but I'm not sure this functionality really belongs to the queue itself.

Let me know what you think,
And sorry for the delay in answering,
Regards,
SMFSW

from cqueue.

matthias-bs avatar matthias-bs commented on August 16, 2024

Hello,

you are right, a queue should rather not be overloaded with strange things. ;-)

I will store the current daily amount (which I already get from the sensor) in a separate variable until I finally push it into the FIFO.

Thanks again!

Regards,
Matthias

from cqueue.

Related Issues (4)

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.