@@ -32,13 +32,13 @@ elf_file = get_elf_file_path() # Get the path to the ELF file from the utility
3232
3333# Initialize the X2CScope with the specified serial port and baud rate
3434# The default baud rate is 115200
35- x2c_scope = X2CScope(port = serial_port, baud_rate = baud_rate, elf_file = elf_file)
35+ x2cScope = X2CScope(port = serial_port, baud_rate = baud_rate, elf_file = elf_file)
3636
3737# Retrieve specific variables from the MCU
38- speed_reference = x2c_scope .get_variable(
38+ speed_reference = x2cScope .get_variable(
3939 " motor.apiData.velocityReference"
4040) # Get the speed reference variable
41- speed_measured = x2c_scope .get_variable(
41+ speed_measured = x2cScope .get_variable(
4242 " motor.apiData.velocityMeasured"
4343) # Get the measured speed variable
4444
@@ -203,7 +203,7 @@ logging.basicConfig(
203203
204204# X2C Scope Set up
205205elf_file = get_elf_file_path()
206- x2c_scope = X2CScope(port = get_com_port(), elf_file = elf_file)
206+ x2cScope = X2CScope(port = get_com_port(), elf_file = elf_file)
207207
208208# Define variables
209209variables = [
@@ -215,9 +215,9 @@ variables = [
215215] # upto 8 variables could be selected.
216216
217217for var in variables:
218- x2c_scope .add_scope_channel(x2c_scope .get_variable(var))
218+ x2cScope .add_scope_channel(x2cScope .get_variable(var))
219219
220- x2c_scope .set_sample_time(1 )
220+ x2cScope .set_sample_time(1 )
221221
222222# Create the plot
223223plt.ion() # Turn on interactive mode
@@ -229,12 +229,12 @@ max_sample = 100 # Increase the number of samples if needed
229229
230230while sample_count < max_sample:
231231 try :
232- if x2c_scope .is_scope_data_ready():
232+ if x2cScope .is_scope_data_ready():
233233 sample_count += 1
234234 logging.info(" Scope data is ready." )
235235
236236 data_storage = {}
237- for channel, data in x2c_scope .get_scope_channel_data(
237+ for channel, data in x2cScope .get_scope_channel_data(
238238 valid_data = False
239239 ).items():
240240 data_storage[channel] = data
@@ -255,7 +255,7 @@ while sample_count < max_sample:
255255
256256 if sample_count >= max_sample:
257257 break
258- x2c_scope .request_scope_data()
258+ x2cScope .request_scope_data()
259259
260260 except Exception as e:
261261 logging.error(f " Error in main loop: { str (e)} " )
0 commit comments