Compare commits
2 Commits
998bafc53a
...
6a71c2863d
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a71c2863d | |||
| c8ebbb2946 |
@@ -95,7 +95,8 @@ void incphub_task_main(void *params)
|
||||
// === Private functions ===
|
||||
static int handle_nil_packet(nil_packet_t *nil)
|
||||
{
|
||||
if (nil->header.dst_addr == INCPHUB_LOCAL_NIL_ADDR)
|
||||
if (nil->header.dst_addr == INCPHUB_LOCAL_NIL_ADDR
|
||||
|| nil->header.dst_addr == NIL_ADDR_LOCALHOST)
|
||||
{
|
||||
ntl_packet_t *ntl = extract_ntl_packet(nil);
|
||||
if (ntl == NULL)
|
||||
|
||||
@@ -62,9 +62,12 @@ void requester_task_main(void *params)
|
||||
// Read reply message
|
||||
uint32_t num = *(uint32_t*)buffer;
|
||||
|
||||
// Release buffer
|
||||
incphub_release_msg_buffer(cli, buffer);
|
||||
|
||||
// Profit (send to UART to ensure it worked)
|
||||
char strbuf[32];
|
||||
sprintf(strbuf, "%u\r\n", num);
|
||||
HAL_UART_Transmit(&huart2, strbuf, strlen(strbuf), 9999);
|
||||
sprintf(strbuf, "%lu\r\n", num);
|
||||
HAL_UART_Transmit(&huart2, (uint8_t*)strbuf, strlen(strbuf), 9999);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user