Module Name:    src
Committed By:   mbalmer
Date:           Sun Nov 13 09:46:11 UTC 2011

Modified Files:
        src/lib/lua/gpio: gpio.c

Log Message:
Start numbering pions with 0, not 1.  Ruined a demo, so it was a bad idea.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/lua/gpio/gpio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/lua/gpio/gpio.c
diff -u src/lib/lua/gpio/gpio.c:1.3 src/lib/lua/gpio/gpio.c:1.4
--- src/lib/lua/gpio/gpio.c:1.3	Mon Oct 10 20:41:05 2011
+++ src/lib/lua/gpio/gpio.c	Sun Nov 13 09:46:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: gpio.c,v 1.3 2011/10/10 20:41:05 christos Exp $ */
+/*	$NetBSD: gpio.c,v 1.4 2011/11/13 09:46:11 mbalmer Exp $ */
 
 /*
  * Copyright (c) 2011 Marc Balmer <m...@msys.ch>
@@ -112,7 +112,7 @@ gpio_get_pin(lua_State *L, int n, struct
 {
 	switch (lua_type(L, n)) {
 	case LUA_TNUMBER:
-		req->gp_pin = (int)lua_tointeger(L, n) - 1;	/* 1 based! */
+		req->gp_pin = (int)lua_tointeger(L, n);	/* not 1 based! */
 		break;
 	case LUA_TSTRING:
 		strlcpy(req->gp_name, lua_tostring(L, n), sizeof(req->gp_name));

Reply via email to