PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Motor
libservo360
servo360_setAcceleration.c
1
/*
2
@file servo360_setAcceleration.c
3
4
@author Parallax Inc
5
6
@copyright
7
Copyright (C) Parallax Inc. 2017. All Rights MIT Licensed. See end of file.
8
9
@brief
10
*/
11
12
13
#include "
simpletools.h
"
14
#include "
servo360.h
"
15
16
17
int
servo360_setAcceleration
(
int
pin,
int
unitsPerSecSquared)
18
{
19
if
(!_fb360c.servoCog) servo360_run();
20
int
p = servo360_findServoIndex(pin);
21
if
(p == -1)
return
-1;
22
23
servo360_setRampStep
(pin, unitsPerSecSquared * S360_UNITS_ENCODER
24
/ (S360_CS_HZ * _fs[p].unitsRev));
25
return
p;
26
}
27
28
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
servo360.h
Parallax Feedback 360 High Speed Servo control and monitoring functions. Uses one additional cog to c...
servo360_setAcceleration
int servo360_setAcceleration(int pin, int unitsPerSecSquared)
Set acceleration in terms of degrees per second squared. The default is 3600 degrees per second squar...
Definition:
servo360_setAcceleration.c:17
servo360_setRampStep
int servo360_setRampStep(int pin, int stepSize)
Set acceleration in terms of degrees per second per 50th of a second. For a more straightforward im...
Definition:
servo360_setRampStep.c:17
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17