This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28379D: Using GUI Composer V3 - How to initialize a configutaion page

Part Number: TMS320F28379D

Hello,

1- I have build-up the following IHM in Gui Composer v3

2- The two radio-buttons interact, and when I select "Une seule pulse", I get the following view :

3- To achieve this interaction, I wrote the following "index.js" code :

import { GcUtils } from './components/@ti/gc-core-assets/lib/GcUtils';
import { GcConsole } from './components/@ti/gc-core-assets/lib/GcConsole';
import { bindingRegistry } from './components/@ti/gc-core-databind/lib/CoreDatabind';
import { GcWidget } from './components/@ti/gc-widget-base/lib/GcWidget';
import { ActionRegistry } from './components/@ti/gc-widget-menu/lib/ActionRegistry';

let console = new GcConsole('myapp'); // creates a console instance with name 'myapp'
GcConsole.setLevel('myapp', 5); // enable console output for myapp console instance

console.info('index.js is loaded...');

//write all code inside of this initializer function
const init = () => { //will run repeatedly while application window is open
// update topology
GcWidget.querySelector('#group').then(group => {
// update the topology input widget hidden attribute
const updateSelectInput = index => {
//Promise.all([GcWidget.querySelector('#select'), GcWidget.querySelector('#select_1')]).then(([nbrePulses, espPulses]) => {
Promise.all([GcWidget.querySelector('#select'), GcWidget.querySelector('#select_1'),
GcWidget.querySelector('#label_2'), GcWidget.querySelector('#label_3'),
GcWidget.querySelector('#label_4')]).then(([nbrePulses, espPulses, label_2, label_3, label_4]) => {
   if (index === 0) { // Select
   nbrePulses.hidden = true;
   espPulses.hidden = true;
   label_2.hidden = true;
   label_3.hidden = true;
   label_4.hidden = true;
  } else { // fixed DC
    nbrePulses.hidden = false;
    espPulses.hidden = false;
   label_2.hidden = false;
   label_3.hidden = false;
   label_4.hidden = false;
  }
  });
  };
  group.addEventListener('selected-index-changed', ({detail}) => updateSelectInput(detail.value));
  updateSelectInput(group.selectedIndex);
  });
  };

//don't touch this. When page loaded, will run the init function above where all code is written
document.readyState === 'complete' ? init() : document.addEventListener('DOMContentLoaded', init);

4- And my question is :

HOW TO INITIALIZE THE PAGE AT LAUNCHING TO MAKE THE LAST VIEW APPEARING EVERYTIME AT FIRST

 ==> HOW SHOULD I MODIFY MY "INDEX.js" CODE TO ACHIEVE THAT ?

Many thanks in advance for your help