chiark / gitweb /
crash on FAULT
authorian <ian>
Sun, 8 Jun 2008 16:28:00 +0000 (16:28 +0000)
committerian <ian>
Sun, 8 Jun 2008 16:28:00 +0000 (16:28 +0000)
hostside/startup.c
hostside/stastate.h.gen

index e8a4cb70936514c38762696b7f59b4ab163596ed..2d38116af3b18ec7bb4c15a6599f7af2cef55138 100644 (file)
@@ -110,7 +110,6 @@ static void sta_goto(StartupState new_state) {
   case Sta_Off:                                    break;
   case Sta_Manual:                                 abort();
   case Sta_Ping:                                   break;
-  case Sta_Fault:                                  break;
   case Sta_Settling:   sta_toev.duration=   750;   break;
   case Sta_Resolving:  sta_toev.duration=   500;   break;
   case Sta_Finalising:                             break;
@@ -130,7 +129,6 @@ static void sta_goto(StartupState new_state) {
   case Sta_Off:   if (sta_state > Sta_Ping) enco_pic_off(&piob);   break;
   case Sta_Manual:                                                 abort();
   case Sta_Ping:                                                   break;
-  case Sta_Fault:                                                  break;
   case Sta_Settling:   waggle_settle();     enco_pic_off(&piob);   break;
   case Sta_Resolving:
     resolve_begin();
@@ -264,8 +262,7 @@ void on_pic_pong(const PicInsnInfo *pii, const PicInsn *pi, int objnum) {
 
 void on_pic_fault(const PicInsnInfo *pii, const PicInsn *pi, int objnum) {
   if (sta_state <= Sta_Ping) return;
-  if (sta_state == Sta_Fault) die("PIC sent two FAULTs");
-  sta_goto(Sta_Fault);
+  die("FAULT");
 }
 
 void on_pic_wtimeout(const PicInsnInfo *pii, const PicInsn *pi, int objnum) {
@@ -313,7 +310,6 @@ void on_pic_detect1(const PicInsnInfo *pii, const PicInsn *pi, int objnum) {
   case Sta_Off:
   case Sta_Manual:
   case Sta_Ping:
-  case Sta_Fault:
   case Sta_Settling:
     break;
   case Sta_Resolving:
index 951921f78ebf838a531f8d69a678b1397eb12374..d05ce1c95aebb6739abf833ae2fa5dc98cdf772b 100755 (executable)
@@ -7,7 +7,6 @@ Sta () { l="$l $1"; }
   Sta Off
   Sta Manual
   Sta Ping
-  Sta Fault
   Sta Settling
   Sta Resolving
   Sta Finalising