HandsON-BuildHat-API 1.0.8__tar.gz → 1.0.9__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: HandsON-BuildHat-API
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
4
  Summary: A third-party API for controlling LEGO SPIKE devices
5
5
  Author-email: HaNeul Jung <hnjung@handsontech.co.kr>
6
6
  License: Proprietary - Personal/Educational Use Only
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "HandsON-BuildHat-API"
4
- version = "1.0.8"
4
+ version = "1.0.9"
5
5
  description = "A third-party API for controlling LEGO SPIKE devices"
6
6
  authors = [
7
7
  { name="HaNeul Jung", email="hnjung@handsontech.co.kr" }
@@ -229,10 +229,11 @@ class Motor(_ModuleParent):
229
229
  if not speed in range(-100, 101):
230
230
  raise Exception('모터의 속도는 ~100 ~ 100 사이의 정수만 입력 가능합니다.')
231
231
 
232
- if speed > 0: sw = 1
233
- else: sw = 0
232
+ # if speed > 0: sw = 1
233
+ # else: sw = 0
234
+ if speed < 0: speed = speed & 0xFF
234
235
 
235
- com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.MOTOR_PWM, abs(speed), sw))
236
+ com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.MOTOR_PWM, speed))
236
237
  self._get_data(com)
237
238
 
238
239
  def run_to_position(self, degrees, speed) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: HandsON-BuildHat-API
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
4
  Summary: A third-party API for controlling LEGO SPIKE devices
5
5
  Author-email: HaNeul Jung <hnjung@handsontech.co.kr>
6
6
  License: Proprietary - Personal/Educational Use Only