From b856aa02c21b47af145de0b059c7602474c9a640 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 8 Jun 2008 16:28:00 +0000 Subject: [PATCH] crash on FAULT --- hostside/startup.c | 6 +----- hostside/stastate.h.gen | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/hostside/startup.c b/hostside/startup.c index e8a4cb7..2d38116 100644 --- a/hostside/startup.c +++ b/hostside/startup.c @@ -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: diff --git a/hostside/stastate.h.gen b/hostside/stastate.h.gen index 951921f..d05ce1c 100755 --- a/hostside/stastate.h.gen +++ b/hostside/stastate.h.gen @@ -7,7 +7,6 @@ Sta () { l="$l $1"; } Sta Off Sta Manual Sta Ping - Sta Fault Sta Settling Sta Resolving Sta Finalising -- 2.30.2