Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_CANManager/AP_CANIfaceParams.cpp
9417 views
1
/*
2
* This program is free software: you can redistribute it and/or modify
3
it under the terms of the GNU General Public License as published by
4
the Free Software Foundation, either version 3 of the License, or
5
(at your option) any later version.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License
13
along with this program. If not, see <http://www.gnu.org/licenses/>.
14
*/
15
16
#include <AP_HAL/AP_HAL.h>
17
18
#if HAL_CANMANAGER_ENABLED
19
#include "AP_CANManager.h"
20
21
// table of user settable CAN bus parameters
22
const AP_Param::GroupInfo AP_CANManager::CANIface_Params::var_info[] = {
23
// @Param: DRIVER
24
// @DisplayName: Index of virtual driver to be used with physical CAN interface
25
// @Description: Enabling this option enables use of CAN buses.
26
// @Values: 0:Disabled,1:First driver,2:Second driver,3:Third driver
27
// @User: Standard
28
// @RebootRequired: True
29
AP_GROUPINFO_FLAGS("DRIVER", 1, AP_CANManager::CANIface_Params, _driver_number, HAL_CAN_DRIVER_DEFAULT, AP_PARAM_FLAG_ENABLE),
30
31
// @Param: BITRATE
32
// @DisplayName: Bitrate of CAN interface
33
// @Description: Bit rate can be set up to from 10000 to 1000000
34
// @Range: 10000 1000000
35
// @User: Advanced
36
AP_GROUPINFO("BITRATE", 2, AP_CANManager::CANIface_Params, _bitrate, 1000000),
37
38
#if HAL_CANFD_SUPPORTED
39
// @Param: FDBITRATE
40
// @DisplayName: Bitrate of CANFD interface
41
// @Description: Bit rate can be set up to from 1000000 to 8000000
42
// @Values: 1:1M, 2:2M, 4:4M, 5:5M, 8:8M
43
// @User: Advanced
44
AP_GROUPINFO("FDBITRATE", 3, AP_CANManager::CANIface_Params, _fdbitrate, HAL_CANFD_SUPPORTED),
45
#endif
46
47
// @Param: OPTIONS
48
// @DisplayName: CAN per-interface options
49
// @Description: CAN per-interface options
50
// @Bitmask: 0:LogAllFrames
51
// @User: Advanced
52
AP_GROUPINFO("OPTIONS", 4, AP_CANManager::CANIface_Params, _options, 0),
53
54
// Index 3 occupied by Param: DEBUG
55
AP_GROUPEND
56
};
57
58
#endif
59
60