Author Topic: Feature request: simple channel remap  (Read 616 times)

Offline dkulp

  • Sr. Member
  • ****
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 425
  • Kudos: 13
Feature request: simple channel remap
« on: February 22, 2014, 01:37:22 PM »

Imagine you look out your window and discover one channel of your show isn't lighting up.  You bundle up and head out into the bitter cold with a flash light to figure out why.   You check the cables, the lights, etc... and finally figure out the TRIAC has died or similar.   At this point, you have two choices:

1) Keep freezing your butt off as you make sure everything is labeled as you unplug everything, take the controller inside, fire up the soldering iron, replace the triac, head back out and freeze some more as you plug everything back in.

2) Plug into an unused/empty channel and head back inside, load up all the sequences, remap the channels, re-export to fseq, and re-upload the files.

Anyone care to admit they've been in that scenario before?   I admit it.  (in my case, a rabbit bit the cord and while fixing it, I'm an idiot and didn't shut everything off and shorted out the live line blowing the triac)

Imagine instead you could plug into an unused channel, login to FPP and say "output what was on channel 18 to channel 23".  Done.  Quick.  Easy.  Warm. 

I really don't think we'd want (or need) super complicated remapping options that would affect performance.  I'd suggest a simple 1->1 mapping with a requirement of both channels have to already be in the fseq file (and thus in the byte[] in memory).  I'm kind of thinking that once the channel data for that time slice is loaded, but before output, a simple loop through the mapping and copy from source channel to dest channel would work.  For most cases, the mapping would be empty (so no performance impact).   Even after this mapping, there would likely only be a few channels mapped, so again, little impact.

Thoughts?   Good idea?
Dan Kulp

Offline David Pitts

  • Administrator
  • *****
  • Join Date: Mar 2013
  • Location: Falcon, CO
  • Posts: 3,709
  • Kudos: 61
Re: Feature request: simple channel remap
« Reply #1 on: February 22, 2014, 02:00:59 PM »
You are on to something there. Seems like a good idea and implementation. Easy to implement as you have explained.
PixelController, LLC
PixelController.com

Offline drlucas

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Barrie, Ontario - Canada
  • Posts: 1,417
  • Kudos: 3
Re: Feature request: simple channel remap
« Reply #2 on: February 22, 2014, 04:31:20 PM »
+1.

Did you have rabbit stew that night or did it escape unharmed ?

I'm hopeful this year never to trip a breaker or fuse due to water getting in my extension cords as my LEs will all be home runs to the light with heat shrink at the end vs a plug/outlet.

And I have a beagle to keep the rabbits at bay. She just sits in the window and watches blinky in the evening and guards the lawn by night.

Ok so not all of this post is truthful but the mapping idea is cool.

Ryan

Offline dkulp

  • Sr. Member
  • ****
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 425
  • Kudos: 13
Re: Feature request: simple channel remap
« Reply #3 on: February 22, 2014, 05:00:06 PM »

Did you have rabbit stew that night or did it escape unharmed ?


I wish I had rabbit stew...   This Rabbit is a close relative of the Rabbit of Caerbannog.  He's pure evil.   He's my "Caddyshack" style nemesis.

This year wasn't too bad.  Only bit through one wire.   We got early snow/ice that covered all the wires which thwarted his evil ways. 

Last year was AWEFUL.   About every 2-3 days he'd bite a wire.  Always sometime between 11pm (when lights shut off) and 7am (when I got up and checked).   We actually thought it was some high school kid being a punk on his way to the bus up the street.  Bought a wireless web cam and left it on all night recording and found the rabbit biting through at 2:15 in the morning.      I tried all kinds of rabbit repellants, spicy sprays, etc...  Nothing worked.

Evil evil evil little creature.



Online CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 7,939
  • Kudos: 142
Re: Feature request: simple channel remap
« Reply #4 on: February 23, 2014, 10:41:03 PM »
I'm in the middle of a large refactor of both the channel output code (E1.131, FPD, and new USB support) and the media output code (ogg currently, but I have started re-adding MP3 support and would like to get synced video working as well before committing).

I just added a couple new functions to the channel output code to perform optional channel remaps as proposed.

I think the UI code to drive this will be a lot more complicated than the code to do the remap,  :|  but I haven't started on any UI yet.

The basic config options are 3 numbers per 'map':

1) source channel number
2) destination channel number
3) count of the number of channels to remap

This will allow remapping single channels by setting the count to 1, or blocks of channels by setting the count to some number higher than one.
-
Chris

Offline David Pitts

  • Administrator
  • *****
  • Join Date: Mar 2013
  • Location: Falcon, CO
  • Posts: 3,709
  • Kudos: 61
Re: Feature request: simple channel remap
« Reply #5 on: February 23, 2014, 11:42:48 PM »
I could help with the UI for channel remap. I am now using all jquery for ui. All I would need is the file format you are looking for. This does not seem to be a plugin so this most likely will always be available.

Online CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 7,939
  • Kudos: 142
Re: Feature request: simple channel remap
« Reply #6 on: February 24, 2014, 08:57:45 AM »
Sure, that would help.  I am thinking just a simple comma separated file with one line per 'map'.

source,dest,count

In the UI you could show that as start, (optional) end, and destination or as source, dest, and count as it is actually stored in the file.

Pick any file name, maybe something like channelremap or remappedchannels.

Once I get a chance to sit by the Pi or dev computer to test the sync code I'll commit something to my branch,
Most of my coding on these changes has been remote from the couch or a remote computer in the house.  If you want to code up something for the UI you could put it in my branch until these changes are ready to merge/release.



 

Back to top