master
Jurij Podgoršek 2022-03-05 02:10:27 +01:00
parent 018887a13d
commit e4e7f3b867
1 changed files with 64 additions and 62 deletions

View File

@ -8,8 +8,8 @@
#include <OSCMessage.h>
//#define SERIAL_OSC
//#define WIFI_OSC
#define BT_OSC
#define WIFI_OSC
//#define BT_OSC
// SERIAL
#ifdef BOARD_HAS_USB_SERIAL
@ -243,25 +243,26 @@ void loop() {
diff = q.getProduct(pq.getConjugate());
qmsg.add(q.w);
qmsg.add(q.x);
qmsg.add(q.y);
qmsg.add(q.x);
qmsg.add(q.z);
qdmsg.add(diff.w);
qdmsg.add(diff.x);
qdmsg.add(diff.y);
qdmsg.add(diff.x);
qdmsg.add(diff.z);
#ifdef SERIAL_OSC
SLIPSerial.beginPacket();
qdmsg.send(SLIPSerial);
qmsg.send(SLIPSerial);
SLIPSerial.endPacket();
SLIPSerial.beginPacket();
qmsg.send(SLIPSerial);
qdmsg.send(SLIPSerial);
SLIPSerial.endPacket();
#endif
#ifdef WIFI_OSC
udp.beginPacket(castIp, port);
qmsg.send(udp);
@ -272,6 +273,7 @@ void loop() {
udp.endPacket();
#endif
// Some bug below, it seems
#ifdef BT_OSC
SLIPBTSerial.beginPacket();
qmsg.send(SLIPBTSerial);