PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Motor
libservo360
servo360_setUnitsFullCircle.c
1
/*
2
@file servo360_setUnitsFullCircle.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_setUnitsFullCircle
(
int
pin,
int
units)
18
{
19
if
(!_fb360c.servoCog) servo360_run();
20
int
p = servo360_findServoIndex(pin);
21
if
(p == -1)
return
-1;
22
23
//while(lockset(_fb360c.lock360));
24
if
(_fs[p].unitsRev <= S360_UNITS_FULL_CIRCLE)
25
{
26
_fs[p].unitsRev = units;
27
return
p;
28
}
29
else
30
{
31
return
-1;
32
}
33
//lockclr(_fb360c.lock360);
34
}
35
36
servo360_setUnitsFullCircle
int servo360_setUnitsFullCircle(int pin, int units)
Set the number of units in a full circle. By default, this value is 360. This function does not act...
Definition:
servo360_setUnitsFullCircle.c:17
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...
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17