Web: Add SFP state/pin status

The state of the SFP module is being already send in status.json,
but was not parsed via Web UI. When debuging SFP LOS/Signal detection
it is usefull to see what module is reporting back.

Extended the SFP mouse-over information with:
 - RX LOS as reported in 0x02 bit of register 238
 - External TX Disabled from 0x80 bit of register 238
 - TX fault from 0x04 of the same register
 - The last state of RX LOS pin (available also when there is no 0x40
   option on the module)

This should help identify missing/incorrect setup of TX disabled pin.
This commit is contained in:
diijkstra
2026-03-13 23:56:43 +01:00
parent 0952676504
commit 1f6e07a1af
3 changed files with 9 additions and 1 deletions
+2 -1
View File
@@ -655,7 +655,8 @@ void send_status(void)
slen += strtox(outbuf + slen,"\",\"sfp_serial\":\"");
for (register uint8_t s = 0; s < 16; s++)
outbuf[slen++] = sfp_module_serial[machine.is_sfp[i]-1][s];
char_to_html('"');
slen += strtox(outbuf + slen,"\",\"sfp_los\":");
bool_to_html(sfp_pins_last & (0x2 << (((machine.is_sfp[i]-1) << 2))));
} else {
bool_to_html(0);
}