@@ -1409,25 +1409,14 @@ void networkUpdate()
1409
1409
// then stop all networks and let the lower code restart the network accordingly
1410
1410
if (consumerTypes != previousConsumerTypes)
1411
1411
{
1412
- previousConsumerTypes = networkGetConsumerTypes (); // Update the previous consumer types
1412
+ if (settings.debugNetworkLayer )
1413
+ systemPrintf (" Changing from consumer type 0x%02X to 0x%02X\r\n " , previousConsumerTypes, consumerTypes);
1413
1414
1414
- // if (networkConsumersOnline() > 0 && networkShutdownRequest == false)
1415
- // {
1416
- // // Tell consumers to shut down
1417
- // networkShutdownRequest = true;
1418
- // if (settings.debugNetworkLayer)
1419
- // systemPrintln("Notifying consumers of impending network shutdown");
1420
- // }
1421
- // else
1422
- // {
1423
- // // We're clear to shutdown
1424
- // if (settings.debugNetworkLayer)
1425
- // systemPrintln("Stopping all networks because of consumer type change");
1415
+ previousConsumerTypes = networkGetConsumerTypes (); // Update the previous consumer types
1426
1416
1427
1417
// Shutdown all networks
1428
1418
for (int index = 0 ; index < NETWORK_OFFLINE; index++)
1429
1419
networkStop (index, settings.debugNetworkLayer );
1430
- // }
1431
1420
1432
1421
}
1433
1422
@@ -1440,8 +1429,7 @@ void networkUpdate()
1440
1429
// If a consumer is requesting a particular type, it gets priority
1441
1430
1442
1431
// Consumer is requesting WiFi specifically
1443
- if ((consumerTypes && (1 << NETCONSUMER_WIFI_STA)) || (consumerTypes && (1 << NETCONSUMER_WIFI_AP)) ||
1444
- (consumerTypes && (1 << NETCONSUMER_WIFI_AP_STA)))
1432
+ if ((consumerTypes && (1 << NETCONSUMER_WIFI_STA)) || (consumerTypes && (1 << NETCONSUMER_WIFI_AP)))
1445
1433
{
1446
1434
if (settings.debugNetworkLayer )
1447
1435
systemPrintln (" Starting WiFi Specific Network" );
@@ -1640,7 +1628,7 @@ uint8_t networkConsumers(uint16_t *consumerTypes)
1640
1628
1641
1629
// TODO Make web server over ethernet work here as well
1642
1630
if (settings.wifiConfigOverAP == true )
1643
- *consumerTypes |= (1 << NETCONSUMER_WIFI_AP_STA ); // WebConfig requires both AP and STA (for firmware check)
1631
+ *consumerTypes |= (( 1 << NETCONSUMER_WIFI_AP) | ( 1 << NETCONSUMER_WIFI_STA) ); // WebConfig requires both AP and STA (for firmware check)
1644
1632
}
1645
1633
1646
1634
// Debug
0 commit comments