Check-in [519803a9b5]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected typos.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:519803a9b5aa6fe3df3beb34b90b30fadac1f261abb2fc6dd2046f629822a2a8
User & Date: gwlester 2018-02-02 01:58:12
Context
2018-02-06
04:58
Did place holder work on the configuration panel. check-in: 4e4c79c176 user: gwlester tags: trunk
2018-02-02
01:58
Corrected typos. check-in: 519803a9b5 user: gwlester tags: trunk
2018-02-01
00:35
Initial GUI design. Still need to design the configuration tab. check-in: 199f0f198c user: gwlester tags: trunk
Changes

Name change from Gryo_Example.tcl to Gyro_Example.tcl.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
...
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
## Copyright 2018, Gerald W. Lester
##
## This program utilizes a BSD copyright, please see the license file in the
## same directory.
##
## This program is loosely based on a C program by the same name from Dexter
## Industries. See
##   https://github.com/DexterInd/DI_LEGO_NXT/blob/master/dIMU/RobotC/Gryo_Example.c
##
## It utilizes the low leve bno055 package.
##

lappend atuo_path [file dirname [info script]] [pwd]
::tcl::tm::path add [file dirname [info script]] [pwd]

................................................................................
    500dps  0x10
    2000dps 0x30
    250dps,divisor 128.0
    500dps,divisor 64.0
    2000dps,divisor 16.0
    divisor 16.0
    full_scale_range 0x30
    gryo,x,axis 0x14
    gryo,y,axis 0x16
    gryo,z,axis 0x18
    rate 50
    digits 5
    decimals 1
    minChange 0.1
}

set i2cbus 1
................................................................................
    return;
}

##
## Gyro: gets a full axis reading, scaled to the full scale reading.  Returns
## in degrees per second.
##
proc GryoAxisGeading {axis oldValue} {
    global GyroValues

    set handle $GyroValues(handle)
    set intValue [bno055 readRegister $handle gyr,data,$axis]
    set digits $GyroValues(digits)
    set decimals $GyroValues(decimals)
    incr digits $decimals
................................................................................
        after cancel $GyroValues(afterId)
    }
    set GyroValues(afterId) [after [expr {$GyroValues(rate) * 10}] ReadGyro]

    ##
    ## Read the GYROSCOPE
    ##
    set x [GryoAxisGeading x $CurrentValue(x)]
    set y [GryoAxisGeading y $CurrentValue(y)]
    set z [GryoAxisGeading z $CurrentValue(z)]
    if {$x != $CurrentValue(x) ||
        $y != $CurrentValue(y) ||
        $z != $CurrentValue(z)
    } {
        LogValues $x $y $z
    }
    







|







 







|
|
|







 







|







 







|
|
|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
...
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
## Copyright 2018, Gerald W. Lester
##
## This program utilizes a BSD copyright, please see the license file in the
## same directory.
##
## This program is loosely based on a C program by the same name from Dexter
## Industries. See
##   https://github.com/DexterInd/DI_LEGO_NXT/blob/master/dIMU/RobotC/Gyro_Example.c
##
## It utilizes the low leve bno055 package.
##

lappend atuo_path [file dirname [info script]] [pwd]
::tcl::tm::path add [file dirname [info script]] [pwd]

................................................................................
    500dps  0x10
    2000dps 0x30
    250dps,divisor 128.0
    500dps,divisor 64.0
    2000dps,divisor 16.0
    divisor 16.0
    full_scale_range 0x30
    gyro,x,axis 0x14
    gyro,y,axis 0x16
    gyro,z,axis 0x18
    rate 50
    digits 5
    decimals 1
    minChange 0.1
}

set i2cbus 1
................................................................................
    return;
}

##
## Gyro: gets a full axis reading, scaled to the full scale reading.  Returns
## in degrees per second.
##
proc GyroAxisGeading {axis oldValue} {
    global GyroValues

    set handle $GyroValues(handle)
    set intValue [bno055 readRegister $handle gyr,data,$axis]
    set digits $GyroValues(digits)
    set decimals $GyroValues(decimals)
    incr digits $decimals
................................................................................
        after cancel $GyroValues(afterId)
    }
    set GyroValues(afterId) [after [expr {$GyroValues(rate) * 10}] ReadGyro]

    ##
    ## Read the GYROSCOPE
    ##
    set x [GyroAxisGeading x $CurrentValue(x)]
    set y [GyroAxisGeading y $CurrentValue(y)]
    set z [GyroAxisGeading z $CurrentValue(z)]
    if {$x != $CurrentValue(x) ||
        $y != $CurrentValue(y) ||
        $z != $CurrentValue(z)
    } {
        LogValues $x $y $z
    }
    

Changes to Multisensor_Example.tcl.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
...
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
## Copyright 2018, Gerald W. Lester
##
## This program utilizes a BSD copyright, please see the license file in the
## same directory.
##
## This program is loosely based on a C program by the same name from Dexter
## Industries. See
##   https://github.com/DexterInd/DI_LEGO_NXT/blob/master/dIMU/RobotC/Gryo_Example.c
##
## It utilizes the low leve bno055 package.
##

