-race between cdu off (due to watchdog or short) and points
-
-
layout polarity diagram colourful segment encoding:
make moveable feature selection in subseg2display bitwise rather than
setwise
> 0 0010 000 (10) OFF Power off
;> 00000000 CRASHED Acknowledge panic, go to readout mode
-;> 00001002 (0a) TELLMODE Confirm mode - say HELLO or CRASHED
+;> 00001010 (0a) TELLMODE Confirm mode - say HELLO or CRASHED
; if crashed, undoes the effect of ack
; In crash readout mode:
< 0 000 1001 (HT) HELLO I am booted
< 0 000 1011 (VT) AAARGH Followed by debug chars (only)
< 0 000 1101 (CR) WTIMEOUT Watchdog timeout happened
+ < 0 000 1110 (SO) NOPOINT Point fired when CDU off
< 0 000 0111 (BEL) FAULT Fault exists
< 0 000 0110 (ACK) FIXED Fault now fixed
< 0 0100 PPP (20+) POINTED Point change done using capacitor P
is recharging <----POINTED---- Point is changing
+If the CDU is turned off (the disabled and fault states from the power
+state diagram, above), a POINT command will not result in a panic but
+rather produce only an immediate NOPOINT message. (This must not be a
+panic because the POINT command may already be en-route when a FAULT
+occurs.)
+
PING and PONG
-------------
bra command_point_busy
tst_f_ifnz cducharging
- bra command_point_cduempty
+ bra command_point_ifcduempty
swap_fw POSTINC0 ; W = 0SSS 1010
and_lw 0x70 ; W = 0SSS 0000
command_point_badmsg panic morse_PX
command_point_busy panic morse_PB
-command_point_cduempty panic morse_PC
+
+;----------
+command_point_ifcduempty
+ pinlat_ifh p0_cdu_enable
+ bra command_point_cducharging
+ ; state `Charging' but not really since it's disabled, ie Off:
+ mov_lw b'00001110' ; POINTED
+ goto serial_addbyte
+
+command_point_cducharging panic morse_PC
;----------
command_point_ifslave
if (sta_state <= Sta_Settling) return;
/* fixme do something here */
}
+
+void on_pic_nopoint(const PicInsnInfo *pii, const PicInsn *pi, int objnum) {
+ /* fixme perhaps log this if it was unexpected */
+}