Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions workspace/h700/platform/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,13 @@ static bool bluetoothConnected = false;

void PLAT_getNetworkStatus(int* is_online)
{
struct WIFI_connection next_connection = {0};
// Keep the cached signal available while the Wi-Fi commands run.
if(WIFI_enabled())
WIFI_connectionInfo(&connection);
WIFI_connectionInfo(&next_connection);
else
connection_reset(&connection);
connection_reset(&next_connection);
connection = next_connection;

if(is_online)
*is_online = (connection.valid && connection.ssid[0] != '\0');
Expand Down
7 changes: 5 additions & 2 deletions workspace/tg5040/platform/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,13 @@ static bool bluetoothConnected = false;

void PLAT_getNetworkStatus(int* is_online)
{
struct WIFI_connection next_connection = {0};
// Keep the cached signal available while the Wi-Fi commands run.
if(WIFI_enabled())
WIFI_connectionInfo(&connection);
WIFI_connectionInfo(&next_connection);
else
connection_reset(&connection);
connection_reset(&next_connection);
connection = next_connection;

if(is_online)
*is_online = (connection.valid && connection.ssid[0] != '\0');
Expand Down
7 changes: 5 additions & 2 deletions workspace/tg5050/platform/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,13 @@ static bool bluetoothConnected = false;

void PLAT_getNetworkStatus(int* is_online)
{
struct WIFI_connection next_connection = {0};
// Keep the cached signal available while the Wi-Fi commands run.
if(WIFI_enabled())
WIFI_connectionInfo(&connection);
WIFI_connectionInfo(&next_connection);
else
connection_reset(&connection);
connection_reset(&next_connection);
connection = next_connection;

if(is_online)
*is_online = (connection.valid && connection.ssid[0] != '\0');
Expand Down