-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h.example
51 lines (40 loc) · 1.25 KB
/
config.h.example
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
#ifndef CONFIG_H
#define CONFIG_H
// Bluetooth device name
// If not defined, will default to "RaceChrono aa:bb:cc"
// aa:bb:cc being the last three octets of the MAC address
// #define DEVICE_NAME "RaceChrono DIY"
// Serial logging level, select one from the following list :
// LOG_LEVEL_EMERGENCY
// LOG_LEVEL_ALERT
// LOG_LEVEL_CRITICAL
// LOG_LEVEL_ERROR
// LOG_LEVEL_WARNING
// LOG_LEVEL_NOTICE
// LOG_LEVEL_INFO
// LOG_LEVEL_DEBUG
#define LOG_LEVEL LOG_LEVEL_INFO
// GPIO pins connected to the CAN transceiver
#define RX_PIN 11
#define TX_PIN 12
// Serial baud rate
#define SERIAL_BAUD_RATE 115200
// TWAI RX buffer size
#define TWAI_RX_QUEUE_LENGTH 128
// Bluetooth 5.0 support, 1 to enable, 0 to disable
// #define CONFIG_BT_NIMBLE_EXT_ADV 1
// Limit the rate of messages sent to RaceChrono to x CAN messages each second
// Can be further refined per PID through the list below
#define DEFAULT_UPDATE_RATE_HZ 10
// An optional list of PIDs and their associated rate limit.
// Limits the update rate of the specified PID to the returned value.
uint8_t getUpdateRateHz(uint32_t can_id)
{
switch (can_id)
{
// An example of how to configure this list is detailed in the README.
default:
return DEFAULT_UPDATE_RATE_HZ;
}
}
#endif // CONFIG_H