Skip to content

Commit

Permalink
merge pl3 & pl4
Browse files Browse the repository at this point in the history
  • Loading branch information
UedaTakeyuki committed Jan 22, 2019
1 parent b248a37 commit 194c9d5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -193,3 +193,5 @@ Any questions, suggestions, reports are welcome! Please make [issue](https://git
- 0.2.2 2018.11.19 introduce [pondslider](https://pypi.org/project/pondslider/) and separate this [PyPi](https://pypi.org/project/mh-z19/) package.
- 2.0.0 2019.01.18 Add Calibration, ABC on/off requested by [this issue](https://github.com/UedaTakeyuki/mh-z19/issues/1). Please refer this [wiki](https://github.com/UedaTakeyuki/mh-z19/wiki/module).
- 0.3.5 2019.01.22 Both Python2 & Python3 support
- 2.3.6 2019.01.22 Merge [Pull Request #3](https://github.com/UedaTakeyuki/mh-z19/pull/3) & [Pull Request #4](https://github.com/UedaTakeyuki/mh-z19/pull/4). Thanks [David](https://github.com/kostaldavid8)!

11 changes: 6 additions & 5 deletions mh_z19.py
Expand Up @@ -12,6 +12,7 @@
import platform
import argparse
import sys
import json

# setting

Expand Down Expand Up @@ -109,18 +110,18 @@ def zero_point_calibration():
def detection_range_5000():
ser = connect_serial()
if p_ver == '2':
request = "\xff\x01\x99\x13\x88\x00\x00\x00\xcb"
request = "\xff\x01\x99\x00\x00\x00\x13\x88\xcb"
else:
request = b"\xff\x01\x99\x13\x88\x00\x00\x00\xcb"
request = b"\xff\x01\x99\x00\x00\x00\x13\x88\xcb"
result = ser.write(request)
ser.close()

def detection_range_2000():
ser = connect_serial()
if p_ver == '2':
request = "\xff\x01\x99\x07\xd0\x00\x00\x00\xc6"
request = "\xff\x01\x99\x00\x00\x00\x07\xd0\x8F"
else:
request = b"\xff\x01\x99\x07\xd0\x00\x00\x00\xc6"
request = b"\xff\x01\x99\x00\x00\x00\x07\xd0\x8F"
result = ser.write(request)
ser.close()

Expand Down Expand Up @@ -175,6 +176,6 @@ def checksum(array):
print ("Set Detection range as 2000.")
else:
value = read()
print (value)
print (json.dumps(value))

sys.exit(0)
3 changes: 2 additions & 1 deletion pypi/README.md
Expand Up @@ -106,4 +106,5 @@ Any questions, suggestions, reports are welcome! Please make [issue](https://git
abc_on(), abc_off(), span_point_calibration(),
xero_point_calibration(), detection_range_5000(),
detection_range_2000(), checksum()
- 0.3.4 2019.01.22 Both Python2 & Python3 support
- 0.3.5 2019.01.22 Both Python2 & Python3 support
- 0.3.6 2019.01.22 Merge [Pull Request #3](https://github.com/UedaTakeyuki/mh-z19/pull/3) & [Pull Request #4](https://github.com/UedaTakeyuki/mh-z19/pull/4). Thanks [David](https://github.com/kostaldavid8)!
4 changes: 2 additions & 2 deletions pypi/mh_z19/__init__.py
Expand Up @@ -116,9 +116,9 @@ def detection_range_5000():
def detection_range_2000():
ser = connect_serial()
if p_ver == '2':
request = "\xff\x01\x99\x00\x00\x00\x07\xd0\xc6"
request = "\xff\x01\x99\x00\x00\x00\x07\xd0\x8F"
else:
request = b"\xff\x01\x99\x00\x00\x00\x07\xd0\xc6"
request = b"\xff\x01\x99\x00\x00\x00\x07\xd0\x8F"
result = ser.write(request)
ser.close()

Expand Down
2 changes: 1 addition & 1 deletion pypi/setup.py
Expand Up @@ -6,7 +6,7 @@
setup(
name = 'mh_z19',
packages = ['mh_z19'], # this must be the same as the name above
version = '0.3.5',
version = '0.3.6',
description = 'mh-z19 CO2 concentration sensor library for All models of Raspberry Pi',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 194c9d5

Please sign in to comment.