Skip to content

Commit

Permalink
Minor code cleanups and clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
okalachev committed Oct 21, 2024
1 parent 25487c6 commit fa59d4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flix/quaternion.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Quaternion : public Printable {
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;
Expand Down
4 changes: 2 additions & 2 deletions gazebo/wifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit fa59d4f

Please sign in to comment.