@@ -1398,8 +1398,8 @@ void networkUpdate()
1398
1398
1399
1399
// Once services have been updated, determine if the network needs to be started/stopped
1400
1400
1401
- static uint16_t previousConsumerTypes = NETCONSUMER_NONE ;
1402
- static uint16_t consumerTypes = NETCONSUMER_NONE ;
1401
+ static uint16_t previousConsumerTypes = NETIF_NONE ;
1402
+ static uint16_t consumerTypes = NETIF_NONE ;
1403
1403
1404
1404
int consumerCount = networkConsumers (&consumerTypes); // Update the current consumer types
1405
1405
@@ -1440,33 +1440,33 @@ void networkUpdate()
1440
1440
{
1441
1441
systemPrintf (" Changing network from consumer type: 0x%02X (" , previousConsumerTypes);
1442
1442
1443
- if (previousConsumerTypes == NETCONSUMER_NONE )
1443
+ if (previousConsumerTypes == NETIF_NONE )
1444
1444
systemPrint (" None" );
1445
1445
else
1446
1446
{
1447
- if (previousConsumerTypes & (1 << NETCONSUMER_WIFI_STA ))
1447
+ if (previousConsumerTypes & (1 << NETIF_WIFI_STA ))
1448
1448
systemPrint (" /STA" );
1449
- if (previousConsumerTypes & (1 << NETCONSUMER_WIFI_AP ))
1449
+ if (previousConsumerTypes & (1 << NETIF_WIFI_AP ))
1450
1450
systemPrint (" /AP" );
1451
- if (previousConsumerTypes & (1 << NETCONSUMER_CELLULAR ))
1451
+ if (previousConsumerTypes & (1 << NETIF_CELLULAR ))
1452
1452
systemPrint (" /CELL" );
1453
- if (previousConsumerTypes & (1 << NETCONSUMER_ETHERNET ))
1453
+ if (previousConsumerTypes & (1 << NETIF_ETHERNET ))
1454
1454
systemPrint (" /ETH" );
1455
1455
}
1456
1456
1457
1457
systemPrintf (" ) to: 0x%02X (" , consumerTypes);
1458
1458
1459
- if (consumerTypes == NETCONSUMER_NONE )
1459
+ if (consumerTypes == NETIF_NONE )
1460
1460
systemPrint (" None" );
1461
1461
else
1462
1462
{
1463
- if (consumerTypes & (1 << NETCONSUMER_WIFI_STA ))
1463
+ if (consumerTypes & (1 << NETIF_WIFI_STA ))
1464
1464
systemPrint (" /STA" );
1465
- if (consumerTypes & (1 << NETCONSUMER_WIFI_AP ))
1465
+ if (consumerTypes & (1 << NETIF_WIFI_AP ))
1466
1466
systemPrint (" /AP" );
1467
- if (consumerTypes & (1 << NETCONSUMER_CELLULAR ))
1467
+ if (consumerTypes & (1 << NETIF_CELLULAR ))
1468
1468
systemPrint (" /CELL" );
1469
- if (consumerTypes & (1 << NETCONSUMER_ETHERNET ))
1469
+ if (consumerTypes & (1 << NETIF_ETHERNET ))
1470
1470
systemPrint (" /ETH" );
1471
1471
}
1472
1472
@@ -1487,19 +1487,19 @@ void networkUpdate()
1487
1487
{
1488
1488
// Attempt to start any network that is needed, in the order Ethernet/WiFi/Cellular
1489
1489
1490
- if (consumerTypes & (1 << NETCONSUMER_ETHERNET ))
1490
+ if (consumerTypes & (1 << NETIF_ETHERNET ))
1491
1491
{
1492
1492
networkStart (NETWORK_ETHERNET, settings.debugNetworkLayer );
1493
1493
}
1494
1494
1495
1495
// Start WiFi if we need AP, or if we need STA+Internet
1496
- if ((consumerTypes & (1 << NETCONSUMER_WIFI_AP )) ||
1497
- ((consumerTypes & (1 << NETCONSUMER_WIFI_STA ) && networkHasInternet () == false )))
1496
+ if ((consumerTypes & (1 << NETIF_WIFI_AP )) ||
1497
+ ((consumerTypes & (1 << NETIF_WIFI_STA ) && networkHasInternet () == false )))
1498
1498
{
1499
1499
networkStart (NETWORK_WIFI, settings.debugNetworkLayer );
1500
1500
}
1501
1501
1502
- if ((networkHasInternet () == false ) && (consumerTypes & (1 << NETCONSUMER_CELLULAR )))
1502
+ if ((networkHasInternet () == false ) && (consumerTypes & (1 << NETIF_CELLULAR )))
1503
1503
{
1504
1504
// If we're in AP only mode (no internet), don't start cellular
1505
1505
if (WIFI_SOFT_AP_RUNNING () == false )
@@ -1596,7 +1596,7 @@ uint8_t networkConsumers(uint16_t *consumerTypes)
1596
1596
uint8_t consumerCount = 0 ;
1597
1597
uint16_t consumerId = 0 ; // Used to debug print who is asking for access
1598
1598
1599
- *consumerTypes = NETCONSUMER_NONE ; // Clear bitfield
1599
+ *consumerTypes = NETIF_NONE ; // Clear bitfield
1600
1600
1601
1601
// If a consumer needs the network or is currently consuming the network (is online) then increment
1602
1602
// consumer count
@@ -1649,7 +1649,7 @@ uint8_t networkConsumers(uint16_t *consumerTypes)
1649
1649
// Caster is available over ethernet, WiFi AP, WiFi STA, and cellular
1650
1650
// Caster is available in all mode: Rover, and Base
1651
1651
if (settings.enableNtripCaster == true || settings.baseCasterOverride == true )
1652
- *consumerTypes |= (1 << NETCONSUMER_WIFI_AP );
1652
+ *consumerTypes |= (1 << NETIF_WIFI_AP );
1653
1653
}
1654
1654
1655
1655
// Network needed for UDP Server
@@ -1682,7 +1682,7 @@ uint8_t networkConsumers(uint16_t *consumerTypes)
1682
1682
{
1683
1683
consumerCount++;
1684
1684
consumerId |= (1 << 7 );
1685
- *consumerTypes = (1 << NETCONSUMER_WIFI_STA ); // OTA Pull library only supports WiFi
1685
+ *consumerTypes = (1 << NETIF_WIFI_STA ); // OTA Pull library only supports WiFi
1686
1686
}
1687
1687
1688
1688
// Network needed for Web Config
@@ -1694,14 +1694,14 @@ uint8_t networkConsumers(uint16_t *consumerTypes)
1694
1694
*consumerTypes = NETWORK_EWC; // Ask for eth/wifi/cellular
1695
1695
1696
1696
if (settings.wifiConfigOverAP == true )
1697
- *consumerTypes |= (1 << NETCONSUMER_WIFI_AP ); // WebConfig requires both AP and STA (for firmware check)
1697
+ *consumerTypes |= (1 << NETIF_WIFI_AP ); // WebConfig requires both AP and STA (for firmware check)
1698
1698
1699
1699
// A good number of RTK products have only WiFi
1700
1700
// If WiFi STA has failed or we have no WiFi SSIDs, fall back to WiFi AP, but allow STA to keep hunting
1701
1701
if (networkIsPresent (NETWORK_ETHERNET) == false && networkIsPresent (NETWORK_CELLULAR) == false &&
1702
1702
settings.wifiConfigOverAP == false && (wifiGetStartTimeout () > 0 || wifiNetworkCount () == 0 ))
1703
1703
{
1704
- *consumerTypes |= (1 << NETCONSUMER_WIFI_AP ); // Re-allow Webconfig over AP
1704
+ *consumerTypes |= (1 << NETIF_WIFI_AP ); // Re-allow Webconfig over AP
1705
1705
}
1706
1706
}
1707
1707
0 commit comments