Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #37617

Re: Light on Light off problem

Newsgroups comp.lang.javascript
Date 2019-10-23 03:01 -0700
References (1 earlier) <qop31t$hvf$1@gioia.aioe.org> <6520f776-416e-42c7-8033-b81922479ef4@googlegroups.com> <qop6ka$1301$1@gioia.aioe.org> <ee21f3b5-4352-4610-b9f7-ac1d5eb91c0a@googlegroups.com> <58b73a9b-5163-4fc8-915f-c70149a0c1e5@googlegroups.com>
Message-ID <bcdfdd0c-69d0-41bf-b3cb-211441dda3bb@googlegroups.com> (permalink)
Subject Re: Light on Light off problem
From Jonas Thörnvall <jonas.thornvall@gmail.com>

Show all headers | View raw


Den onsdag 23 oktober 2019 kl. 11:44:18 UTC+2 skrev Jonas Thörnvall:
> Den onsdag 23 oktober 2019 kl. 11:39:32 UTC+2 skrev Jonas Thörnvall:
> > Den onsdag 23 oktober 2019 kl. 11:30:57 UTC+2 skrev R.Wieser:
> > > Jonas,
> > > 
> > > > Now you have to find a way to check which switches
> > > > that have been pressed and if their ***last state*** is
> > > > an on or an off.
> > > 
> > > And I have asked you /why/ you would need to check that state, the last one 
> > > or otherwise.
> > > 
> > > I even gave you a reason why you /wouldn't/ need too ...
> > > 
> > > > I think you suggest doing it one by one, in this case would
> > > > be idiotic. You would need to read thru array 128 times....
> > > 
> > > If I would have suggested that that would be stupid, yes.   But tell me: You 
> > > wanted to store the lamps that have the "ON" state into a new array. 
> > > Would you need to go thru the origional array 128 times for that too ?   If 
> > > not, why should you for what I'm suggesting (hint: just exchange the "store 
> > > in a result array": with "send the OFF command").
> > > 
> > > But, as you have refused to answer the questions I asked and I have zero 
> > > wish to fight you to get them I'm going to terminate our conversation. 
> > > Goodbye.
> > > 
> > > Regards,
> > > Rudy Wieser
> > You still do not get it Rudy, the events is stored in a list.
> > I understand that you want to have a separate "on/off storage for each switch" at start, that is not the case Rudy there is no time for extra setting other then the list with switchNr,state and time.
> > 
> > Well the process of lamps on and of is realtime critical ;)
> > So during day there is no time to store "extra" which is on and off.
> > The hardware just create the list automatically.
> > 
> > It is your job to find out "batch" which ones still on.
> 
> It seem people missunderstod the problem, it is not a case of holding true or false for 128 switches.
> 
> It is finding out which ones still on "from a list where they been set on and off during day"....

Anyway here is the problem solved "batch" after recording, Rudy suggested a state storage for each note during recording. I do not think that is the way to go.

https://midisequenser.000webhostapp.com/

So if user play early i now move note to "starttime rec" and if they press/hold and release to late "after rec end". I create the note offs and push them to the recorded note array.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 00:19 -0700
  Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 00:58 -0700
    Re: Light on Light off problem luserdroog <luser.droog@gmail.com> - 2019-10-23 01:04 -0700
      Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 01:25 -0700
      Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 01:29 -0700
    Re: Light on Light off problem JJ <jj4public@vfemail.net> - 2019-10-23 15:46 +0700
      Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 01:57 -0700
  Re: Light on Light off problem "R.Wieser" <address@not.available> - 2019-10-23 10:29 +0200
    Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 02:04 -0700
      Re: Light on Light off problem "R.Wieser" <address@not.available> - 2019-10-23 11:30 +0200
        Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 02:39 -0700
          Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 02:44 -0700
            Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 03:01 -0700
    Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 02:16 -0700
    Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 02:31 -0700
    Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 03:30 -0700
      Re: Light on Light off problem Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-23 08:25 -0700
  Re: Light on Light off problem "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-23 12:08 -0700

csiph-web