Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Additional LED Panel Options for RPi #2021

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
26 changes: 26 additions & 0 deletions src/channeloutput/RGBMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,32 @@ int RGBMatrixOutput::Init(Json::Value config) {
options.row_address_type = config["panelRowAddressType"].asInt();
}

/* mortification77 - 2023-11-30: Add panelType

panelType Definitions

NOTE: IF we are against inline "const char *", we can create constants.

0 = default
1 = FM6126A
2 = FM6127

*/

if (config.isMember("panelType")) {
switch(config["panelType"].asInt())
{
case 1:
options.panel_type = "FM6126A";
break;
case 2:
options.panel_type = "FM6127";
break;
default:
break;
}
}

m_rgbmatrix = RGBMatrix::CreateFromOptions(options, runtimeOptions);
if (!m_rgbmatrix) {
LogErr(VB_CHANNELOUT, "Unable to create RGBMatrix instance\n");
Expand Down
73 changes: 56 additions & 17 deletions www/co-ledPanels.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ function printLEDPanelInterleaveSelect($platform)
$values["ZStripeUneven"] = "8";
$values["P10-128x4-Z"] = "9";
$values["QiangLiQ8"] = "10";
// mortification77 - 2024-10-27 - Add Missing Interleave Values
$values["InversedZStripe"] = "11";
$values["P10Outdoor1R1G1-1"] = "12";
$values["P10Outdoor1R1G1-2"] = "13";
$values["P10Outdoor1R1G1-3"] = "14";
$values["P10CoremanMapper"] = "15";
$values["P8Outdoor1R1G1"] = "16";
$values["FlippedStripe"] = "17";
$values["P10Outdoor32x16HalfScan"] = "18";
$values["P10Outdoor32x16QuarterScanMapper"] = "19";
$values["P3Outdoor64x64MultiplexMapper"] = "20";
}
foreach ($values as $key => $value) {
echo "<option value='$value'";
Expand Down Expand Up @@ -399,6 +410,10 @@ function InitializeLEDPanels()
var RowAddressType = channelOutputsLookup["LEDPanelMatrix"].panelRowAddressType;
$('#LEDPanelRowAddressType').val(RowAddressType);
}
if (channelOutputsLookup["LEDPanelMatrix"].panelType != null) {
var PanelType = channelOutputsLookup["LEDPanelMatrix"].panelType;
$('#LEDPanelType').val(PanelType);
}
if (channelOutputsLookup["LEDPanelMatrix"].panelInterleave != null) {
var interleave = channelOutputsLookup["LEDPanelMatrix"].panelInterleave;
$('#LEDPanelInterleave').val(interleave);
Expand Down Expand Up @@ -537,6 +552,9 @@ function GetLEDPanelConfig()
if ($('#LEDPanelRowAddressType').val() != "0") {
config.panelRowAddressType = parseInt($('#LEDPanelRowAddressType').val());
}
if ($('#LEDPanelType').val() != "0") {
config.panelType = parseInt($('#LEDPanelType').val());
}
if ($('#LEDPanelInterleave').val() != "0") {
config.panelInterleave = $('#LEDPanelInterleave').val();
}
Expand Down Expand Up @@ -655,6 +673,8 @@ function LEDPanelsConnectionChanged()
if ($settings['Platform'] == "BeagleBone Black") {
echo " $('#LEDPanelsRowAddressTypeLabel').hide();\n";
echo " $('#LEDPanelRowAddressType').hide();\n";
echo " $('#LEDPanelTypeLabel').hide();\n";
echo " $('#LEDPanelType').hide();\n";
echo " $('#LEDPanelsInterleaveLabel').hide();\n";
echo " $('#LEDPanelInterleave').hide();\n";
echo " $('#LEDPanelsOutputByRowLabel').hide();\n";
Expand Down Expand Up @@ -713,6 +733,8 @@ function LEDPanelsConnectionChanged()
if ($settings['Platform'] == "Raspberry Pi") {
echo " $('#LEDPanelsRowAddressTypeLabel').show();\n";
echo " $('#LEDPanelRowAddressType').show();\n";
echo " $('#LEDPanelTypeLabel').show();\n";
echo " $('#LEDPanelType').show();\n";
echo " $('#LEDPanelsInterleaveLabel').show();\n";
echo " $('#LEDPanelInterleave').show();\n";
echo " $('#LEDPanelsOutputCPUPWMLabel').show();\n";
Expand Down Expand Up @@ -1514,25 +1536,41 @@ function LEDPanelsSizeChanged() {
<div class="printSettingLabelCol col-md-2 col-lg-2"></div>
<div class="printSettingFieldCol col-md-3 col-lg-3"></div>
</div>
<div class="row">
<?if ($settings['Platform'] == "Raspberry Pi") {?>
<div class="printSettingLabelCol col-md-2 col-lg-2"><span id='LEDPanelsRowAddressTypeLabel'><b>Panel Row Address Type:</b></span></div>
<div class="printSettingFieldCol col-md-3 col-lg-3">
<select id='LEDPanelRowAddressType'>
<option value='0' selected>Standard</option>
<option value='1'>AB-Addressed Panels</option>
<option value='2'>Direct Row Select</option>
<option value='3'>ABC-Addressed Panels</option>
<option value='4'>ABC Shift + DE Direct</option>
</select>
</div>
<?} else {?>
<div class="printSettingLabelCol col-md-2 col-lg-2"></div>
<div class="printSettingFieldCol col-md-3 col-lg-3"></div>
<?}?>
</div>
<div class="row">
<?if ($settings['Platform'] == "Raspberry Pi") {?>
<div class="printSettingLabelCol col-md-2 col-lg-2"><span id='LEDPanelTypeLabel'><b>LED Panel Type:</b></span></div>
<div class="printSettingFieldCol col-md-3 col-lg-3">
<select id='LEDPanelType'>
<option value='0' selected>Standard</option>
<option value='1'>FM6126A</option>
<option value='2'>FM6127</option>
</select>
</div>
<?} else {?>
<div class="printSettingLabelCol col-md-2 col-lg-2"></div>
<div class="printSettingFieldCol col-md-3 col-lg-3"></div>
<?}?>
</div>
</div>
<div class="row">
<?if ($settings['Platform'] == "Raspberry Pi") {?>
<div class="printSettingLabelCol col-md-2 col-lg-2"><span id='LEDPanelsRowAddressTypeLabel'><b>Panel Row Address Type:</b></span></div>
<div class="printSettingFieldCol col-md-3 col-lg-3">
<select id='LEDPanelRowAddressType'>
<option value='0' selected>Standard</option>
<option value='1'>AB-Addressed Panels</option>
<option value='2'>Direct Row Select</option>
<option value='3'>ABC-Addressed Panels</option>
<option value='4'>ABC Shift + DE Direct</option>
</select>
</div>
<?} else {?>
<div class="printSettingLabelCol col-md-2 col-lg-2"></div>
<div class="printSettingFieldCol col-md-3 col-lg-3"></div>
<?}?>
</div>
</div>

</div>

<div id='divLEDPanelsLayoutData'>
Expand Down Expand Up @@ -1623,6 +1661,7 @@ function LEDPanelsSizeChanged() {
<li>When wiring panels, divide the panels across as many outputs as possible. Shorter chains on more outputs will have higher refresh than longer chains on fewer outputs.</li>
<li>If not using all outputs, use all the outputs from 1 up to what is needed. Data is always sent on outputs up to the highest configured, even if no panels are attached.</li>
<?if ($settings['Platform'] == "Raspberry Pi") {?>
<li>If <b>only one single panel works</b> and everything else is correctly configured, try one of the special "LED Panel Type" options!
<li>The FPP developers strongly encourage using either a BeagleBone based panel driver (Octoscroller, PocketScroller) or using a ColorLight controller. The Raspberry Pi panel code performs poorly compared to the other options and supports a much more limited set of options.</li>
<?}?>
</ul>
Expand Down