Skip to content

Commit

Permalink
Fix display of temp/voltage on multisync page for Falcon controllers
Browse files Browse the repository at this point in the history
dkulp committed Dec 12, 2023
1 parent 96d9f86 commit a43d50d
Showing 3 changed files with 29 additions and 15 deletions.
2 changes: 2 additions & 0 deletions src/MultiSync.cpp
Original file line number Diff line number Diff line change
@@ -616,6 +616,8 @@ std::string MultiSync::GetTypeString(MultiSyncSystemType type, bool local) {
return "Falcon F16v4";
case kSysTypeFalconF48v4:
return "Falcon F48v4";
case kSysTypeFalconF16v5:
return "Falcon F16v5";
case kSysTypeExperienceGP16:
return "Genius Pixel 16";
case kSysTypeExperienceGP8:
1 change: 1 addition & 0 deletions src/MultiSync.h
Original file line number Diff line number Diff line change
@@ -92,6 +92,7 @@ typedef enum systemType {
kSysTypeFalconF48 = 0x87,
kSysTypeFalconF16v4 = 0x88,
kSysTypeFalconF48v4 = 0x89,
kSysTypeFalconF16v5 = 0x90,
kSysTypeExperienceGP16 = 0xA0,
kSysTypeExperienceGP8 = 0xA1,
kSysTypeExperienceGLR = 0xA2,
41 changes: 26 additions & 15 deletions www/multisync.php
Original file line number Diff line number Diff line change
@@ -340,7 +340,7 @@ function isFalcon(typeId) {
function isFalconV4(typeId) {
typeId = parseInt(typeId);

if ((typeId >= 0x88) && (typeId <= 0x89))
if ((typeId >= 0x88) && (typeId <= 0x90))
return true;

return false;
@@ -1054,7 +1054,9 @@ function parseESPixelStickStatus(ip, data) {
u += "<tr><td>Uptime:</td><td>" + uptime + "</td></tr>";
u += "</table>";

$('#advancedViewUtilization_fpp_' + ips).html(u);
var hostRowKey = ip.replace(/\./g, '_');
var rowId = hostRows[hostRowKey];
$('#advancedViewUtilization_' + rowId).html(u);

var mode = $('#fpp_' + ips + '_mode').html();

@@ -1077,7 +1079,7 @@ function parseESPixelStickStatus(ip, data) {
}
}

$('#fpp_' + ips + '_status').html(st);
$('#' + rowId + '_status').html(st);
}

if ($('#MultiSyncRefreshStatus').is(":checked")) {
@@ -1254,20 +1256,23 @@ function getFalconControllerStatus(fv3ips, fv4ips, refreshing = false) {
u += "<tr><td>Temp:</td><td> " + t1temp + "C</td></tr>";
u += "</table>";

$('#advancedViewUtilization_fpp_' + ips).html(u);
$('#fpp_' + ips + '_status').html(s.status_name);
var hostRowKey = ip.replace(/\./g, '_');
var rowId = hostRows[hostRowKey];

$('#advancedViewUtilization_' + rowId).html(u);
$('#' + rowId + '_status').html(s.status_name);

if (testmode == true || overtemp == true) {
$('#fpp_' + ips + '_warnings').removeAttr('style'); // Remove 'display: none' style
$('#' + rowId + '_warnings').removeAttr('style'); // Remove 'display: none' style
// Handle tablesorter bug not assigning same color to child rows
if ($('#fpp_' + ips).hasClass('odd'))
$('#fpp_' + ips + '_warnings').addClass('odd');
if ($('#' + rowId).hasClass('odd'))
$('#' + rowId + '_warnings').addClass('odd');

var wHTML = "";
if (testmode == true) wHTML += "<span class='warning-text'>Controller Test mode is active</span><br>";
if (overtemp == true) wHTML += "<span class='warning-text'>Pixel brightness reduced due to high temperatures</span><br>";

$('#fpp_' + ips + '_warningCell').html(wHTML);
$('#' + rowId + '_warningCell').html(wHTML);
}
});
if ($('#MultiSyncRefreshStatus').is(":checked")) {
@@ -1320,8 +1325,11 @@ function getWLEDControllerStatus(ipAddresses, refreshing = false) {
u += "<tr><td>Uptime:</td><td>" + uptime + "</td></tr>";
u += "</table>";

$('#advancedViewUtilization_fpp_' + ips).html(u);
$('#fpp_' + ips + '_status').html(data.status_name);
var hostRowKey = ip.replace(/\./g, '_');
var rowId = hostRows[hostRowKey];

$('#advancedViewUtilization_' + rowId).html(u);
$('#' + rowId + '_status').html(data.status_name);
});

if (Array.isArray(ipAddresses) && $('#MultiSyncRefreshStatus').is(":checked")) {
@@ -1368,13 +1376,16 @@ function getGeniusControllerStatus(ipAddresses, refreshing = false) {
//u += "<tr><td>RSSI:</td><td>" + rssi + "dBm / " + quality + "%</td></tr>";
u += "<tr><td>Uptime:</td><td>" + uptime + "</td></tr>";
u += "</table>";
$('#advancedViewUtilization_fpp_' + ips).html(u);

var origDesc = $('#fpp_' + ips + '_desc').html();
var hostRowKey = ip.replace(/\./g, '_');
var rowId = hostRows[hostRowKey];
$('#advancedViewUtilization_' + rowId).html(u);

var origDesc = $('#' + rowId + '_desc').html();
if (origDesc == '') {
$('#fpp_' + ips + '_desc').html(data.system.friendly_name);
$('#' + rowId + '_desc').html(data.system.friendly_name);
}
$('#fpp_' + ips + '_status').html(data.status_name);
$('#' + rowId + '_status').html(data.status_name);
});

if (Array.isArray(ipAddresses) && $('#MultiSyncRefreshStatus').is(":checked")) {

0 comments on commit a43d50d

Please sign in to comment.