1. Trammell Hudson
  2. servo

Commits

Trammell Hudson  committed 2fd74e9 Draft

Reduce error range slightly

  • Participants
  • Parent commits 02c9051
  • Branches default

Comments (0)

Files changed (1)

File servo.c

View file
  • Ignore whitespace
 	int16_t position = servo_position(id);
 
 	int16_t error = servo->command - position;
-	if (error < -1000)
-		error = -1000;
+	if (error < -300)
+		error = -300;
 	else
-	if (error > +1000)
-		error = +1000;
+	if (error > +300)
+		error = +300;
 
 	int16_t v_instant = position - servo->last_position;;
 	const int SCALE = 7;