2020-05-31 08:43:28 -03:00
|
|
|
/*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <AP_HAL/AP_HAL.h>
|
|
|
|
|
2021-06-20 03:30:07 -03:00
|
|
|
#if HAL_MAX_CAN_PROTOCOL_DRIVERS && HAL_CANMANAGER_ENABLED
|
2020-05-31 08:43:28 -03:00
|
|
|
#include "AP_CANManager.h"
|
2022-09-29 20:10:40 -03:00
|
|
|
#include <AP_Vehicle/AP_Vehicle_Type.h>
|
2020-05-31 08:43:28 -03:00
|
|
|
|
2023-04-06 21:18:01 -03:00
|
|
|
#include <AP_DroneCAN/AP_DroneCAN.h>
|
2020-05-31 08:43:28 -03:00
|
|
|
#include <AP_PiccoloCAN/AP_PiccoloCAN.h>
|
|
|
|
#include <AP_KDECAN/AP_KDECAN.h>
|
|
|
|
|
|
|
|
|
|
|
|
// table of user settable CAN bus parameters
|
|
|
|
const AP_Param::GroupInfo AP_CANManager::CANDriver_Params::var_info[] = {
|
|
|
|
|
|
|
|
// @Param: PROTOCOL
|
|
|
|
// @DisplayName: Enable use of specific protocol over virtual driver
|
|
|
|
// @Description: Enabling this option starts selected protocol that will use this virtual driver
|
2023-06-29 14:57:25 -03:00
|
|
|
// @Values: 0:Disabled,1:DroneCAN,4:PiccoloCAN,6:EFI_NWPMU,7:USD1,8:KDECAN,10:Scripting,11:Benewake,12:Scripting2,13:TOFSenseP,14:NanoRadar_NRA24
|
2020-05-31 08:43:28 -03:00
|
|
|
// @User: Advanced
|
|
|
|
// @RebootRequired: True
|
2023-04-18 04:24:17 -03:00
|
|
|
AP_GROUPINFO("PROTOCOL", 1, AP_CANManager::CANDriver_Params, _driver_type, float(AP_CAN::Protocol::DroneCAN)),
|
2020-05-31 08:43:28 -03:00
|
|
|
|
2023-04-08 01:09:10 -03:00
|
|
|
#if HAL_ENABLE_DRONECAN_DRIVERS
|
2020-05-31 08:43:28 -03:00
|
|
|
// @Group: UC_
|
2023-04-06 21:18:01 -03:00
|
|
|
// @Path: ../AP_DroneCAN/AP_DroneCAN.cpp
|
|
|
|
AP_SUBGROUPPTR(_uavcan, "UC_", 2, AP_CANManager::CANDriver_Params, AP_DroneCAN),
|
2023-01-09 09:37:50 -04:00
|
|
|
#endif
|
2020-05-31 08:43:28 -03:00
|
|
|
|
2023-04-10 18:29:30 -03:00
|
|
|
// index 3 was KDECAN
|
2023-04-13 21:26:53 -03:00
|
|
|
|
|
|
|
// index 4 was CANTester
|
2020-05-31 08:43:28 -03:00
|
|
|
|
2020-09-02 21:56:22 -03:00
|
|
|
#if HAL_PICCOLO_CAN_ENABLE
|
2020-09-02 00:52:19 -03:00
|
|
|
// @Group: PC_
|
|
|
|
// @Path: ../AP_PiccoloCAN/AP_PiccoloCAN.cpp
|
2020-09-02 04:16:31 -03:00
|
|
|
AP_SUBGROUPPTR(_piccolocan, "PC_", 5, AP_CANManager::CANDriver_Params, AP_PiccoloCAN),
|
2020-09-02 00:52:19 -03:00
|
|
|
#endif
|
|
|
|
|
2023-11-22 23:15:34 -04:00
|
|
|
// @Param: PROTOCOL2
|
|
|
|
// @DisplayName: Secondary protocol with 11 bit CAN addressing
|
|
|
|
// @Description: Secondary protocol with 11 bit CAN addressing
|
|
|
|
// @Values: 0:Disabled,7:USD1,10:Scripting,11:Benewake,12:Scripting2,13:TOFSenseP,14:NanoRadar_NRA24
|
|
|
|
// @User: Advanced
|
|
|
|
// @RebootRequired: True
|
|
|
|
AP_GROUPINFO("PROTOCOL2", 6, AP_CANManager::CANDriver_Params, _driver_type_11bit, float(AP_CAN::Protocol::None)),
|
|
|
|
|
2020-05-31 08:43:28 -03:00
|
|
|
AP_GROUPEND
|
|
|
|
};
|
|
|
|
#endif
|