@@ -7,7 +7,7 @@ UI elements:
77 5. [*][Button] Upload to HW. 
88 7. [*] Test Exported APP on Mac OS. 
99 8. [*] Test Exported APP and adjust on Windows. 
10-  9. [TBD ] Test Exported APP on Linux. (yaml lib used by prog.py not working asked developer) 
10+  9. [* ] Test Exported APP on Linux. (yaml lib used by prog.py not working asked developer) 
1111 10.[*] Icon lock/unlock bug resolve. 
1212 11.[*] key board shortcut to show debugg port controls. 
1313 12.[*] Debug port ui (port menu + switch)show hide. 
@@ -58,6 +58,9 @@ int listItemHeight = 100;
5858int  listItemWidth =  220 ;
5959int  gapTopFromFrame =  35 ;
6060
61+ String  emptyUploadPortMenuLabel =  " Select upload port . . ."  ;
62+ String  emptyDebugPortMenuLabel =  " Select debug port . . ."  ;
63+ 
6164
6265void  setupOnScreenConsosle (ControlFont  f ) {
6366  myTextarea =  cp5. addTextarea(" txt"  )
@@ -146,7 +149,7 @@ void createUploadPortsMenu(ControlFont f) {
146149    .setSize(listItemWidth, listItemHeight)
147150    .setBarHeight(objHeights)
148151    .setFont(f)
149-     .setLabel(" Select upload port . . . "  )
152+     .setLabel(emptyUploadPortMenuLabel )
150153    .setColorLabel(washed_text_color)
151154    .setItemHeight(objHeights)
152155    .addItems(workablePortsArray)
@@ -222,7 +225,7 @@ void createDebugPortsMenu(ControlFont f) {
222225    .setSize(listItemWidth, listItemHeight)
223226    .setBarHeight(objHeights)
224227    .setFont(f)
225-     .setLabel(" Select debug port . . . "  )
228+     .setLabel(emptyDebugPortMenuLabel )
226229    .setColorLabel(washed_text_color)
227230    .setItemHeight(objHeights)
228231    .addItems(workablePortsArray)
@@ -370,8 +373,24 @@ void refreshPorts() {
370373  String [] workablePortsArray =  filterSerialList(serialPortsList);
371374  printArray(workablePortsArray);
372375
373-   //  Update the list 
376+   //  Update the Port Menu lists 
374377  uploadSerialListMenu. setItems(workablePortsArray). update();
378+   debugSerialListMenu. setItems(workablePortsArray). update();
379+   
380+   //  if the previous port not is not there, update the header of the menu list
381+   if  (! (portStillAvailable(uploadPortName))) {
382+     uploadSerialListMenu. setLabel(emptyUploadPortMenuLabel);
383+     uploadSerialListMenu. close();
384+     uploadSerialListMenu. setMouseOver(false );
385+     uploadPortName =  " UPLOAD_PORT"  ;
386+   }
387+   if  (! (portStillAvailable(debugPortName))) {
388+     debugSerialListMenu. setLabel(emptyDebugPortMenuLabel);
389+     debugSerialListMenu. close();
390+     debugSerialListMenu. setMouseOver(false );
391+     debugPortName =  " DEBUG_PORT"  ;
392+     
393+   }
375394}
376395
377396
0 commit comments