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 <noel.eck@intel.com>
This commit is contained in:
Noel Eck 2018-06-08 14:11:59 -07:00
parent 7a2332fa7d
commit 3790c0bbc1

View File

@ -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);