Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Partial changes to GUI. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: | cbfaf8f5375eac33ceb0ab7026a1b30679d291622fe8a43fff16da2600caecf0 |
User & Date: | gwlester 2018-02-06 21:30:08 |
Context
2018-02-06
| ||
22:46 | Corrected typos check-in: 553977a1bf user: gwlester tags: trunk | |
21:30 | Partial changes to GUI. check-in: cbfaf8f537 user: gwlester tags: trunk | |
04:58 | Did place holder work on the configuration panel. check-in: 4e4c79c176 user: gwlester tags: trunk | |
Changes
Changes to Multisensor_Example.tcl.
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 ... 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 ... 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 ... 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 ... 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 ... 477 478 479 480 481 482 483 484 485 486 487 488 489 490 |
CreateMagnetometerFrame .main.magnetometer CreateGravityFrame .main.gravity CreateLinearAccelerationFrame .main.linearAcceleration CreateQuaternionFrame .main.quaternion CreatePitchRollHeadingFrame .main.prh } proc CreateConfigurationFrame {w} { set general $w.gen set accel $w.acc set gyro $w.gyro set mag $w.mag set control $w.controls ttk::labelframe $general \ -text "General" ttk::labelframe $accel \ -text "Accelerometer" ttk::labelframe $gyro \ -text "Gyrometer" ttk::labelframe $mag \ -text "Magnetometer" ttk::frame $control grid configure $general -sticky nsew -pady 2 grid configure $accel -sticky nsew -pady 2 grid configure $gyro -sticky nsew -pady 2 grid configure $mag -sticky nsew -pady 2 grid configure $control -sticky nsew -pady 4 grid columnconfigure $w $mag -weight 1 grid rowconfigure $w 5 -weight 1 ## ## General Configuration group ## ttk::label $general.busLbl \ -text {I2C Bus:} ttk::combobox $general.busCMB \ -textvariable ::i2cbus \ ................................................................................ -text {Refresh Rate:} ttk::spinbox $general.rateEnt \ -from 50.0 \ -to 500.0 \ -increment 10.0 \ -format {%3.0f} \ -wrap no \ -command [format {set ::GyroValues(rate) [expr {entier([%1$s get])}]} $control.rateEnt] ttk::label $general.rateLbl2 \ -text { in microseconds} $general.rateEnt set 50.0 grid configure $general.busLbl $general.busCMB x x -padx 2 -sticky ew grid configure $general.addrLbl $general.addrEnt x x -padx 2 -sticky ew grid configure $general.rateLbl1 $general.rateEnt $general.rateLbl2 x -padx 2 -sticky ew grid columnconfigure $general $general.addrEnt -uniform entry grid columnconfigure $general 3 -weight 1 ## ## Accelerometer group ## ttk::label $accel.rangeLbl \ -text {Range:} ttk::combobox $accel.rangeCMB \ -textvariable ::range \ ................................................................................ -to 200.0 \ -increment 0.1 \ -format {%5.1f} \ -wrap no \ -textvariable ::AccelValues(minChange) ttk::label $accel.minChangeLbl2 \ -text {dps change} grid configure $accel.rangeLbl $accel.rangeCMB x x -padx 2 -sticky ew grid configure $accel.numDigitsLbl $accel.numDigitsCMB x x -padx 2 -sticky ew grid configure $accel.numDecimalsLbl $accel.numDecimalsCMB x x -padx 2 -sticky ew grid configure $accel.minChangeLbl1 $accel.minChangeEnt $accel.minChangeLbl2 x -padx 2 -sticky ew grid columnconfigure $accel 3 -weight 1 $accel.minChangeEnt set $::AccelValues(minChange) ## ## Gyrometer ## ttk::label $gyro.rangeLbl \ -text {Range:} ttk::combobox $gyro.rangeCMB \ -textvariable ::range \ ................................................................................ -to 200.0 \ -increment 0.1 \ -format {%5.1f} \ -wrap no \ -textvariable ::GyroValues(minChange) ttk::label $gyro.minChangeLbl2 \ -text {dps change} grid configure $gyro.rangeLbl $gyro.rangeCMB x x -padx 2 -sticky ew grid configure $gyro.numDigitsLbl $gyro.numDigitsCMB x x -padx 2 -sticky ew grid configure $gyro.numDecimalsLbl $gyro.numDecimalsCMB x x -padx 2 -sticky ew grid configure $gyro.minChangeLbl1 $gyro.minChangeEnt $gyro.minChangeLbl2 x -padx 2 -sticky ew grid columnconfigure $gyro 3 -weight 1 $gyro.minChangeEnt set $::GyroValues(minChange) ## ## Magnetometer group ## ttk::label $mag.rangeLbl \ -text {Range:} ttk::combobox $mag.rangeCMB \ -textvariable ::range \ ................................................................................ -to 200.0 \ -increment 0.1 \ -format {%5.1f} \ -wrap no \ -textvariable ::MagValues(minChange) ttk::label $mag.minChangeLbl2 \ -text {dps change} grid configure $mag.rangeLbl $mag.rangeCMB x x -padx 2 -sticky ew grid configure $mag.numDigitsLbl $mag.numDigitsCMB x x -padx 2 -sticky ew grid configure $mag.numDecimalsLbl $mag.numDecimalsCMB x x -padx 2 -sticky ew grid configure $mag.minChangeLbl1 $mag.minChangeEnt $mag.minChangeLbl2 x -padx 2 -sticky ew grid columnconfigure $mag 3 -weight 1 $mag.minChangeEnt set $::MagValues(minChange) ## ## Buttons Group ## ttk::button $control.start \ -text {Start} \ -width 6 \ -command StartReading ................................................................................ ttk::button $control.stop \ -state disabled \ -text {Stop} \ -width 6 \ -command StopReading grid configure x $control.start x $control.stop x -sticky ew grid columnconfigure $control {0 2 4} -weight 1 } proc CreateGyroFrame {w} { ttk::labelframe $w.readings \ -text {Current Readings} ttk::labelframe $w.history \ |
| < < < < < < < < < < < < < < < < < < < < < < < | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 ... 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 ... 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 ... 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 ... 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 ... 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
CreateMagnetometerFrame .main.magnetometer CreateGravityFrame .main.gravity CreateLinearAccelerationFrame .main.linearAcceleration CreateQuaternionFrame .main.quaternion CreatePitchRollHeadingFrame .main.prh } proc CreateGeneralConfigFrame {general} { ## ## General Configuration group ## ttk::label $general.busLbl \ -text {I2C Bus:} ttk::combobox $general.busCMB \ -textvariable ::i2cbus \ ................................................................................ -text {Refresh Rate:} ttk::spinbox $general.rateEnt \ -from 50.0 \ -to 500.0 \ -increment 10.0 \ -format {%3.0f} \ -wrap no \ -command [format {set ::GyroValues(rate) [expr {entier([%1$s get])}]} $general.rateEnt] ttk::label $general.rateLbl2 \ -text { in microseconds} ttk::label $general.operLbl1 \ -text {Operational Mode} # change values to be human readable ttk::combobox $general.operCMB \ -textvariable ::Configuration(operMode) \ -values {configmode acconly magonly gyroonly accmag accgyro maggyro amg imu compass m4g ndof_fmc_off ndof} \ -state readonly # put a trace on opermode to ttk::label $general.pwrLbl1 \ -text {Power Mode} ttk::combobox $general.pwrCMB \ -textvariable ::Configuration(pwrMode) \ -values {normal low suspend} \ -state readonly # Add axis remap and axis sign # Add self test results # Add clock select if sys_clk_status is true # Reset interupt # Reset system # Add self test trigger # Fusion Unit Type (Andriod vs Windows) # System Calibration status # Unique ID # Add temp source # Add Temp units # Add Temp reading # Add EUL units # Add System Status # Add System Error Code grid configure $general.busLbl $general.busCMB x x -padx 2 -pady 2 -sticky ew grid configure $general.addrLbl $general.addrEnt x x -padx 2 -pady 2 -sticky ew grid configure $general.rateLbl1 $general.rateEnt $general.rateLbl2 x -padx 2 -pady 2 -sticky ew grid configure $general.operLbl1 $general.operCMB x x -padx 2 -pady 2 -sticky ew grid configure $general.pwrLbl1 $general.pwrCMB x x -padx 2 -pady 2 -sticky ew grid columnconfigure $general $general.addrEnt -uniform entry grid columnconfigure $general 3 -weight 1 $general.rateEnt set 50.0 } proc CreateAccelConfigFrame {accel} { ## ## Accelerometer group ## ttk::label $accel.rangeLbl \ -text {Range:} ttk::combobox $accel.rangeCMB \ -textvariable ::range \ ................................................................................ -to 200.0 \ -increment 0.1 \ -format {%5.1f} \ -wrap no \ -textvariable ::AccelValues(minChange) ttk::label $accel.minChangeLbl2 \ -text {dps change} # Add ACC units # Add Self Test status # Add Calibration status # Add Unit Select # Add offsets # Add radius # Add Acc No Motion Interrupt Status # Add Acc Any Motion Interrupt Status # Add Acc High G Interrupt Status # Add Acc Any Motion Threashold # Add Acc Any Motion Duration # Add Acc No Motion Threashold # Add Acc Any / No Motion X, Y and Z axis enable # Add Acc High G X, Y and Z axis enable # Add Acc High G Threashold # Add Acc High G Duration # Add Acc Power Mode # Add Acc Bandwidth # Add Acc Sleep Mode # Add Acc Sleep Duration grid configure $accel.rangeLbl $accel.rangeCMB x x -padx 2 -pady 2 -sticky ew grid configure $accel.numDigitsLbl $accel.numDigitsCMB x x -padx 2 -pady 2 -sticky ew grid configure $accel.numDecimalsLbl $accel.numDecimalsCMB x x -padx 2 -pady 2 -sticky ew grid configure $accel.minChangeLbl1 $accel.minChangeEnt $accel.minChangeLbl2 x -padx 2 -pady 2 -sticky ew grid columnconfigure $accel 3 -weight 1 $accel.minChangeEnt set $::AccelValues(minChange) } proc CreateGyroConfigFrame {gyro} { ## ## Gyrometer ## ttk::label $gyro.rangeLbl \ -text {Range:} ttk::combobox $gyro.rangeCMB \ -textvariable ::range \ ................................................................................ -to 200.0 \ -increment 0.1 \ -format {%5.1f} \ -wrap no \ -textvariable ::GyroValues(minChange) ttk::label $gyro.minChangeLbl2 \ -text {dps change} # Add Self Test status # Add Calibration status # Add Unit Select # Add offsets # Add Gyro High Rate Interrupt Status # Add Gyro Any Motion Interrupt Status # Add Gyro Any Motion Threashold # Add Gyro Any Motion Duration # Add Gyro Any Motion X, Y and Z axis enable # Add Gyro High Rate X, Y and Z axis enable # Add Gyro High Rate Threashold # Add Gyro High Rate Duration # Add Gyro Power Mode # Add Gyro Bandwidth # Add Gyro Sleep Mode # Add Gyro Sleep Duration grid configure $gyro.rangeLbl $gyro.rangeCMB x x -padx 2 -sticky ew grid configure $gyro.numDigitsLbl $gyro.numDigitsCMB x x -padx 2 -sticky ew grid configure $gyro.numDecimalsLbl $gyro.numDecimalsCMB x x -padx 2 -sticky ew grid configure $gyro.minChangeLbl1 $gyro.minChangeEnt $gyro.minChangeLbl2 x -padx 2 -sticky ew grid columnconfigure $gyro 3 -weight 1 $gyro.minChangeEnt set $::GyroValues(minChange) } proc CreateMagConfigFrame {mag} { ## ## Magnetometer group ## ttk::label $mag.rangeLbl \ -text {Range:} ttk::combobox $mag.rangeCMB \ -textvariable ::range \ ................................................................................ -to 200.0 \ -increment 0.1 \ -format {%5.1f} \ -wrap no \ -textvariable ::MagValues(minChange) ttk::label $mag.minChangeLbl2 \ -text {dps change} # Add Self Test status # Add Calibration status # Add Unit Select # Add offsets # Add radius # Add Mag Power Mode # Add Mag Operation Mode # Add Mag Data Output Rate grid configure $mag.rangeLbl $mag.rangeCMB x x -padx 2 -pady 2 -sticky ew grid configure $mag.numDigitsLbl $mag.numDigitsCMB x x -padx 2 -pady 2 -sticky ew grid configure $mag.numDecimalsLbl $mag.numDecimalsCMB x x -padx 2 -pady 2 -sticky ew grid configure $mag.minChangeLbl1 $mag.minChangeEnt $mag.minChangeLbl2 x -padx 2 -pady 2 -sticky ew grid columnconfigure $mag 3 -weight 1 $mag.minChangeEnt set $::MagValues(minChange) } proc CreateControlConfigFrame {control} { ## ## Buttons Group ## ttk::button $control.start \ -text {Start} \ -width 6 \ -command StartReading ................................................................................ ttk::button $control.stop \ -state disabled \ -text {Stop} \ -width 6 \ -command StopReading grid configure x $control.start x $control.stop x -sticky ew grid columnconfigure $control {0 2 4} -weight 1 } proc CreateConfigurationFrame {w} { set general $w.gen set accel $w.acc set gyro $w.gyro set mag $w.mag set control $w.controls ttk::labelframe $general \ -text "General" ttk::labelframe $accel \ -text "Accelerometer" ttk::labelframe $gyro \ -text "Gyrometer" ttk::labelframe $mag \ -text "Magnetometer" ttk::frame $control grid configure $general -sticky nsew -pady 2 -padx 4 -ipady 4 grid configure $accel -sticky nsew -pady 2 -padx 4 -ipady 4 grid configure $gyro -sticky nsew -pady 2 -padx 4 -ipady 4 grid configure $mag -sticky nsew -pady 2 -padx 4 -ipady 4 grid configure $control -sticky nsew -pady 4 grid columnconfigure $w $mag -weight 1 grid rowconfigure $w 5 -weight 1 CreateGeneralConfigFrame $general CreateAccelConfigFrame $accel CreateGyroConfigFrame $gyro CreateMagConfigFrame $mag CreateControlConfigFrame $control } proc CreateGyroFrame {w} { ttk::labelframe $w.readings \ -text {Current Readings} ttk::labelframe $w.history \ |