From b0b6eb9a9764d056192d8eabb4f8eef3d844dd0c Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Mon, 21 Oct 2024 03:41:47 +0300 Subject: [PATCH] Minor code cleanups and clarifications --- flix/quaternion.h | 2 +- gazebo/wifi.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flix/quaternion.h b/flix/quaternion.h index c644156..755fa0f 100644 --- a/flix/quaternion.h +++ b/flix/quaternion.h @@ -75,7 +75,7 @@ public: float sqz = z * z; float sqw = w * w; // Cases derived from https://orbitalstation.wordpress.com/tag/quaternion/ - float sarg = -2 * (x * z - w * y) / (sqx + sqy + sqz + sqw); /* normalization added from urdfom_headers */ + float sarg = -2 * (x * z - w * y) / (sqx + sqy + sqz + sqw); if (sarg <= -0.99999) { euler.x = 0; euler.y = -0.5 * PI; diff --git a/gazebo/wifi.h b/gazebo/wifi.h index 5d55b03..282544b 100644 --- a/gazebo/wifi.h +++ b/gazebo/wifi.h @@ -18,7 +18,7 @@ int wifiSocket; void setupWiFi() { wifiSocket = socket(AF_INET, SOCK_DGRAM, 0); - sockaddr_in addr; + sockaddr_in addr; // local address addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_port = htons(WIFI_UDP_PORT_LOCAL); @@ -30,7 +30,7 @@ void setupWiFi() { void sendWiFi(const uint8_t *buf, int len) { if (wifiSocket == 0) setupWiFi(); - sockaddr_in addr; + sockaddr_in addr; // remote address addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_BROADCAST; // send UDP broadcast addr.sin_port = htons(WIFI_UDP_PORT_REMOTE);