Giter Site home page Giter Site logo

ledspicer's People

Contributors

mahuti avatar markalston avatar meduzapat avatar myoung34 avatar stoneddiscord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ledspicer's Issues

examples for attract emitter

Long time no see

Im updating and trying to move from pulseaudio to the attract emitter

I get this error from ledspicer (latest running on arch linux):

[barcaderator@barcaderator barcaderator config backup]$ emitter LoadProfileByEmulator digdug arcade
sed: can't read /usr/local/share/ledspicer/controls.ini: No such file or directory
sed: can't read /usr/local/share/ledspicer/colors.ini: No such file or directory

I dont see anywhere on how these files should look (colors.ini and controls.ini)

my profile xml:

$ sudo cat /usr/local/share/ledspicer/profiles/profile_arcade.xml 
<?xml version="1.0" encoding="UTF-8"?>
<!-- profile skeleton -->
<LEDSpicer
	version="1.0"
	type="Profile"
	backgroundColor=""
>
	<!-- Sample start transition -->
	<startTransition
		type="Pulse"
		color="Red"
		speed="Fast"
		filter="Combine"
		direction="ForwardBouncing"
	/>
	<!-- Sample end transition -->
	<endTransition
		type="Pulse"
		color="Red"
		speed="Fast"
		filter="Combine"
		direction="ForwardBouncing"
	/>
</LEDSpicer>
$ sudo cat /usr/local/etc/ledspicer.conf
<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
    logLevel="Error"
    port="16161"
    version="1.0"
    type="Configuration"
    fps="30"
    userId="1000"
    groupId="1000"
    colors="basicColors" 
    craftProfile="true"
    colorsFile="true"
    dataSource="controls.ini,file"
>
    <devices>
        <device
            name="UltimarcPacLed64"
            boardId="1"
        >
...snipped...

Allow sending parameters from emitter to ledspicer

Add a new field in the message, so emitter can send parameters to ledspicerd about the new profile
use bitwise.

should affect this areas:

  • use of animations
  • use of inputs
  • use of start transitions
  • use of end transitions
  • use of cache (or force reload)

Credit start input plugin

At this moment, the Action plugin handles that interaction between credits and start elements, but is not supporting all layouts, because not all games have the same number of coin slots and start buttons.
Create an input plugin that allows the user to set a coin slot that can iterate between 1 or many start buttons, based on the number of clicks.
Also, allow restarting the sequence of just stop on the first time.

I hated to do this but couldn't figure out a way to contact someone that really knew what they were doing getting this going on Retropie 4.8

Hello,

Could you direct me to someone that could help me get this going on a retropie arcade install.

I gave up on another software called RGB Commander because I never could get it going properly in terms of getting the arcade roms to update to the proper color/ number when playing an arcade rom, I also couldn't get it to work with regards to proper color/ number when choosing an individual console game (not rom specific, but controller specific).

I am running my games from a network share which I have setup with the pi using: sudo mount -t cifs -o username=WESTON,password=xxxx,nounix,noserverino //WESTONSPC/roms /home/pi/RetroPie/roms(not sure if that caused my issues with RGB Commander, but I don't think it did since it seems these led style programs are rom name/ emulator name (string) based with no basis on the files locations)

