proc gui_init {} {
global watchdog polarity segdetect
gui "M A2 0"
-# gui "M A5 0 J"
-# gui "M A6 0 J"
+ gui "M A5 0 J"
+ gui "M A6 0 J"
+ gui "EOE"
if {[info exists watchdog]} { gui "P 1" }
gui_polarity
foreach seg [array names segdetect] {
catch { after cancel $watchdog; unset watchdog }
puts "failing $m"
tellpic 9801 ;# 16ms
- after 10000 fail_now
+ after 1000 fail_now
fileevent $p readable {}
}
pt_must $thenpoint $thenpos
}
+proc badwatchdog {} {
+ global pq
+ puts "watchdog - oh well"
+ if {![info exists pq]} { set pq {} }
+}
+
proc pm_charged {} {
global pq
if {[llength $pq]} {
01 - 02 { tellnmra $m }
09 { fp $m; pm_hello }
07 { puts "short circuit"; exit 1 }
+ 0d { fp $m; badwatchdog }
28 { fp $m; pm_charged }
9[0-7] { fp $m; pm_maydetect 0 $v }
9? { fp $m; pm_maydetect 1 $v }
global speeddirn_fixed; set speeddirn_fixed {speed126 2 126 0}
}
proc ask_slow {} {
- global speeddirn_fixed; set speeddirn_fixed {speed126 2 126 10}
+ global speeddirn_fixed; set speeddirn_fixed {speed126 2 10 0}
}
proc ask_randspeed {} {
global speeddirn_fixed; catch { unset speeddirn_fixed }