From patchwork Fri Jan 9 08:36:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vittorio Gambaletta X-Patchwork-Id: 426951 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7C877140119 for ; Fri, 9 Jan 2015 19:37:42 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id B90BC283DD4; Fri, 9 Jan 2015 09:35:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 179972809BA for ; Fri, 9 Jan 2015 09:35:17 +0100 (CET) X-policyd-weight: using cached result; rate: -7.6 Received: from mail.vittgam.net (server1.vittgam.net [213.239.197.142]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 9 Jan 2015 09:35:16 +0100 (CET) X-DKIM: OpenDKIM Filter v2.4.2 mail.vittgam.net t098bMMs173309 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=vittgam.net; s=20110809; t=1420792643; bh=Jr7KXnrVHvRuOyNcgnTab6RMC9a68TC/zkz7RxfH2Ys=; h=Date:Content-Type:From:Message-Id:To:Subject; b=EJ351MJXIypZPRswy3tLoxy6AoY5aFY6VpkXpDDsrkZDvhXHaCY9E5PgVlX2WH371 DbUUq5LuRqWMpUvQwMN9Q7TOXk1mCpA6QWggbrBysnWT90Hzk/s1oflgas9NGTFOfW J6vXqgCXL7Rz4UutMQHiOa1tB2gHgdKhtub2Oo9I= Received: from mail2.vittgam.net ([10.48.0.5]) by mail.vittgam.net (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id t098bMMs173309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 9 Jan 2015 09:37:22 +0100 Received: from VittGamLaptop2 (VittGamLaptop2.router1net.VittGam.net [10.48.3.146]) by mail2.vittgam.net (8.14.4/8.14.4/Debian-2ubuntu2) with SMTP id t098aW60028225; Fri, 9 Jan 2015 09:36:50 +0100 Date: Fri, 9 Jan 2015 09:36:32 +0100 From: "Vittorio G (VittGam)" Message-Id: To: Subject: [OpenWrt-Devel] [PATCH] [RESEND] [v2] base-files: Use 200ms LED timing as before for the new phase preinit_regular. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" This restores normal pre-r43715 200ms blink-period for the System LED we're all accustomed to see while our OpenWrt routers are booting. Failsafe possibility will now be signalled with a new 100ms blinking, which is easily recognizable from the normal 200ms booting. So no existing user will be scared by a new 500ms LED pattern, since such a slow pattern could easily be mistaken for something wrong... I was like "ok why my router is collapsing now, is this a bad flash, a kernel panic, or what else" when I've seen it for the first time ;) Sorry for not having explained myself better in v1 of this patch. Original: Preinit, failsafe is possible: 200ms Preinit, failsafe not possible anymore, booting normally: 200ms Failsafe entered: 50ms Now (after preinit_regular has been introduced): Preinit, failsafe is possible: 200ms Preinit, failsafe not possible anymore, booting normally: 500ms *here is the "offending" change* Failsafe entered: 50ms With my proposed patch: Preinit, failsafe is possible: 100ms *indicate this condition with a new timing, that prompts the user to press the key if they want to start failsafe* Preinit, failsafe not possible anymore, booting normally: 200ms *keep this as before* Failsafe entered: 50ms Signed-off-by: Vittorio Gambaletta diff --git a/package/base-files/files/lib/functions/leds.sh b/package/base-files/files/lib/functions/leds.sh index 4ac8145..d4d4512 100644 --- a/package/base-files/files/lib/functions/leds.sh +++ b/package/base-files/files/lib/functions/leds.sh @@ -60,7 +60,7 @@ status_led_blink_fast() { } status_led_blink_preinit() { - led_timer $status_led 200 200 + led_timer $status_led 100 100 } status_led_blink_failsafe() { @@ -68,5 +68,5 @@ status_led_blink_failsafe() { } status_led_blink_preinit_regular() { - led_timer $status_led 500 500 + led_timer $status_led 200 200 }