Skip to content

Commit

Permalink
fix: fixed network status update delay issue
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnL4 committed Jan 17, 2024
1 parent ac75fcf commit ee60099
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions porting/el_network.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#ifndef _EL_NETWORK_H_
#define _EL_NETWORK_H_

#include "core/el_common.h"
#include "core/el_types.h"

#include "core/utils/el_ringbuffer.hpp"
Expand Down
5 changes: 5 additions & 0 deletions porting/himax/we2/el_config_porting.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
#define CONFIG_EL_TFLITE_OP_GATHER
#define CONFIG_EL_TFLITE_OP_RESHAPE

#define CONFIG_EL_NETWORK_PRIO 4
#define CONFIG_EL_NETWORK_STACK_SIZE 512
#define CONFIG_EL_NETWORK_STATUS_PRIO 4
#define CONFIG_EL_NETWORK_STATUS_STACK_SIZE 128

#define CONFIG_EL_MODEL 1
#define CONFIG_EL_MODEL_TFLITE_MAGIC 0x54464C33
#define CONFIG_EL_MODEL_HEADER_MAGIC 0x004C4854
Expand Down
5 changes: 2 additions & 3 deletions porting/himax/we2/el_network_we2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ void NetworkWE2::init(status_cb_t cb) {
}

// Parse data and trigger events
if (xTaskCreate(at_recv_parser, "at_recv_parser", 512, this, 2, &at_rx_parser) != pdPASS) {
if (xTaskCreate(at_recv_parser, "at_recv_parser", CONFIG_EL_NETWORK_STACK_SIZE, this, CONFIG_EL_NETWORK_PRIO, &at_rx_parser) != pdPASS) {
EL_LOGD("at_recv_parser create error\n");
return;
}
// Handle network status change events
if (xTaskCreate(network_status_handler, "network_status_handler", 64, this, 1, &status_handler) !=
if (xTaskCreate(network_status_handler, "network_status_handler", CONFIG_EL_NETWORK_STATUS_STACK_SIZE, this, CONFIG_EL_NETWORK_STATUS_PRIO, &status_handler) !=
pdPASS) {
EL_LOGD("network_status_handler create error\n");
return;
Expand Down Expand Up @@ -597,7 +597,6 @@ void resp_action_ip(const char* resp, void* arg) {
} else if (strncmp(resp + ofs, "netmask:", 8) == 0) {
ofs += 8;
net->_ip.netmask = ipv4_addr_t::from_str(std::string(resp + ofs, strlen(resp + ofs)));
EL_LOGD("IP GOT\n");
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion sscma/definations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define SSCMA_REPL_SUPERVISOR_NAME "sscma#supervisor"
#define SSCMA_REPL_SUPERVISOR_STACK_SIZE 6144U
#ifndef SSCMA_REPL_SUPERVISOR_PRIO
#define SSCMA_REPL_SUPERVISOR_PRIO 1
#define SSCMA_REPL_SUPERVISOR_PRIO SSCMA_REPL_EXECUTOR_PRIO + 1
#endif
#define SSCMA_REPL_SUPERVISOR_POLL_DELAY 5000

Expand Down

0 comments on commit ee60099

Please sign in to comment.