1
0
mirror of https://github.com/mt-mods/led_marquee.git synced 2025-06-28 14:26:18 +02:00

3 Commits

Author SHA1 Message Date
161623e869 fix minor mesh/triangulation glitch 2018-08-15 19:51:53 -04:00
d182766236 reduce color palette to 28 entries to make room for future control codes
(loses a dupe brown entry, and light blue and pink, which don't really work
well on a LED display)
2018-08-15 19:32:56 -04:00
09e5607d7a fix typo in docs 2018-08-15 19:17:39 -04:00
6 changed files with 58 additions and 44 deletions

View File

@ -40,13 +40,13 @@ The panels also respond to these control messages:
* "off_multi" turns all panels in a lineup off
* "allon_multi" turns on all LEDs of all panels in a lineup.
A byte value of 0 to 30 will change colors (i.e. string.char(0 to 30) ). Color values 0 to 11 are:
A byte value of 0 to 27 will change colors (i.e. string.char(0 to 27) ). Color values 0 to 11 are:
Red (0), orange, yellow, lime, green, aqua, cyan, sky blue, blue, violet, magenta, or red-violet (11)
Colors 12 to 23 are the same as 0 to 11, but lower brightness.
Colors 23 - 30 are white, light grey, medium grey, dim grey, light blue, brown, and pink.
Colors 24 - 27 are white, light grey, medium grey, and dim grey.
The left-most/"master" panel will remember the last color used, and defaults to red.

View File

@ -61,7 +61,7 @@ local display_string = function(pos, channel, string)
local last_color = master_meta:get_int("last_color")
local pos2 = pos
if not last_color or last_color < 0 or last_color > 30 then
if not last_color or last_color < 0 or last_color > 27 then
last_color = 0
master_meta:set_int("last_color", 0)
end
@ -76,7 +76,7 @@ local display_string = function(pos, channel, string)
minetest.swap_node(pos2, { name = "led_marquee:char_"..asc, param2 = master_fdir + (last_color*8)})
pos2.x = pos2.x + fdir_to_right[fdir+1][1]
pos2.z = pos2.z + fdir_to_right[fdir+1][2]
elseif asc < 31 then
elseif asc < 28 then
last_color = asc
master_meta:set_int("last_color", asc)
end
@ -87,7 +87,7 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
local meta = minetest.get_meta(pos)
local setchan = meta:get_string("channel")
local last_color = meta:get_int("last_color")
if not last_color or last_color < 0 or last_color > 30 then
if not last_color or last_color < 0 or last_color > 27 then
last_color = 0
meta:set_int("last_color", 0)
end
@ -115,7 +115,7 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
local asc = string.byte(msg)
if asc > 30 and asc < 256 then
minetest.swap_node(pos, { name = "led_marquee:char_"..asc, param2 = fdir + (last_color*8)})
elseif asc < 31 then
elseif asc < 28 then
last_color = asc
meta:set_int("last_color", asc)
elseif msg == "get" then -- get value as ASCII numerical value

Binary file not shown.

Binary file not shown.

View File

