Popravki linux sprejemnika
parent
825fa13c36
commit
6aa108c0f9
Binary file not shown.
|
@ -58,10 +58,14 @@ lo_address osc_dest;
|
|||
|
||||
// Receiver MAC start at byte 52
|
||||
#define WLAN_DA_OFFSET 52
|
||||
/*our MAC address*/
|
||||
/* ESP receiver MAC address */
|
||||
uint8_t sprejemnikMac[] = { 0x08, 0x3A, 0xF2, 0x50, 0xEF, 0x6C };
|
||||
/* linux wifi receiver MAC address */
|
||||
//uint8_t sprejemnikMac[] = { 0x9c, 0xb6, 0xd0, 0xc4, 0xe8, 0xb9 };
|
||||
|
||||
uint8_t wlan_da[] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
|
||||
|
||||
|
||||
// ESPNOW packet identifier
|
||||
#define ESP_ID_OFFSET 82
|
||||
uint8_t esp_id[] = { 0x18, 0xfe, 0x34, 0x04 };
|
||||
|
@ -190,21 +194,25 @@ void print_packet(uint8_t *data, int len) {
|
|||
// Ustvarim bundle (svezenj)
|
||||
svezenj = lo_bundle_new(LO_TT_IMMEDIATE);
|
||||
|
||||
sprintf(glava, "/ww/%d/bat", i);
|
||||
m = lo_message_new();
|
||||
lo_message_add_float(m, odcitki[i].bat);
|
||||
lo_bundle_add_message(svezenj, glava, m);
|
||||
|
||||
// Dodamo sporocila
|
||||
sprintf(glava, "/ww/%d/acc", i);
|
||||
m = lo_message_new();
|
||||
lo_message_add_float(m, odcitki[i].aX);
|
||||
lo_message_add_float(m, odcitki[i].aY);
|
||||
lo_message_add_float(m, odcitki[i].aZ);
|
||||
|
||||
lo_bundle_add_message(svezenj, glava, m);
|
||||
|
||||
sprintf(glava, "/ww/%d/quat", i);
|
||||
m = lo_message_new();
|
||||
lo_message_add_float(m, odcitki[i].qW);
|
||||
lo_message_add_float(m, odcitki[i].aX);
|
||||
lo_message_add_float(m, odcitki[i].aY);
|
||||
lo_message_add_float(m, odcitki[i].aZ);
|
||||
|
||||
lo_message_add_float(m, odcitki[i].qX);
|
||||
lo_message_add_float(m, odcitki[i].qY);
|
||||
lo_message_add_float(m, odcitki[i].qZ);
|
||||
lo_bundle_add_message(svezenj, glava, m);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -212,7 +220,9 @@ void print_packet(uint8_t *data, int len) {
|
|||
#endif
|
||||
|
||||
lo_send_bundle(osc_dest, svezenj);
|
||||
lo_bundle_free(svezenj);
|
||||
lo_bundle_free_recursive(svezenj);
|
||||
|
||||
poslji[i] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue