Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions XYmapper.css
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ a:hover { color: red; text-decoration: underline; }

.ledGrid {
clear: both;
padding-top: 1em;
}

.buildBox {
Expand Down
7 changes: 5 additions & 2 deletions XYmapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function clearTest() {
var matrixName = "my_matrix";
var freeStyle = 0;
var num_leds = 0;
var start_led = 0;
var xdim = 0;
var ydim = 0;
var pixelarray = [];
Expand Down Expand Up @@ -170,7 +171,7 @@ function buildArray(num_leds) {
clearAll = (document.getElementById("clearAllCHK")).checked;
matrixName = (document.getElementById("matrixName")).value;

for (i = 0; i < num_leds; i++) {
for (i = 0; i < num_leds; i++) {
pixelarray[i] = [];
if (clearAll == 1) {
pixelarray[i][0] = "D"; // E = Enable, D = Disable, H = Hidden
Expand All @@ -193,6 +194,8 @@ function buildGrid(numBoxes) {
clearContents(container);
xdim = Number(document.getElementById('xdim').value);
ydim = Number(document.getElementById('ydim').value);

start_led = Number(document.getElementById('start_led').value);

num_leds = xdim * ydim; // set the max number pixels
buildArray(num_leds);
Expand Down Expand Up @@ -338,7 +341,7 @@ function countActiveLEDs() {
}

function renumberLEDs() {
var activeLEDs = 0;
var activeLEDs = 0+start_led;
var inactiveLEDs = countActiveLEDs();
var xtemp = 0;
var ytemp = 0;
Expand Down
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ <h2>WLED-Ledmap.json-Generator</h2>
<input id="ydim" type="number" name="ydim" min="1" value="5"/>
<label class="inputText">Height</label>
</div>
<div class="inputBox" style="margin-top:0.5em;">
<input id="start_led" type="number" name="start" min="0" value="0"/>
<label class="inputText">Start LED</label>
</div>
</div>
<div class="optionBox">
<br>
Expand All @@ -55,7 +59,7 @@ <h2>WLED-Ledmap.json-Generator</h2>
<label for="wLedCHK">Normal</label><br>
<input type="radio" id="freeCHK" name="outputMode" onchange="freeOutput(this)">
<label for="freeCHK">Freestyle <b>*</b></label><br>
</div><br>
</div><br>
</div>
<div class="optionBox">
<div class="buildBox">
Expand Down