Implicit setting type to part/drivable if not set explicitly

This commit is contained in:
Douglas Clowes
2014-03-18 15:02:39 +11:00
parent 2db71ba537
commit 9f8eabd3ec
5 changed files with 23 additions and 11 deletions

View File

@@ -160,6 +160,7 @@ proc ::scobj::tank::mk_sct_tank { sct_controller name } {
hsetprop ${scobj_hpath}/limits/forward mutable false
hsetprop ${scobj_hpath}/limits/forward nxsave true
hsetprop ${scobj_hpath}/limits/forward oldval UNKNOWN
hsetprop ${scobj_hpath}/limits/forward type "part"
hfactory ${scobj_hpath}/limits/reverse plain user text
hsetprop ${scobj_hpath}/limits/reverse read ${ns}::getValue ${scobj_hpath} read_switch {MG _LRH}
@@ -169,6 +170,7 @@ proc ::scobj::tank::mk_sct_tank { sct_controller name } {
hsetprop ${scobj_hpath}/limits/reverse mutable false
hsetprop ${scobj_hpath}/limits/reverse nxsave true
hsetprop ${scobj_hpath}/limits/reverse oldval UNKNOWN
hsetprop ${scobj_hpath}/limits/reverse type "part"
if {[SplitReply [motor_simulation]]=="false"} {
${sct_controller} poll ${scobj_hpath}/limits/forward 1
@@ -185,6 +187,7 @@ proc ::scobj::tank::mk_sct_tank { sct_controller name } {
hsetprop ${scobj_hpath}/switches/forward mutable false
hsetprop ${scobj_hpath}/switches/forward nxsave true
hsetprop ${scobj_hpath}/switches/forward oldval UNKNOWN
hsetprop ${scobj_hpath}/switches/forward type "part"
hfactory ${scobj_hpath}/switches/reverse plain user text
hsetprop ${scobj_hpath}/switches/reverse read ${ns}::getValue ${scobj_hpath} read_switch {MG @IN[6]}
@@ -194,6 +197,7 @@ proc ::scobj::tank::mk_sct_tank { sct_controller name } {
hsetprop ${scobj_hpath}/switches/reverse mutable false
hsetprop ${scobj_hpath}/switches/reverse nxsave true
hsetprop ${scobj_hpath}/switches/reverse oldval UNKNOWN
hsetprop ${scobj_hpath}/switches/reverse type "part"
if {[SplitReply [motor_simulation]]=="false"} {
${sct_controller} poll ${scobj_hpath}/switches/forward 1