forked from test34/can_wizard
fixed bug
This commit is contained in:
parent
d1349d9a37
commit
1a60cc4f3c
4 changed files with 25 additions and 22 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "xvprintf.h"
|
||||
#include "can.h"
|
||||
|
||||
|
||||
static void register_send_can_frame(void);
|
||||
|
||||
void register_can_commands(void) {
|
||||
|
@ -21,18 +22,15 @@ static struct {
|
|||
} cansend_args;
|
||||
|
||||
static int send_can_frame(int argc, char **argv) {
|
||||
const char *delim = "#";
|
||||
int tmp_can_id = 0;
|
||||
int tmp_id = 0;
|
||||
char printf_str[30];
|
||||
char can_msg_str_buf[40];
|
||||
char printf_str[50];
|
||||
char can_msg_str_buf[50];
|
||||
int nerrors = arg_parse(argc, argv, (void **) &cansend_args);
|
||||
if (nerrors != 0) {
|
||||
arg_print_errors(stderr, cansend_args.end, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
const char* can_msg_ptr = cansend_args.message->sval[0];
|
||||
|
||||
const char *can_msg_ptr = cansend_args.message->sval[0];
|
||||
strlcpy(can_msg_str_buf, can_msg_ptr, sizeof(can_msg_str_buf));
|
||||
printf("%s\n", can_msg_str_buf);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ void console_task_interactive(void* arg) {
|
|||
ls.buf = buf;
|
||||
ls.prompt = prompt;
|
||||
linenoiseEditStart(&ls);
|
||||
xTaskCreate(console_task_tx, "console tsk tx", 4096, NULL, CONFIG_CONSOLE_TX_PRIORITY, NULL);
|
||||
xTaskCreate(console_task_tx, "console tsk tx", 5000, NULL, CONFIG_CONSOLE_TX_PRIORITY, NULL);
|
||||
esp_log_set_vprintf(&vxprintf);
|
||||
while (true) {
|
||||
line = linenoiseEditFeed(&ls);
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
void app_main(void) {
|
||||
can_init();
|
||||
init_tx_ringbuf();
|
||||
xTaskCreate(can_task, "can task", 4096, NULL, CONFIG_CAN_TASK_PRIORITY, NULL);
|
||||
xTaskCreate(can_task, "can task", 4800, NULL, CONFIG_CAN_TASK_PRIORITY, NULL);
|
||||
initialize_filesystem();
|
||||
initialize_console();
|
||||
xTaskCreate(console_task_interactive, "console tsk int", 4096, NULL, CONFIG_CONSOLE_INT_PRIORITY, NULL);
|
||||
xTaskCreate(console_task_interactive, "console tsk int", 8000, NULL, CONFIG_CONSOLE_INT_PRIORITY, NULL);
|
||||
}
|
||||
|
|
31
sdkconfig
31
sdkconfig
|
@ -406,15 +406,15 @@ CONFIG_CONSOLE_INT_PRIORITY=1
|
|||
#
|
||||
# Compiler options
|
||||
#
|
||||
# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y
|
||||
# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_PERF is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_NONE is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y
|
||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
|
||||
CONFIG_COMPILER_FLOAT_LIB_FROM_GCCLIB=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=0
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2
|
||||
# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set
|
||||
CONFIG_COMPILER_HIDE_PATHS_MACROS=y
|
||||
# CONFIG_COMPILER_CXX_EXCEPTIONS is not set
|
||||
|
@ -1013,6 +1013,7 @@ CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y
|
|||
#
|
||||
# Port
|
||||
#
|
||||
CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y
|
||||
# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set
|
||||
CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS=y
|
||||
# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set
|
||||
|
@ -1039,7 +1040,9 @@ CONFIG_FREERTOS_DEBUG_OCDAWARE=y
|
|||
#
|
||||
CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y
|
||||
# CONFIG_HAL_ASSERTION_DISABLE is not set
|
||||
CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=0
|
||||
# CONFIG_HAL_ASSERTION_SILENT is not set
|
||||
# CONFIG_HAL_ASSERTION_ENABLE is not set
|
||||
CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2
|
||||
CONFIG_HAL_SPI_MASTER_FUNC_IN_IRAM=y
|
||||
CONFIG_HAL_SPI_SLAVE_FUNC_IN_IRAM=y
|
||||
# end of Hardware Abstraction Layer (HAL) and Low Level (LL)
|
||||
|
@ -1209,6 +1212,7 @@ CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
|
|||
# end of SNTP
|
||||
|
||||
CONFIG_LWIP_BRIDGEIF_MAX_PORTS=7
|
||||
CONFIG_LWIP_ESP_LWIP_ASSERT=y
|
||||
|
||||
#
|
||||
# Hooks
|
||||
|
@ -1616,14 +1620,14 @@ CONFIG_LOG_BOOTLOADER_LEVEL=1
|
|||
CONFIG_FLASHMODE_DIO=y
|
||||
# CONFIG_FLASHMODE_DOUT is not set
|
||||
CONFIG_MONITOR_BAUD=115200
|
||||
# CONFIG_OPTIMIZATION_LEVEL_DEBUG is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set
|
||||
CONFIG_OPTIMIZATION_LEVEL_RELEASE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED is not set
|
||||
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y
|
||||
# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set
|
||||
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set
|
||||
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||
CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=y
|
||||
CONFIG_OPTIMIZATION_ASSERTION_LEVEL=0
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
|
||||
CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2
|
||||
# CONFIG_CXX_EXCEPTIONS is not set
|
||||
CONFIG_STACK_CHECK_NONE=y
|
||||
# CONFIG_STACK_CHECK_NORM is not set
|
||||
|
@ -1734,6 +1738,7 @@ CONFIG_TIMER_TASK_PRIORITY=1
|
|||
CONFIG_TIMER_TASK_STACK_DEPTH=2048
|
||||
CONFIG_TIMER_QUEUE_LENGTH=10
|
||||
# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set
|
||||
# CONFIG_HAL_ASSERTION_SILIENT is not set
|
||||
# CONFIG_L2_TO_L3_COPY is not set
|
||||
CONFIG_ESP_GRATUITOUS_ARP=y
|
||||
CONFIG_GARP_TMR_INTERVAL=60
|
||||
|
|
Loading…
Reference in a new issue