1. Trammell Hudson
  2. puma

Commits

hud...@osresearch.net  committed 8ed675f

fixes for linux

  • Participants
  • Parent commits af5f226
  • Branches default

Comments (0)

Files changed (2)

File Makefile

View file
  • Ignore whitespace
-CFLAGS = \
+CFLAGS += \
 	-std=c99 \
 	-g \
 	-O3 \
 	-W \
 	-Wall \
 
+LDFLAGS += \
+	-lm \
+	-lpthread \
+
 all: servo
 
 servo: servo.o

File servo.c

View file
  • Ignore whitespace
 typedef struct _controller_t controller_t;
 typedef struct _robot_t robot_t;
 
+#ifndef M_PI
+# define M_PI           3.14159265358979323846
+#endif
+
 
 
 /** Return the current time in usec */
 	{
 		char * nl = index(controller->buf, '\r');
 		if (!nl)
+			nl = index(controller->buf, '\n');
+		if (!nl)
 			break;
 
 		*nl++ = '\0';