##############################################################################
# Copyright 2008 MBARI.                                                      #
# Monterey Bay Aquarium Research Institute Proprietary Information.          #
# All rights reserved.                                                       #
##############################################################################
set lxa 25
set lxb 180
set lxc 330
set lya 5
set lyb 20

set sxa1 [expr { $lxa + 85 }]
set sxa2 [expr { $sxa1 + 10 }]
set sxb1 [expr { $lxb + 80 }]
set sxb2 [expr { $sxb1 + 10 }]
set sxc1 [expr { $lxc + 95 }]
set sxc2 [expr { $sxc1 + 10 }]
set sya1 5
set sya2 [expr { $sya1 + 10 }]
set syb1 20
set syb2 [expr { $syb1 + 10 }]

set con_stat 0
set mov_stat 0
set mid_stat 0
set ben_stat 0
set dvl_stat 0
set spr_stat 0

proc set_con_stat { color } {
    global con_stat sxa1 sya1 sxa2 sya2

    .pilot_interface.status_can delete $con_stat
    set con_stat [ .pilot_interface.status_can create rectangle $sxa1 $sya1 $sxa2 $sya2 -fill $color ]
}

proc set_mov_stat { color } {
    global mov_stat sxa1 syb1 sxa2 syb2

    .pilot_interface.status_can delete $mov_stat
    set mov_stat [ .pilot_interface.status_can create rectangle $sxa1 $syb1 $sxa2 $syb2 -fill $color ]
}

proc set_mid_stat { color } {
    global mid_stat sxb1 sya1 sxb2 sya2

    .pilot_interface.status_can delete $mid_stat
    set mid_stat [ .pilot_interface.status_can create rectangle $sxb1 $sya1 $sxb2 $sya2 -fill $color ]
}

proc set_ben_stat { color } {
    global ben_stat sxb1 syb1 sxb2 syb2

    .pilot_interface.status_can delete $ben_stat
    set ben_stat [ .pilot_interface.status_can create rectangle $sxb1 $syb1 $sxb2 $syb2 -fill $color ]
}

proc set_dvl_stat { color } {
    global dvl_stat sxc1 sya1 sxc2 sya2

    .pilot_interface.status_can delete $dvl_stat
    set dvl_stat [ .pilot_interface.status_can create rectangle $sxc1 $sya1 $sxc2 $sya2 -fill $color ]
}

proc set_spr_stat { color } {
    global spr_stat sxc1 syb1 sxc2 syb2

    .pilot_interface.status_can delete $spr_stat
    set spr_stat [ .pilot_interface.status_can create rectangle $sxc1 $syb1 $sxc2 $syb2 -fill $color ]
}



