News:

LATEST RELEASE:  FPP 8.0 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/8.0

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 16535
Latest: docwisdom
New This Month: 23
New This Week: 8
New Today: 2
Stats
Total Posts: 133231
Total Topics: 16565
Most Online Today: 94
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 3
Guests: 31
Total: 34

Overlay Matrix: write more than one pixel at a time ?

Started by zaicik, August 06, 2024, 12:44:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zaicik

Looking to make "generative" scripts, I want to feed "live" data to FPP (e.g. sensor-based)

While the API will gladly give an overlay model's full contents (e.g. /api/overlays/model/:ModelName/data)  I haven't found how to feed it data other than one pixel at a time (/api/overlays/model/:ModelName/data)

While this API is practical to draw one pixel at a time from the matrix tool menu, I'm guessing there might be a more efficient route if I want to take more control... 

Any tips / suggestions ? 🙏

darylc

There is no API command to achieve that today.  We would welcome a pull request for an implementation of one.

You could draw inspiration from the CopyFileToMappedBlock function in https://github.com/FalconChristmas/fpp/blob/master/src/fppmm.cpp

dkulp

If the scripts are running on the same FPP instance as the models, the best bet is to mmap the data blocks from /dev/shm .   Each of the models gets a file in there of the data and you should be able to write into it directly.  
Daniel Kulp - https://kulplights.com

zaicik

Thanks for the pointers.
I'm gonna start by fiddling with /dev/shm as per @dkulp 's recommendation, and see where it takes me.

The data blocks being accessible this way looks like an amazing opportunity by the way: on a powerful enough Pi or BB, one could probably run Processing scripts and output each frame to a matrix. The syntax is extremely simple and could be a huge level up with minimal coding abilities.

Regarding:
Quote from: darylc on August 07, 2024, 06:02:53 AMThere is no API command to achieve that today.  We would welcome a pull request for an implementation of one.

You could draw inspiration from the CopyFileToMappedBlock function in https://github.com/FalconChristmas/fpp/blob/master/src/fppmm.cpp

Contributing to the API is likely above my current coding abilities but let's see how much I learn along the way and I'll try my best.


Support FPP

+- Recent Topics

PWM for GPIO control by MikeKrebs
Today at 09:45:47 PM

Pi Zero 2 W Help by docwisdom
Today at 07:43:27 PM

Pause (and manually resume) after each playlist item by Poporacer
Today at 09:41:40 AM

K2-Pi0 Unable to Start FPPD by JonD
Today at 03:14:49 AM

New K16s by tetleytealeaf
September 18, 2024, 10:04:29 PM

Can Falcon Player support WPA3? by JonD
September 18, 2024, 05:05:28 AM

Falcon PiCap v2 failed upon upgrade to FPP v8 by darylc
September 17, 2024, 10:00:13 PM

MIDI input from Apple Mainstage by jjung
September 17, 2024, 10:19:20 AM

So in Xlights what RGB in string settings do I use to get the colors correct by tbone321
September 17, 2024, 09:58:14 AM

FPP V8 Plugins Needing Testing by deanathpc
September 17, 2024, 08:54:45 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod