V61
authorjoan <joan@abyz.co.uk>
Sun, 19 Feb 2017 11:28:15 +0000 (11:28 +0000)
committerjoan <joan@abyz.co.uk>
Sun, 19 Feb 2017 11:28:15 +0000 (11:28 +0000)
pigpio.c
pigpio.h
pigpio.py
pigs.1

index 570a8a2164e9c74796788f95718f23a974d2de34..4e5286f722a5f6d7733192819722c32f5053b83d 100644 (file)
--- a/pigpio.c
+++ b/pigpio.c
@@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 For more information, please refer to <http://unlicense.org/>
 */
 
-/* pigpio version 60 */
+/* pigpio version 61 */
 
 /* include ------------------------------------------------------- */
 
@@ -9484,6 +9484,12 @@ int gpioWaveTxSend(unsigned wave_id, unsigned wave_mode)
       PWMClockInited = 0;
    }
 
+   if (wave_mode < PI_WAVE_MODE_ONE_SHOT_SYNC)
+   {
+      dmaOut[DMA_CS] = DMA_CHANNEL_RESET;
+      dmaOut[DMA_CONBLK_AD] = 0;
+   }
+
    p = rawWaveCBAdr(waveInfo[wave_id].topCB);
 
    if ((wave_mode & 1) == PI_WAVE_MODE_ONE_SHOT)
index 5a28e6449c9086cf1827a8f5b667ce414f6f4ec8..57137c399a8d781cbefcc9a5ebd0f1d68f31c297 100644 (file)
--- a/pigpio.h
+++ b/pigpio.h
@@ -31,7 +31,7 @@ For more information, please refer to <http://unlicense.org/>
 #include <stdint.h>
 #include <pthread.h>
 
-#define PIGPIO_VERSION 60
+#define PIGPIO_VERSION 61
 
 /*TEXT
 
@@ -676,10 +676,10 @@ typedef void *(gpioThreadFunc_t) (void *);
 
 /* Files, I2C, SPI, SER */
 
-#define PI_FILE_SLOTS 8
-#define PI_I2C_SLOTS 32
-#define PI_SPI_SLOTS 16
-#define PI_SER_SLOTS 8
+#define PI_FILE_SLOTS 16
+#define PI_I2C_SLOTS  64
+#define PI_SPI_SLOTS  32
+#define PI_SER_SLOTS  16
 
 #define PI_MAX_I2C_ADDR 0x7F
 
index 65e0ac5a633eedcd51140fa37ab56ebea3aa45ba..517943f8eba085ee727712ca963824d82d7b4865 100644 (file)
--- a/pigpio.py
+++ b/pigpio.py
@@ -299,7 +299,7 @@ import threading
 import os
 import atexit
 
-VERSION = "1.35"
+VERSION = "1.36"
 
 exceptions = True
 
@@ -4888,7 +4888,7 @@ class pi():
       return a.trigger
 
    def __init__(self,
-                host = os.getenv("PIGPIO_ADDR", ''),
+                host = os.getenv("PIGPIO_ADDR", 'localhost'),
                 port = os.getenv("PIGPIO_PORT", 8888)):
       """
       Grants access to a Pi's GPIO.
@@ -4926,6 +4926,9 @@ class pi():
 
       port = int(port)
 
+      if host == '':
+         host = "localhost"
+
       self._host = host
       self._port = port
 
@@ -4954,12 +4957,7 @@ class pi():
          if self.sl.s is not None:
             self.sl.s = None
 
-         if host == '':
-            h = "localhost"
-         else:
-            h = host
-
-         s = "Can't connect to pigpio at {}({})".format(str(h), str(port))
+         s = "Can't connect to pigpio at {}({})".format(host, str(port))
 
          print(_except_a.format(s))
          if exception == 1:
diff --git a/pigs.1 b/pigs.1
index 28bc9bfebdcae4602e7441d80fc033dc05233d21..d909863608af7d7ff283ddac9fca7bca85ba3912 100644 (file)
--- a/pigs.1
+++ b/pigs.1
@@ -189,6 +189,37 @@ When a command takes a number as a parameter it may be entered as hex
 .br
 E.g. 23 is 23 decimal, 0x100 is 256 decimal, 070 is 56 decimal.
 
+.br
+Some commands can return a variable number of data bytes.  By
+default this data is displayed as decimal.  The pigs -a option
+can be used to force the display as ASCII and the pigs -x
+option can be used to force the display as hex.
+
+.br
+E.g. assuming the transmitted serial data is the letters ABCDEONM
+
+.br
+
+.EX
+$ pigs slr 4 100
+.br
+8 65 66 67 68 69 79 78 77
+.br
+
+.br
+$ pigs -a slr 4 100
+.br
+8 ABCDEONM
+.br
+
+.br
+$ pigs -x slr 4 100
+.br
+8 41 42 43 44 45 4f 4e 4d
+.br
+
+.EE
+
 .br
 
 .SH COMMANDS