You are here

Custom command testing

4 posts / 0 new
Last post
felixcollins
Offline
Last seen: 4 years 3 weeks ago
Joined: 2020-10-14 02:14
Posts: 3
Custom command testing

I'm new to the project and am trying to add some custom commands to be accessed via BLE.  The rig I'm working on has two motors. To test my new commands I want to exercise them from the VESC tool. I have a few dumb questions to ask so please bear with me!

1. The two processors are connected to the nrf51 BLE module through a multiplexor controlled by a pin on the BLE module. Using the VESC Tool, how can I switch between them?

2. How can I send a custom command from the VESC terminal? Do I need to rebuild VESC Tool with support for my custom command?

Thanks in advance! Felix

felixcollins
Offline
Last seen: 4 years 3 weeks ago
Joined: 2020-10-14 02:14
Posts: 3

Answering 2. I see there is no support to send an arbitrary command. I found the terminal.c file in VESC code. I could add a terminal command to exercise my new functionality but that is not what I need.

CTSchorsch
Offline
Last seen: 3 months 2 days ago
VESC Free
Joined: 2018-07-13 09:55
Posts: 101

Hi,

you can define your custom commands in hw_conf/hw_yourhw.c. Have a look at the axiom hardware, there are a few custom commands

Georg

felixcollins
Offline
Last seen: 4 years 3 weeks ago
Joined: 2020-10-14 02:14
Posts: 3

Thanks for that.  I had a look, but that looks like an extension point just for the terminal commands.  I'm extending the command processing in commands.c . This is for our fork for custom hardware.

My first question still stands though. How can I control which motor controller the BLE comms go to via the multiplexor?  Maybe this is not a VESC standard hardware configuration.  I'll just have to keep reading the code!