Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
DatNoHand committed Apr 5, 2019
1 parent d4bd319 commit be1af2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion server/lib/rpi-led-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ exports.Render = () => {
strip.render(exports.pixel_data)
exports.event.emit('render')

return true
return 'success'
}

/**
Expand Down
16 changes: 5 additions & 11 deletions server/public/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,18 +259,12 @@ function OnOnOffClick() {
// ----------------------------------------------------------------------
// Begin LED functions

function SetLed(bright, amount, _on = true) {
if (!_on) {
for (let i = 0; i < wall_data; i++) {
wall_data[i][0] = _on
}
} else {
// wall_data: [ bool on, string color, int amount]
for (let i = 0; i < wall_data.length; i++) {
wall_data[i][0] = true
wall_data[i][2] = amount
}
function SetLed(bright, amount) {
// wall_data: [ bool on, string color, int amount]
for (let i = 0; i < wall_data.length; i++) {
wall_data[i][2] = amount
}

SendBrightness(bright)
send({type: 'render_all_walls', argv: JSON.stringify({ wall_data: wall_data }) })
}
Expand Down
2 changes: 1 addition & 1 deletion server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function OnRenderAllWalls(sender, argv) {
let res = LedLib.setStripWallData(argv.wall_data)
if (res != 'success') return res

LedLib.Render()
return LedLib.Render()
}


Expand Down

0 comments on commit be1af2b

Please sign in to comment.