Update with DMX-512 output. Matching project here: https://github.com/cnlohr/esp8266_dmx_explorer

This commit is contained in:
CNLohr 2020-09-20 20:30:55 -04:00
parent bb2cb0dd9e
commit 11fe3a9b38
3 changed files with 58 additions and 1 deletions

View file

@ -31,6 +31,7 @@ struct DPODriver
int leds;
int skipfirst;
int fliprg;
int flipgb;
int firstval;
int port;
int is_rgby;
@ -148,6 +149,15 @@ static void DPOUpdate(void * id, struct NoteFinder*nf)
lbuff[i++] = OutLEDs[j*3+2]; //BLUE
}
}
else if( d->flipgb )
{
for( j = 0; j < d->leds; j++ )
{
lbuff[i++] = OutLEDs[j*3+0]; //RED
lbuff[i++] = OutLEDs[j*3+1]; //GREEN
lbuff[i++] = OutLEDs[j*3+2]; //BLUE
}
}
else
{
for( j = 0; j < d->leds; j++ )
@ -210,6 +220,7 @@ static void DPOParams(void * id )
d->firstval = 0; RegisterValue( "firstval", PAINT, &d->firstval, sizeof( d->firstval ) );
RegisterValue( "address", PABUFFER, d->address, sizeof( d->address ) );
d->fliprg = 0; RegisterValue( "fliprg", PAINT, &d->fliprg, sizeof( d->fliprg ) );
d->flipgb = 0; RegisterValue( "flipgb", PAINT, &d->flipgb, sizeof( d->flipgb ) );
d->is_rgby = 0; RegisterValue( "rgby", PAINT, &d->is_rgby, sizeof( d->is_rgby ) );
d->skittlequantity=0;RegisterValue( "skittlequantity", PAINT, &d->skittlequantity, sizeof( d->skittlequantity ) );
d->socket = -1;

View file

@ -31,6 +31,7 @@ static void DPOUpdate(void * id, struct NoteFinder*nf)
int i;
float cw = ((float)(screenx)) / 2.0;
float ch = ((float)(screeny)) / 2.0;
RDPoint pts[6];
float sizeA = sqrtf( screenx * screenx + screeny * screeny ) * d->pie_min;
float sizeB = sqrtf( screenx * screenx + screeny * screeny ) * d->pie_max;
@ -53,7 +54,8 @@ static void DPOUpdate(void * id, struct NoteFinder*nf)
pts[5].y = ch + sin(angB) * sizeA;
CNFGColor( OutLEDs[i*3+0] | (OutLEDs[i*3+1] <<8)|(OutLEDs[i*3+2] <<16) );
CNFGTackPoly( pts, 6 );
CNFGTackPoly( pts, 3 );
CNFGTackPoly( pts+3, 3 );
}

View file

@ -0,0 +1,44 @@
outdrivers = DisplayPie,DisplayNetwork, OutputLinear
#OutputCells
#OutputLinear
#cells
qtyamp=50
timebased=1
snakey = 0
steady_bright = 0
leds = 168
light_siding = 1.0 #Turn this to ~1.9 for more uniformity, ~1.0 for less.
satamp = 1.600
is_loop=0
led_floor = .1 #Turn to .25 for more uniformity, .1 for less.
#note_attach_amp_iir = .3 #.3000
#note_attach_amp_iir2 = .15 #.1500
#note_attach_freq_iir = .3 #0.3000
steady_bright = 0
#dft_iir = 0.0
#dft_q = 20.0000
#dft_speedup = 1000.0000
sourcename = alsa_output.pci-0000_0a_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_0a_00.1.hdmi-stereo.monitor
#alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
# alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
skipfirst = 3
firstval = 0
flipgb = 1
port = 7777
#address = 192.168.4.1
address = esp8266dmx.local
slope=.10
amplify=.3
lightx = 20
lighty = 20