Skip to content

Commit

Permalink
wifi init logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Jan 22, 2025
1 parent 7799e08 commit d9cf4c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions firmware/console/wifi_console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static void socketCallback(SOCKET sock, uint8_t u8Msg, void* pvMsg) {
{
chibios_rt::CriticalSectionLocker csl;

for (size_t i = 0; i < recvMsg->s16BufferSize; i++) {
for (sint16 i = 0; i < recvMsg->s16BufferSize; i++) {
iqPutI(&wifiIqueue, rxBuf[i]);
}
}
Expand Down Expand Up @@ -183,7 +183,8 @@ struct WifiConsoleThread : public TunerstudioThread {
TsChannelBase* setupChannel() override {
// Initialize the WiFi module
param.pfAppWifiCb = wifiCallback;
if (M2M_SUCCESS != m2m_wifi_init(&param)) {
if (auto ret = m2m_wifi_init(&param); M2M_SUCCESS != ret) {
efiPrintf("Wifi init failed with: %d", ret);
return nullptr;
}

Expand Down

0 comments on commit d9cf4c4

Please sign in to comment.