HTTP - Pin Monitor exclude UART2, Added auto-disable after reboot

This commit is contained in:
valeklubomir
2022-10-27 13:08:02 +02:00
parent 7834df2710
commit a526aa30c7
2 changed files with 8 additions and 3 deletions

View File

@ -563,7 +563,7 @@ int http_fn_index(http_request_t* request) {
{
for (i = 0;i < 29;i++)
{
if (PIN_GetPinRoleForPinIndex(i) == IOR_None)
if ((PIN_GetPinRoleForPinIndex(i) == IOR_None) && (i != 0) && (i != 1))
{
HAL_PIN_Setup_Input(i);
}
@ -572,11 +572,12 @@ int http_fn_index(http_request_t* request) {
hprintf255(request, "<h5> PIN States<br>");
for (i = 0;i < 29;i++)
{
if (PIN_GetPinRoleForPinIndex(i) != IOR_None)
if ((PIN_GetPinRoleForPinIndex(i) != IOR_None) || (i == 0) || (i == 1))
{
hprintf255(request, "P%02i: NA ", i);
}
else {
else
{
hprintf255(request, "P%02i: %i ", i, (int)HAL_PIN_ReadDigitalInput(i));
}
if (i % 10 == 9)