smartpi 0.1.20__py3-none-any.whl → 0.1.21__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- smartpi/__init__.py +1 -1
- smartpi/flash.py +1 -1
- smartpi/servo.py +11 -0
- {smartpi-0.1.20.dist-info → smartpi-0.1.21.dist-info}/METADATA +1 -1
- {smartpi-0.1.20.dist-info → smartpi-0.1.21.dist-info}/RECORD +7 -7
- {smartpi-0.1.20.dist-info → smartpi-0.1.21.dist-info}/WHEEL +0 -0
- {smartpi-0.1.20.dist-info → smartpi-0.1.21.dist-info}/top_level.txt +0 -0
smartpi/__init__.py
CHANGED
smartpi/flash.py
CHANGED
|
@@ -7,7 +7,7 @@ FLASH_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "/home/Int
|
|
|
7
7
|
FLASH_FILE_2 = os.path.join(os.path.dirname(os.path.abspath(__file__)), "/home/Interface/flash/flash_2.bin")
|
|
8
8
|
|
|
9
9
|
DATA_SIZE = 2 # 每个数据2字节
|
|
10
|
-
TOTAL_SLOTS =
|
|
10
|
+
TOTAL_SLOTS = 120 # 100个数据槽
|
|
11
11
|
|
|
12
12
|
def _init_flash_file():
|
|
13
13
|
"""初始化存储文件"""
|
smartpi/servo.py
CHANGED
|
@@ -28,6 +28,17 @@ def steer_angle_delay(port:bytes,angle:bytes,second:bytes) -> Optional[bytes]:
|
|
|
28
28
|
else:
|
|
29
29
|
return 0
|
|
30
30
|
|
|
31
|
+
#���ֶ������ת������(���ԽǶ�) port:����P�˿ڣ�dir:0:����Խ0��;1:��̾�����ת;2:˳ʱ����ת;3:��ʱ����ת
|
|
32
|
+
def set_dir(port:bytes,dir:bytes) -> Optional[bytes]:
|
|
33
|
+
servo_str=[0xA0, 0x24, 0x01, 0x71, 0x00, 0xBE]
|
|
34
|
+
servo_str[0]=0XA0+port
|
|
35
|
+
servo_str[4]=dir
|
|
36
|
+
response = base_driver.single_operate_sensor(servo_str)
|
|
37
|
+
if response == None:
|
|
38
|
+
return None
|
|
39
|
+
else:
|
|
40
|
+
return 0
|
|
41
|
+
|
|
31
42
|
#BE-9528���ֶ�����ٶ�ת���Ƕ� port:����P�˿ڣ�angle:�Ƕ�(0~360)��speed:�ٶ�(0~100)��
|
|
32
43
|
def set_angle_speed(port:bytes,angle:bytes,speed:bytes) -> Optional[bytes]:
|
|
33
44
|
servo_str=[0xA0, 0x0D, 0x01, 0x81, 0x00, 0x00, 0x81, 0x00, 0xBE]
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
smartpi/__init__.py,sha256=
|
|
1
|
+
smartpi/__init__.py,sha256=QR4ouIPj9-lhXKMzcZUxB--K9gklRhYKZenfjmxWUOw,55
|
|
2
2
|
smartpi/base_driver.py,sha256=n_KIkdfk2BLzaPZpOj-hH30QuyiGwHSMQuosxj2YnOU,24172
|
|
3
3
|
smartpi/color_sensor.py,sha256=sTqD3jApjmc6qHMrDyEy2UjaRt8vhJZNR88vzgUiLKs,496
|
|
4
4
|
smartpi/cw2015.py,sha256=1lAF-pi_ye_ya1AZQS1sjbgsDf7MThO5IAskKsNGBzA,5695
|
|
5
|
-
smartpi/flash.py,sha256
|
|
5
|
+
smartpi/flash.py,sha256=-pUqg6FSVoBiLFKqrG9B4dFqn8lICnQsSPJr_MtZLIU,4132
|
|
6
6
|
smartpi/gui.py,sha256=E98_soyWbEf_dwYhXZgMSXrgY5QuYoDTuFCPK63flIQ,2102
|
|
7
7
|
smartpi/humidity.py,sha256=xtALQ_IlcwR2RCYvopCSmeNajB45kQU_ckk6FZ0rqko,497
|
|
8
8
|
smartpi/led.py,sha256=n3_k1jGcQptfGXhezDLaYzH6UptgluP4Ze6qP_Y4WmU,536
|
|
9
9
|
smartpi/light_sensor.py,sha256=glDa4O0wW0kamb-tI3qf509qM7zA8UUjVXbA9si3TXM,1844
|
|
10
10
|
smartpi/motor.py,sha256=uvuAwt2j5LjdLaMfNisXqaGh1ro3fZDvHU8IXd2fn9Q,4527
|
|
11
11
|
smartpi/move.py,sha256=3qzrJCGA-qbsLXBpklY2DErtw0jlzMELzozjhEvRzKs,6028
|
|
12
|
-
smartpi/servo.py,sha256=
|
|
12
|
+
smartpi/servo.py,sha256=p8BxfqXVQYP81Kl0J9P23AGoGTrnn8To98ipo6Z_Tkk,5035
|
|
13
13
|
smartpi/temperature.py,sha256=px2YeqgG63nPkyhJA1wDg3dwYx_oOCYuhMjtsVm_YO0,460
|
|
14
14
|
smartpi/touch_sensor.py,sha256=F6IIQGewNRhC9U1RbHpVzuGYqb8H41lpeQ1Ejwsc_T8,438
|
|
15
15
|
smartpi/trace.py,sha256=ntk3UwVATOV_eViGQhFi3lyil9xFmzeZZ_MBvQTq3UQ,4567
|
|
16
16
|
smartpi/ultrasonic.py,sha256=0meczFKXFLUt92kLxipeEc37vb5duvJjPs4kgtlpO8M,622
|
|
17
|
-
smartpi-0.1.
|
|
18
|
-
smartpi-0.1.
|
|
19
|
-
smartpi-0.1.
|
|
20
|
-
smartpi-0.1.
|
|
17
|
+
smartpi-0.1.21.dist-info/METADATA,sha256=bZEx5P-yz1jfxEPLJS9W-DhGHNrjyfXHHiKLlkLqpHE,311
|
|
18
|
+
smartpi-0.1.21.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
19
|
+
smartpi-0.1.21.dist-info/top_level.txt,sha256=PoLhUCmWAiQUg5UeN2fS-Y1iQyBbF2rdUlizXtpHGRQ,8
|
|
20
|
+
smartpi-0.1.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|