Skip to content

Commit 787ff8d

Browse files
committed
express bug
1 parent 2d80ba5 commit 787ff8d

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ For protocol specifications please refer to the slamtec
1313
You can install rplidar using `pip`:
1414

1515
```sh
16-
$ pip install rplidar
16+
$ pip install rplidar-roboticia
1717
```
1818

1919
Or for Python 3:
2020
```sh
21-
$ sudo pip3 install rplidar
21+
$ sudo pip3 install rplidar-roboticia
2222
```
2323

2424
## Documentation

rplidar.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,12 @@ def _process_scan(raw):
9595

9696

9797
def _process_express_scan(data, new_angle, trame):
98-
if trame == 1:
99-
new = True
100-
else:
101-
new = False
102-
new_scan = (new_angle < data.start_angle) & new
103-
quality = None
98+
new_scan = (new_angle < data.start_angle) & (trame == 1)
10499
angle = (data.start_angle + (
105100
(new_angle - data.start_angle) % 360
106101
)/32*trame - data.angle[trame-1]) % 360
107102
distance = data.distance[trame-1]
108-
return new_scan, quality, angle, distance
103+
return new_scan, None, angle, distance
109104

110105

111106
class RPLidar(object):
@@ -481,7 +476,7 @@ def from_string(cls, data):
481476
start_angle = (packet[2] + ((packet[3] & 0b01111111) << 8)) / 64
482477

483478
d = a = ()
484-
for i in range(16):
479+
for i in range(0,80,5):
485480
d += ((packet[i+4] >> 2) + (packet[i+5] << 6),)
486481
a += (((packet[i+8] & 0b00001111) + ((
487482
packet[i+4] & 0b00000001) << 4))/8*cls.sign[(

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
setup(
88
name = 'rplidar-roboticia',
99
py_modules = ['rplidar'],
10-
version = '0.9.4',
10+
version = '0.9.5',
1111
description = 'Simple and lightweight module for working with RPLidar laser scanners',
1212
author='Artyom Pavlov, Julien Jehl',
1313
author_email='[email protected]',
@@ -19,7 +19,7 @@
1919
'with RPLidar laser scanners. It\'s Python 2 and 3 '
2020
'compatible but was mainly tested using Python 3.',
2121
classifiers=[
22-
'Development Status :: 4 - Beta',
22+
'Development Status :: 5 - Production/Stable',
2323
'Environment :: Console',
2424
'Intended Audience :: Developers',
2525
'Intended Audience :: Education',

0 commit comments

Comments
 (0)