Tool/software: Code Composer Studio
hello
I modified an existing InstaSpin GUI. I'd like to change the following variable from the Motor control API gMotorVars.Speed_krpm by using the GUI.
when I change the Value in the CCS (Debug mode) the displayed value in the GUI changes. When I change the Value in the GUI nothing happens in CCS.
I must have made some mistake in the index.js file - how is the binding done?
function Divide1000_multiplyQ24(oldValue)
{
var divide = oldValue/1000;
var result = divide*(Math.pow(2,24));
return Math.floor(result).toString();
}
....
document.addEventListener('gc-databind-ready', function()
{
gc.databind.registry.bind('widget.ti_widget_numberbox_speedref.value',
{
SpeedRef_krpm: 'my_xds.gMotorVars.SpeedRef_krpm'
},
function(value) {
return(MyUtil.DivideQ24_multiply1000(value.SpeedRef_krpm));
},
function(value){
//return Math.round(MyUtil.Divide1000_multiplyQ24(value));
return Math.round(Divide1000_multiplyQ24(value));
}
);
