PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Robotics
ActivityBot360
libabdrive360
drive_gotoStatus.c
1
/*
2
@file drive_gotoStatus.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
14
#include "
abdrive360.h
"
15
16
17
// Different, returns
18
int
drive_gotoStatus
(
int
side)
19
{
20
if
(!abd360_initialized) drive_init();
21
22
int
statusLeft = 0, statusRight = 0;
23
24
if
(side ==
SIDE_LEFT
|| side ==
SIDE_BOTH
)
25
{
26
statusLeft = (
servo360_getCsop
(abd360_pinCtrlLeft) == 3);
27
}
28
if
(side ==
SIDE_RIGHT
|| side ==
SIDE_BOTH
)
29
{
30
statusRight = (
servo360_getCsop
(abd360_pinCtrlRight) == 3);
31
}
32
33
return
statusLeft + statusRight;
34
}
35
36
SIDE_LEFT
#define SIDE_LEFT
Parameter option for drive_gotoStatus(int side).
Definition:
abdrive.h:221
SIDE_BOTH
#define SIDE_BOTH
Parameter option for drive_gotoStatus(int side).
Definition:
abdrive.h:239
servo360_getCsop
int servo360_getCsop(int pin)
Csop is an abbreviation for control system operation, which could be speed, position,...
Definition:
servo360_getCsop.c:17
abdrive360.h
This library provides a simple set of functions for making the ActivityBot 360 go certain distances a...
drive_gotoStatus
int drive_gotoStatus(int side)
Can be used after drive_gotoMode(OFF) to check if a maneuver has been completed.
Definition:
gotoStatus.c:5
SIDE_RIGHT
#define SIDE_RIGHT
Parameter option for drive_gotoStatus(int side).
Definition:
abdrive.h:230
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17