-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.h
70 lines (58 loc) · 1.81 KB
/
options.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* Options Header
*
* @file options.h
* @author Carbon Video Systems 2019
* @description The main header where preprocessor directives and
* system settings and variables are housed.
*
* @section LICENSE
* Redistribution and use in source and binary forms, with or without
* modification, is permitted in accordance with the BSD 3-Clause License.
*
* Distributed as-is; in accordance with the BSD 3-Clause License.
*/
#ifndef OPTIONS_H
#define OPTIONS_H
/* Includes --------------------------------------------------------*/
#include <Arduino.h>
#include <HardwareSerial.h>
#include "ODriveLib.h"
/* Constants --------------------------------------------------------------------------------------*/
/* Define TESTING during prototyping */
#define TESTING
#ifdef TESTING
/* Testing specific stuff */
#endif
/* Define either BODY or HEAD for normal operation or BOTH_FOR_TESTING for testing purposes*/
#define BODY
// #define HEAD
// #define BOTH_FOR_TESTING
// Define FANS and/or LED_RING as needed
#define FANS
// #define LED_RING
#if defined BODY
/* Body specific stuff */
#define NUM_MOTORS 1
#define AXIS_BODY 0
#define IDENTIFIER 0xAF
#elif defined HEAD
/* Head specific stuff */
#define NUM_MOTORS 1
#define AXIS_HEAD 0
#define IDENTIFIER 0x50
#elif defined BOTH_FOR_TESTING
/* Stuff that makes testing two motors on a single ODrive work properly */
#define NUM_MOTORS 2
#define AXIS_BODY 1
#define AXIS_HEAD 0
#define IDENTIFIER 0xB7
#endif
#define SerialUSB Serial
#define odrive_serial Serial1
#define pi_serial Serial2
#define USB_SERIAL_BAUD 115200
#define ODRIVE_SERIAL_BAUD 115200
#define PI_SERIAL_BAUD 115200
#define temperatureTimingThreshold 1500
#endif //OPTIONS_H