From 3790c0bbc1482a5ce17f264feeaf567458378ccb Mon Sep 17 00:00:00 2001 From: Noel Eck Date: Fri, 8 Jun 2018 14:11:59 -0700 Subject: [PATCH] rsc.py: Added snippet to test rsc_regs.h types Since UPM Travis-CI runs ctests (one of which loads python examples), the added lines would fail if the RSC_DATA_RATE and RSC_MODE have not been included in the python rsc module.) Signed-off-by: Noel Eck --- examples/python/rsc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/python/rsc.py b/examples/python/rsc.py index df570cfd..237bf386 100755 --- a/examples/python/rsc.py +++ b/examples/python/rsc.py @@ -25,6 +25,11 @@ from __future__ import print_function import time, sys, signal, atexit from upm import pyupm_rsc as rsc +# Since CI loads each python example, the following would fail if the types +# from rsc_regs.h are NOT exposed in the pyupm_rsc module +mode = rsc.NORMAL_MODE +dr = rsc.N_DR_20_SPS + def main(): # Instantiate a Honeywell RSC Pressure sensor on the SPI bus 0 rsc_sensor = rsc.RSC(0, 9, 8);