Is it possible to switch the ESC config from within vehicle Lua? For example, switch from mode '0' to mode '1', as defined in the jbeam (normal, sport, off). Thanks
Something like this in vehicle lua should work™: Code: local esc = controller.getController('esc') if esc then esc.toggleESCMode() end or use.. Code: esc.setESCMode(x) Where x can be 2,3 or 4. 2 => Sport ESC 3 => No ESC 4 => Regular ESC
Please note that the mode index is not something set in stone, it depends on the order of modes in the jbeam. So while with our stock content 1 usually ends up being regular, there is no guarantee for that.
Thanks for that clarification. In my specific use case it should be fine, since its for the dashboard system of a custom vehicle, so providing I don't reorder the ESC in the jbeam, it shouldn't be an issue. But good to know regardless