@ -25,12 +25,7 @@ v 0.500000 -0.449125 -0.468750
v -0.500000 -0.449125 -0.468750
v -0.500000 -0.449125 0.468750
v 0.500000 -0.449125 0.468750
vt 0.667843 0.000000
vt 0.667843 0.015513
vt 0.681855 0.031026
vt 0.681855 0.961799
vt 0.667843 0.977312
vt 0.667843 0.992824
vt 0.723891 0.992824
vt 0.723891 0.000000
vt 1.000000 0.007175
@ -39,32 +34,37 @@ vt 0.103234 1.000000
vt 0.103234 0.007175
vt 0.723891 0.000000
vt 0.723891 0.992824
vt 0.667843 0.992824
vt 0.667843 0.977312
vt 0.681855 0.961799
vt 0.681855 0.031026
vt 0.003280 0.226388
vt 0.900045 0.226388
vt 0.900045 0.164337
vt 0.003280 0.164337
vt 0.900045 0.226388
vt 0.003280 0.226388
vt 0.003280 0.164337
vt 0.900045 0.164337
vt 1.000000 0.017400
vt 0.000000 -0.000000
vt 1.000000 -0.000000
vt 1.000000 1.000000
vt 0.000000 0.982506
vt 1.000000 0.982506
vt 0.000000 0.965011
vt 0.000000 0.034801
vt 1.000000 0.034801
vt 0.667843 0.992824
vt 0.681855 0.961799
vt 0.667843 0.977312
vt 0.667843 0.015513
vt 0.667843 0.000000
vt 0.003280 0.226388
vt 0.900045 0.226388
vt 0.900045 0.164337
vt 0.003280 0.164337
vt 0.900045 0.226388
vt 0.003280 0.226388
vt 0.003280 0.164337
vt 0.900045 0.164337
vt 1.000000 -0.000000
vt 1.000000 0.017400
vt 0.667843 0.000000
vt 0.681855 0.031026
vt 0.667843 0.015513
vt 0.667843 0.977312
vt 0.667843 0.992824
vt 0.000000 0.017400
vt 0.000000 -0.000000
vt 1.000000 0.982506
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.982506
vt 0.000000 0.965011
vt 1.000000 0.965011
vt 1.000000 0.034801
vt 0.000000 0.034801
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
@ -73,25 +73,39 @@ vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vn 1.0000 0.0000 -0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -1.0000 -0.0000
vn -1.0000 0.0000 0.0000
vn -0.0000 -0.0000 -1.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 -1.0000
vn -0.0000 0.0000 1.0000
vn -0.0000 1.0000 0.0000
vn -0.0000 0.7071 -0.7071
vn -0.0000 0.7071 0.7071
g Cube_Cube_LEDs_Cube_Cube_LEDs_base
s off
f 5/1/1 6/2/1 7/3/1 8/4/1 9/5/1 10/6/1 11/7/1 12/8/1
f 12/9/2 11/10/2 13/11/2 14/12/2
f 14/13/3 13/14/3 15/15/3 16/16/3 17/17/3 18/18/3 19/19/3 20/20/3
f 12/21/4 14/22/4 20/23/4 5/24/4
f 13/25/5 11/26/5 10/27/5 15/28/5
f 20/29/6 19/30/6 6/31/6 5/32/6
f 16/33/6 15/34/6 10/35/6 9/36/6
f 9/36/7 8/37/7 17/38/7 16/33/7
f 18/39/8 7/40/8 6/31/8 19/30/8
f 8/1/1 11/2/1 12/3/1
f 12/4/2 11/5/2 13/6/2 14/7/2
f 14/8/3 13/9/3 18/10/3
f 12/11/4 14/12/4 20/13/4 5/14/4
f 13/15/5 11/16/5 10/17/5 15/18/5
f 19/19/6 5/20/6 20/21/6
f 15/22/6 9/23/6 16/24/6
f 8/25/7 16/24/7 9/23/7
f 7/26/8 19/19/8 18/27/8
f 13/9/3 15/28/3 17/29/3
f 15/28/3 16/30/3 17/29/3
f 19/31/3 20/32/3 18/10/3
f 20/32/3 14/8/3 18/10/3
f 13/9/3 17/29/3 18/10/3
f 12/3/1 5/33/1 7/34/1
f 5/33/1 6/35/1 7/34/1
f 9/36/1 10/37/1 8/1/1
f 10/37/1 11/2/1 8/1/1
f 12/3/1 7/34/1 8/1/1
f 7/26/8 6/38/8 19/19/8
f 19/19/6 6/38/6 5/20/6
f 15/22/6 10/39/6 9/23/6
f 8/25/7 17/40/7 16/24/7
g Cube_Cube_LEDs_Cube_Cube_LEDs_leds_off
f 1/41/6 2/42/6 3/43/6 4/44/6
g Cube_Cube_LEDs_Cube_Cube_LEDs_leds_on

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 120 B