So now I am attempting to get LEDSpicer running (I believe it needs to run in conjunction with LEDSpicer Emitter Plugin but I don't really know that for sure either.)

I immediately start out confused on LEDSpicer with the wiki at https://sourceforge.net/p/ledspicer/wiki/Deployment/#building-ledspicer.
I'm seeing an easy way to install of a PPA? I don't really know what that is but it worries me that it hasn't been updated since 2020 and there are recent commits showing here. That makes me believe I shouldn't go that route.
Could I have even used that being that I am wanting to use this with Retropie/ Emulations Station?

I apologize for all of the questions. I am going to attempt to get LEDSpicer going tonight using the information provided at the wiki and installing from source. I was really just hoping you could direct me to somewhere for a little support as I have a feeling I may end up needing it. (I have posted at the arcade controls forum and retropie forum but no one has really replied)

Thank you Patricio!

Install Issues

Hello, I followed the instructions located here: https://sourceforge.net/p/ledspicer/wiki/Deployment/#installing
to install LEDSpicer for my Ultimarc PAC Drive, but got stuck at the sudo systemctl enable ledspicerd.service part.

It said that the ledspicerd.service file was not found, so I used the one from the examples folder (I also copied the example ledspicer.conf file). Now when I try starting the program, I get Program terminated by error: Unable to read the file /usr/local/share/ledspicer/.xml Error=XML_ERROR_FILE_NOT_FOUND

Any ideas on what I did wrong, and what I need to do to correct it?
Thanks

Setting up for RaspberryPi

We are discussing your Ledspicer program over here :
https://retropie.org.uk/forum/topic/34590/syncing-button-leds-with-gameplay

I have helped in this topic to get "-output network" info from mame and the RetroArch lr-mame version (now at 0.258).
Discussing it more I wanted to have a go at Ledspicer but I am running into problems every time.

I would appreciate any help over there to get the basics working starting with a minimal config, xml profiles and just one led connected to the GPIO.

Would be great if you could help me out a bit !

Audio popping when switching restrictors

Hi, thanks for this AMAZING codebase! Just started using it this week.

I'm writing because I'm hearing audio popping on my Raspberry Pi 4b with speakers connected to the headphone jack whenever the restrictors on my Servostiks are switched.

It's always two pops in rapid succession. The best description is that it sounds like someone pulling the audio cable out of the computer when the speakers are powered up.

Before I figured out how to control restrictors with LEDSpicer, I was switching the servos using https://github.com/mahuti/setservostik setservostik does not cause the same audio artifacts.

I thought you might want to know or have an idea what might be causing it.

Commenting out the restrictors XML element makes the sound stop. Putting them back in brings back the sound artifact.

Thanks!

Ledspicer daemon + pacdrive messes up Attract Mode

Hi,

It seems ledspicer is giving a hard time to AM. When ledspicer is started as a daemon, it prevents AM from starting. If the deamon is manually launched after AM has started, AM reaches 100% CPU and is sluggish.

This doesn't happen when ledspicerd is started as user.

The PC needs a full power fycle off ->on to work again normally, resetting doesn't fix anything.

Tested in Arch Linux/GroovyArcade.

Add brightness to elements

Due to the disparity in brightness among LEDs from various manufacturers, users require a method to calibrate the brightness of individual elements to achieve a more uniform layout.

Servostik hardware don't check current state

The servostik firmware, always try to rotate the servo even when the requested position is already set.
Example: the position is 8 and the user request 8, it will move all the way and go back to 8.

Research and fix Adaligh protocol issues.

Description

During testing of the ADAlight protocol, three new issues were identified:

  1. If the number of LEDs assigned in the configuration is less than the total number of available LEDs, unassigned LEDs exhibit random glitches.
  2. Occasionally, when the device is released, it fails to reset to an "OFF" state, potentially related to issue #1.
  3. The reset() function is not always called when changing profiles. Additionally, when using the pulse audio plugin and stopping the music mid-play, the animation freezes.

Issue #1 is likely caused by the mishandling of headers in the ADAlight protocol.

Details on the ADAlight headers:
https://www.partsnotincluded.com/visualizing-adalight-header-information/

Multiple bugs detected

Autodetect is not working when more than one device is connected in different orders.
Rotator fails to run if the hardware doesn't support a game.
Config parameter is not passed to other applications

test

this is a test issue

UltraStik 360FS Flight Stick rotator analog?

Hi,

I have this stick modeled as a rotator in the ledspicer config.

Where can I look to see if the rotator is setting the stick to "analog" mode for a game like aburner?

And if it's not happening automatically from the MAME config files, where might I place a custom config to force it? What would the format be

Thanks!

Basic Serial outputs option?

Hi! I've stumbled onto your project and seems like it fits my needs, but I'm sort of having trouble navigating around this.

I've been working on an Arduino-based/compatible lightgun system with compatibility for Mame Hooker, which I use on Linux via Wine for sending game outputs as strings of commands sent to the Arduino's serial device. This is how both my system and the similar GUN4IR do serial-operated force feedback, and after working on the feature I wanted to try it on Linux natively with MAME or (preferably) RetroArch.

LEDSpicer seems like the alternative I'm looking for, but through perusing the project I haven't found any references to generic serial devices or sending outputs as a custom string of characters. Sure, there's outputs for specific named/branded devices, but... neither lightgun system are a named brand, it's just writing to the /dev/ttyACM# object. This also isn't a Pi, but a conventional Linux desktop (as I daily drive desktop Linux, EndeavourOS/Arch specifically).

Also, the gun system can use both solenoid as recoil and a controller-type rumble motor for a gun motor. While I see (vague) references to solenoid use, I don't see anything about motor use.

Can you walk me through how I should accomplish this to get Mame Hooker-like functionality for the lightgun? Not expecting the same configuration of course, just seeing if it's possible for this usecase. If not already available, would it be possible to implement? Thank you very much for your time.

IPAC Ultimate IO Mode Switching issue

Using Current Source Release 0.5.5
IPAC I/O latest firmware 50+

ledspicerd will not find my ultimateio if I am in dinput mode it only works in keyboard mode.

Noted here: https://www.ultimarc.com/control-interfaces/i-pacs/i-pac-ultimate-i-o/

Error: Program terminated by error: Failed to open device 0xd209:0x410 id 1

After some research it seems that when I change modes it is actually changing the ID from d209:0410 to d209:0412
I do not see a Product for the 0412 and the code that handles the change doesn't seem to address the Product ID

Bus 002 Device 011: ID d209:0410 Ultimarc I-PAC Ultimate I/O ---- keyboard
Bus 002 Device 010: ID d209:0412 Ultimarc I-PAC Ultimate I/O ---- dinput
Bus 002 Device 012: ID 045e:028e Microsoft Corp. Xbox360 Controller ---- xinput
Bus 002 Device 013: ID d209:0412 Ultimarc I-PAC Ultimate I/O ---- dinput(user set)
Bus 002 Device 014: ID 045e:028e Microsoft Corp. Xbox360 Controller ---- xinput(user set)

Bus 002 Device 015: ID d209:0412 Ultimarc I-PAC Ultimate I/O
idVendor 0xd209 Ultimarc
iManufacturer 3 Ultimarc
iProduct 2 I-PAC Ultimate I/O
iConfiguration 2 I-PAC Ultimate I/O
iInterface 2 I-PAC Ultimate I/O
iInterface 2 I-PAC Ultimate I/O
iInterface 2 I-PAC Ultimate I/O
iInterface 2 I-PAC Ultimate I/O
[root@BATOCERA /userdata/system/ledspicer]# lsusb -v |grep Ulti
Bus 002 Device 016: ID d209:0410 Ultimarc I-PAC Ultimate I/O
idVendor 0xd209 Ultimarc
iManufacturer 3 Ultimarc
iProduct 2 I-PAC Ultimate I/O
iConfiguration 2 I-PAC Ultimate I/O
iInterface 2 I-PAC Ultimate I/O
iInterface 2 I-PAC Ultimate I/O
iInterface 2 I-PAC Ultimate I/O

I do not know c++ very well, but a work around for my need to use dinput mode, was to change the #define tag to be 0x412 however for a more permanent solution an if statement could be implemented somewhere to check for the different unicodes of this particular board If I figure this out I will create a pull.

This could be because I am working on Batocera, and I just realized my UDEV file got deleted after reset. Added init.d to make sure it gets copied over.

Symbol lookup error in LedWiz32.so

Just getting started with LEDspicer and connecting up my control panel. Using a Led-Wiz32 on AMD 64 (Ubuntu 18.04). I've made a minimal configuration for a single button, and try to run ledspicerd with -l to test the LEDs. Here's what happens:

sudo ledspicerd -l -c /home/ggray/ledspicer.conf 
Set interval to 100ms
Reading /usr/share/ledspicer/basicColors.xml
Opening USB session
Processing Device: Led-Wiz 32 Id: 1
Device: Led-Wiz 32 Id: 1 with 32 LEDs divided into 1 elements
Pin 4 is not set for Device: Led-Wiz 32 Id: 1
Pin 5 is not set for Device: Led-Wiz 32 Id: 1
Pin 6 is not set for Device: Led-Wiz 32 Id: 1
Pin 7 is not set for Device: Led-Wiz 32 Id: 1
Pin 8 is not set for Device: Led-Wiz 32 Id: 1
Pin 9 is not set for Device: Led-Wiz 32 Id: 1
Pin 10 is not set for Device: Led-Wiz 32 Id: 1
Pin 11 is not set for Device: Led-Wiz 32 Id: 1
Pin 12 is not set for Device: Led-Wiz 32 Id: 1
Pin 13 is not set for Device: Led-Wiz 32 Id: 1
Pin 14 is not set for Device: Led-Wiz 32 Id: 1
Pin 15 is not set for Device: Led-Wiz 32 Id: 1
Pin 16 is not set for Device: Led-Wiz 32 Id: 1
Pin 17 is not set for Device: Led-Wiz 32 Id: 1
Pin 18 is not set for Device: Led-Wiz 32 Id: 1
Pin 19 is not set for Device: Led-Wiz 32 Id: 1
Pin 20 is not set for Device: Led-Wiz 32 Id: 1
Pin 21 is not set for Device: Led-Wiz 32 Id: 1
Pin 22 is not set for Device: Led-Wiz 32 Id: 1
Pin 23 is not set for Device: Led-Wiz 32 Id: 1
Pin 24 is not set for Device: Led-Wiz 32 Id: 1
Pin 25 is not set for Device: Led-Wiz 32 Id: 1
Pin 26 is not set for Device: Led-Wiz 32 Id: 1
Pin 27 is not set for Device: Led-Wiz 32 Id: 1
Pin 28 is not set for Device: Led-Wiz 32 Id: 1
Pin 29 is not set for Device: Led-Wiz 32 Id: 1
Pin 30 is not set for Device: Led-Wiz 32 Id: 1
Pin 31 is not set for Device: Led-Wiz 32 Id: 1
Pin 32 is not set for Device: Led-Wiz 32 Id: 1
Reading /usr/share/ledspicer/profiles/default.xml
Reading /usr/share/ledspicer/animations/example.xml
Connecting to 0xfafa:0xf0 Device: Led-Wiz 32 Id: 1
Claiming interface 0
ledspicerd: symbol lookup error: /usr/lib/ledspicer/devices/LedWiz32.so: undefined symbol: _ZN9LEDSpicer7Devices9DeviceUSB19afterClaimInterfaceEv

This happens both with the version I built from github and the .latest released .deb package.

Config file is:

<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
	version="1.0"
	type="Configuration"
	fps="10"
	port="16161"
	colors="basicColors"
	logLevel="Info"
	userId="1000"
	groupId="1000"
>
	<devices>
		<device
			name="LedWiz32"
			boardId="1"
		>
			<element
				name="P1_BUTTON1"
				red="1"
				green="2"
				blue="3"
		   	 />
		</device>
	</devices>

	<layout
		defaultProfile="default"
	>
		<group name="Player1">
            		<element name="P1_BUTTON1"/>
        	</group>    
	</layout>
</LEDSpicer>

Support for multiple Ultimarc I-PAC Ultimate boards?

I have two I-PAC Ultimate boards, one is flashed with the "ID #2" firmware provided by Ultimarc to run a dual board set up. When I look at the Vendor / Product ID for my boards, I see one of them is d209:0410 (which is expected), and the other board (which is flashed as "ID #2") shows up as d209:0411.

Is there any way this can be supported?

image image

output plugin RaspberryPi GPIO doesn't compile

When I try to compile the development branch with --enable-raspberrypi, this error is produced : error: invalid new-expression of abstract class type ‘LEDSpicer::Devices::RaspberryPi::RaspberryPi’

last version compiling fine, is 0.4.9

Random behavior with LED-WIZ on newer systems?

Hi again,

I'm running into a new issue: when testing my control panel using ledspicerd -l. I get perfect behavior on older systems (my workbench system which is from 2006 or so, and a netbook from 2007). Tell it to turn on an output, and it turns it on,

However. I have problems when running LEDSpicer newer hardware: an UDOO x86 single-board system (which only has USB3) a recent Intel mini-ITX motherboard (which, according to Linux, has a single USB3 controller), and a 2017 HP laptrop. On all of these platforms, using -l to test individual outputs on the LED-WIZ will do random things when I type in a number to turn on an output. Most of the time, nothing happens. Sometimes, random LEDs would come on (even multiple LEDs at the same time). Other times, random LEDs that were on would turn off when I input a number.

Could these newer system (which all have newer, faster USB controllers) overwhelm the LED-WIZ? I noticed that RGBCommander has a setting that lets you throttle communications with the LED controller. I'm able to have RGBCommander turn on and off LEDs without any issues on these systems.

Serpentine animation fails when the number of LEDs is prime

Reading /userdata/system/configs/ledspicer/animations/serpentine.xml
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 17) >= this->size() (which is 17)
LEDSpicer terminated by signal
Aborted

Installing on Recalbox

Hello,
First of all, thank you for creating this package.

background: I have a pi 4b setup with an Ultimarc Ultimate Ipac board. I’ve been trying the get a package that I can install with Recalbox. I’m unable to do a compile and install on my Recalbox build as it’s a buildroot os. I was hoping to compile on a separate build and then copy over the necessary files and executeables. I was able to achieve this following the link here for Katie Snows umtool:

https://gitlab.com/recalbox/recalbox/-/issues/2265

However this only allows me to do very limited commands with the leds.

My question is, if I compile and install as outlined in your docs, what resulting files would I need to migrate to Recalbox in order for ledspicer to run?

apologies if this is trivial but I’m still learning Linux as a result of building my arcade cabinet.

thanks!

Add a replace parameter to emitter so it automatically finish the previous profile

Story

When the users are selecting games (not launching) they want to display the game profile, so the game controls are known before launching the game, or the game animation is displayed.

Acceptance criteria

Add to emitter the -r or --replace to inform ledspicer that it needs to replace the current profile, if the current profile is the default profile, nothing will happen.

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.