lappend atuo_path [file dirname [info script]] [pwd]
::tcl::tm::path add [file dirname [info script]] [pwd]

................................................................................
    500dps  0x10
    2000dps 0x30
    250dps,divisor 128.0
    500dps,divisor 64.0
    2000dps,divisor 16.0
    divisor 16.0
    full_scale_range 0x30
    gryo,x,axis 0x14
    gryo,y,axis 0x16
    gryo,z,axis 0x18
    rate 50
    digits 5
    decimals 1
    minChange 0.1
}

set i2cbus 1
................................................................................
    return;
}

##
## Gyro: gets a full axis reading, scaled to the full scale reading.  Returns
## in degrees per second.
##
proc GryoAxisReading {axis oldValue} {
    global GyroValues

    set handle $GyroValues(handle)
    set intValue [bno055 readRegister $handle gyr,data,$axis]
    set digits $GyroValues(digits)
    set decimals $GyroValues(decimals)
    incr digits $decimals
................................................................................
        after cancel $GyroValues(afterId)
    }
    set GyroValues(afterId) [after [expr {$GyroValues(rate) * 10}] ReadGyro]

    ##
    ## Read the GYROSCOPE
    ##
    set x [GryoAxisReading x $CurrentValue(x)]
    set y [GryoAxisReading y $CurrentValue(y)]
    set z [GryoAxisReading z $CurrentValue(z)]
    if {$x != $CurrentValue(x) ||
        $y != $CurrentValue(y) ||
        $z != $CurrentValue(z)
    } {
        LogValues $x $y $z
    }

................................................................................
    grid configure .main -sticky nsew
    grid columnconfigure . .main -weight 1
    grid rowconfigure . .main -weight 1
    
    ttk::frame .main.configuration
    .main add .main.configuration -text {Configuration}
    ttk::frame .main.gyroscope
    .main add .main.gyroscope -text {Gryoscope}
    ttk::frame .main.accelerometer
    .main add .main.accelerometer -text {Accelerometer}
    ttk::frame .main.magnetometer
    .main add .main.magnetometer -text {Magnetometer}
    ttk::frame .main.gravity
    .main add .main.gravity -text {Gravity}
    ttk::frame .main.linearAcceleration







|







 







|
|
|







 







|







 







|
|
|







 







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
...
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
## Copyright 2018, Gerald W. Lester
##
## This program utilizes a BSD copyright, please see the license file in the
## same directory.
##
## This program is loosely based on a C program by the same name from Dexter
## Industries. See
##   https://github.com/DexterInd/DI_LEGO_NXT/blob/master/dIMU/RobotC/Gyro_Example.c
##
## It utilizes the low leve bno055 package.
##

lappend atuo_path [file dirname [info script]] [pwd]
::tcl::tm::path add [file dirname [info script]] [pwd]

................................................................................
    500dps  0x10
    2000dps 0x30
    250dps,divisor 128.0
    500dps,divisor 64.0
    2000dps,divisor 16.0
    divisor 16.0
    full_scale_range 0x30
    gyro,x,axis 0x14
    gyro,y,axis 0x16
    gyro,z,axis 0x18
    rate 50
    digits 5
    decimals 1
    minChange 0.1
}

set i2cbus 1
................................................................................
    return;
}

##
## Gyro: gets a full axis reading, scaled to the full scale reading.  Returns
## in degrees per second.
##
proc GyroAxisReading {axis oldValue} {
    global GyroValues

    set handle $GyroValues(handle)
    set intValue [bno055 readRegister $handle gyr,data,$axis]
    set digits $GyroValues(digits)
    set decimals $GyroValues(decimals)
    incr digits $decimals
................................................................................
        after cancel $GyroValues(afterId)
    }
    set GyroValues(afterId) [after [expr {$GyroValues(rate) * 10}] ReadGyro]

    ##
    ## Read the GYROSCOPE
    ##
    set x [GyroAxisReading x $CurrentValue(x)]
    set y [GyroAxisReading y $CurrentValue(y)]
    set z [GyroAxisReading z $CurrentValue(z)]
    if {$x != $CurrentValue(x) ||
        $y != $CurrentValue(y) ||
        $z != $CurrentValue(z)
    } {
        LogValues $x $y $z
    }

................................................................................
    grid configure .main -sticky nsew
    grid columnconfigure . .main -weight 1
    grid rowconfigure . .main -weight 1
    
    ttk::frame .main.configuration
    .main add .main.configuration -text {Configuration}
    ttk::frame .main.gyroscope
    .main add .main.gyroscope -text {Gyroscope}
    ttk::frame .main.accelerometer
    .main add .main.accelerometer -text {Accelerometer}
    ttk::frame .main.magnetometer
    .main add .main.magnetometer -text {Magnetometer}
    ttk::frame .main.gravity
    .main add .main.gravity -text {Gravity}
    ttk::frame .main.linearAcceleration