canbus_slcan.cpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. */
  13. #include <AP_HAL/AP_HAL.h>
  14. #if AP_UAVCAN_SLCAN_ENABLED
  15. #include "AP_BoardConfig_CAN.h"
  16. const AP_Param::GroupInfo AP_BoardConfig_CAN::SLCAN_Interface::var_info[] = {
  17. // @Param: CPORT
  18. // @DisplayName: SLCAN Route
  19. // @Description: CAN Driver ID to be routed to SLCAN, 0 means no routing
  20. // @Values: 0:Disabled,1:First driver,2:Second driver
  21. // @User: Standard
  22. // @RebootRequired: True
  23. AP_GROUPINFO("CPORT", 1, AP_BoardConfig_CAN::SLCAN_Interface, _can_port, 0),
  24. // @Param: SERNUM
  25. // @DisplayName: SLCAN Serial Port
  26. // @Description: Serial Port ID to be used for temporary SLCAN iface, -1 means no temporary serial. This parameter is automatically reset on reboot or on timeout. See CAN_SLCAN_TIMOUT for timeout details
  27. // @Values: -1:Disabled,0:Serial0,1:Serial1,2:Serial2,3:Serial3,4:Serial4,5:Serial5,6:Serial6
  28. // @User: Standard
  29. AP_GROUPINFO("SERNUM", 2, AP_BoardConfig_CAN::SLCAN_Interface, _ser_port, -1),
  30. // @Param: TIMOUT
  31. // @DisplayName: SLCAN Timeout
  32. // @Description: Duration of inactivity after which SLCAN is switched back to original protocol in seconds.
  33. // @Range: 0 32767
  34. // @User: Standard
  35. AP_GROUPINFO("TIMOUT", 3, AP_BoardConfig_CAN::SLCAN_Interface, _timeout, 0),
  36. AP_GROUPEND
  37. };
  38. #endif