In order to be able to use encoders on the HW pins on the VESC (avoid modification of the VESC hall sensor filter) one need to upgrade the Firmware to a later version with the option //#define AS5047_USE_HW_SPI_PINS 1 in the conf_general.h file. by uncommenting that line the VESC will use HW ports to communicate with the encoder.
If one have integrated Hall sensors PCB on the motors one could still use the hall sensor port to receive engine temperature (this is how I do it)
But with the new firmware it turns out that the current ROS Driver does not work. datatypes.h changed with new VESC hardware. So in order to fix that look at https://github.com/mit-racecar/vesc/issues/11
Second problem, Looking at the /sensor/core topic in ROS one would see that the values are all messed up. The problem is the vesc_packet.cpp and the the mapping of the bytes. So to fix this I remapped the bytes and everything is working great.
Here is my vesc_packet.cpp that is confirmed working on Firmware 3.33
Don’t forget to recompile the catkin workspace after change are made to the vesc_driver with catkin_make.
I take no responsibility for injury or hardware damage. So please continue at your own risk!