CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_CANManager/AP_CANManager_CANDriver_Params.cpp
Views: 1798
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_MAX_CAN_PROTOCOL_DRIVERS && HAL_CANMANAGER_ENABLED
19
#include "AP_CANManager.h"
20
21
#include <AP_DroneCAN/AP_DroneCAN.h>
22
#include <AP_PiccoloCAN/AP_PiccoloCAN.h>
23
24
// table of user settable CAN bus parameters
25
const AP_Param::GroupInfo AP_CANManager::CANDriver_Params::var_info[] = {
26
27
// @Param: PROTOCOL
28
// @DisplayName: Enable use of specific protocol over virtual driver
29
// @Description: Enabling this option starts selected protocol that will use this virtual driver
30
// @SortValues: AlphabeticalZeroAtTop
31
// @Values: 0:Disabled,1:DroneCAN,4:PiccoloCAN,6:EFI_NWPMU,7:USD1,8:KDECAN,10:Scripting,11:Benewake,12:Scripting2,13:TOFSenseP,14:NanoRadar
32
// @User: Advanced
33
// @RebootRequired: True
34
AP_GROUPINFO("PROTOCOL", 1, AP_CANManager::CANDriver_Params, _driver_type, float(AP_CAN::Protocol::DroneCAN)),
35
36
#if HAL_ENABLE_DRONECAN_DRIVERS
37
// @Group: UC_
38
// @Path: ../AP_DroneCAN/AP_DroneCAN.cpp
39
AP_SUBGROUPPTR(_uavcan, "UC_", 2, AP_CANManager::CANDriver_Params, AP_DroneCAN),
40
#endif
41
42
// index 3 was KDECAN
43
44
// index 4 was CANTester
45
46
#if HAL_PICCOLO_CAN_ENABLE
47
// @Group: PC_
48
// @Path: ../AP_PiccoloCAN/AP_PiccoloCAN.cpp
49
AP_SUBGROUPPTR(_piccolocan, "PC_", 5, AP_CANManager::CANDriver_Params, AP_PiccoloCAN),
50
#endif
51
52
// @Param: PROTOCOL2
53
// @DisplayName: Secondary protocol with 11 bit CAN addressing
54
// @Description: Secondary protocol with 11 bit CAN addressing
55
// @SortValues: AlphabeticalZeroAtTop
56
// @Values: 0:Disabled,7:USD1,10:Scripting,11:Benewake,12:Scripting2,13:TOFSenseP,14:NanoRadar
57
// @User: Advanced
58
// @RebootRequired: True
59
AP_GROUPINFO("PROTOCOL2", 6, AP_CANManager::CANDriver_Params, _driver_type_11bit, float(AP_CAN::Protocol::None)),
60
61
AP_GROUPEND
62
};
63
#endif
64
65