@@ -5,23 +5,23 @@ import * as cp from "child_process";
55import  *  as  fs  from  "fs" ; 
66import  *  as  open  from  "open" ; 
77import  *  as  path  from  "path" ; 
8- import  *  as  utils  from  "./extension_utils/utils" ; 
98import  *  as  vscode  from  "vscode" ; 
109import  { 
1110  CONFIG , 
1211  CONSTANTS , 
1312  CPX_CONFIG_FILE , 
1413  DialogResponses , 
14+   SERVER_INFO , 
1515  TelemetryEventName , 
16-   WebviewMessages , 
17-   SERVER_INFO 
16+   WebviewMessages 
1817}  from  "./constants" ; 
1918import  {  CPXWorkspace  }  from  "./cpxWorkspace" ; 
20- import  {  SimulatorDebugConfigurationProvider  }  from  "./simulatorDebugConfigurationProvider" ; 
19+ import  {  DebuggerCommunicationServer  }  from  "./debuggerCommunicationServer" ; 
20+ import  *  as  utils  from  "./extension_utils/utils" ; 
2121import  {  SerialMonitor  }  from  "./serialMonitor" ; 
22+ import  {  SimulatorDebugConfigurationProvider  }  from  "./simulatorDebugConfigurationProvider" ; 
2223import  TelemetryAI  from  "./telemetry/telemetryAI" ; 
2324import  {  UsbDetector  }  from  "./usbDetector" ; 
24- import  {  DebuggerCommunicationServer  }  from  "./debuggerCommunicationServer" ; 
2525
2626let  currentFileAbsPath : string  =  "" ; 
2727let  currentTextDocument : vscode . TextDocument ; 
@@ -830,13 +830,13 @@ const updateCurrentFileIfPython = async (
830830} ; 
831831
832832const  handleButtonPressTelemetry  =  ( buttonState : any )  =>  { 
833-   if  ( buttonState [ " button_a" ]  &&  buttonState [ " button_b" ] )  { 
833+   if  ( buttonState . button_a  &&  buttonState . button_b )  { 
834834    telemetryAI . trackFeatureUsage ( TelemetryEventName . SIMULATOR_BUTTON_AB ) ; 
835-   }  else  if  ( buttonState [ " button_a" ] )  { 
835+   }  else  if  ( buttonState . button_a )  { 
836836    telemetryAI . trackFeatureUsage ( TelemetryEventName . SIMULATOR_BUTTON_A ) ; 
837-   }  else  if  ( buttonState [ " button_b" ] )  { 
837+   }  else  if  ( buttonState . button_b )  { 
838838    telemetryAI . trackFeatureUsage ( TelemetryEventName . SIMULATOR_BUTTON_B ) ; 
839-   }  else  if  ( buttonState [ " switch" ] )  { 
839+   }  else  if  ( buttonState . switch )  { 
840840    telemetryAI . trackFeatureUsage ( TelemetryEventName . SIMULATOR_SWITCH ) ; 
841841  } 
842842} ; 
@@ -872,9 +872,9 @@ const handleSensorTelemetry = (sensor: string) => {
872872} ; 
873873
874874const  checkForTelemetry  =  ( sensorState : any )  =>  { 
875-   if  ( sensorState [ " shake" ] )  { 
875+   if  ( sensorState . shake )  { 
876876    handleSensorTelemetry ( "shake" ) ; 
877-   }  else  if  ( sensorState [ " touch" ] )  { 
877+   }  else  if  ( sensorState . touch )  { 
878878    handleSensorTelemetry ( "touch" ) ; 
879879  } 
880880} ; 
0 commit comments