in test, send more than 12 bytes if available
This commit is contained in:
parent
d273598d4f
commit
cfac8da964
1 changed files with 5 additions and 1 deletions
|
@ -99,6 +99,8 @@ static void uart_event_task(void *pvParameters) {
|
||||||
static void handle_lora_receive(uint8_t *data, uint8_t size) {
|
static void handle_lora_receive(uint8_t *data, uint8_t size) {
|
||||||
uint8_t j;
|
uint8_t j;
|
||||||
|
|
||||||
|
ESP_LOGI(TAG, "received: " LOG_RESET_COLOR "%s", data);
|
||||||
|
|
||||||
for(uint8_t i = 0; i < size; i += 16) {
|
for(uint8_t i = 0; i < size; i += 16) {
|
||||||
for(j = 0; j < 16; j++) {
|
for(j = 0; j < 16; j++) {
|
||||||
printf("%02X ", data[i + j]);
|
printf("%02X ", data[i + j]);
|
||||||
|
@ -131,7 +133,7 @@ void set_mode(void *args) {
|
||||||
void send(void *args) {
|
void send(void *args) {
|
||||||
ESP_LOGI(TAG, "sending: %s", (char*)args);
|
ESP_LOGI(TAG, "sending: %s", (char*)args);
|
||||||
|
|
||||||
lora32_send(&lora, (uint8_t *)args, 12);
|
lora32_send(&lora, (uint8_t *)args, strlen(args));
|
||||||
|
|
||||||
ESP_LOGI(TAG, "done");
|
ESP_LOGI(TAG, "done");
|
||||||
};
|
};
|
||||||
|
@ -173,6 +175,8 @@ void app_main() {
|
||||||
lora32_init(&lora);
|
lora32_init(&lora);
|
||||||
//lora32_set_spreadfactor(&lora, 12);
|
//lora32_set_spreadfactor(&lora, 12);
|
||||||
|
|
||||||
|
lora32_dump_regs(&lora);
|
||||||
|
|
||||||
ucmdr_init();
|
ucmdr_init();
|
||||||
ucmdr_install("send", send);
|
ucmdr_install("send", send);
|
||||||
ucmdr_install("dump", dump_mem);
|
ucmdr_install("dump", dump_mem);
|
||||||
|
|
Loading…
Reference in a new issue