Check-in [553977a1bf]

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:553977a1bf9808a625d5199c853e2c08cab8e08de3e077683f8742d8c97522a9
User & Date: gwlester 2018-02-06 22:46:48
Context
2018-02-07
02:15
Added package require Tcl 6.6 check-in: c732f97210 user: gwlester tags: trunk
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
Changes

Changes to Gyro_Example.tcl.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
...
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
## 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]

package require piio
package require bno055

##
## These bytes set the full scale range of the gyroscope.
................................................................................
    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
    }
    







|







 







|







 







|
|
|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
...
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
## 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 auuo_path [file dirname [info script]] [pwd]
::tcl::tm::path add [file dirname [info script]] [pwd]

package require piio
package require bno055

##
## These bytes set the full scale range of the gyroscope.
................................................................................
    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
    }