Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
Fix mask size.
Browse files Browse the repository at this point in the history
  • Loading branch information
FozzTexx committed Feb 17, 2016
1 parent f355d63 commit 04b2929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PyMata/pymata.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def extended_analog(self, pin, data):
@param pin: 0 - 127
@param data: 0 - 0xfffff
"""
analog_data = [pin, data & 0x7f, (data >> 7) & 0x7f, (data >> 14) & 0x3fff]
analog_data = [pin, data & 0x7f, (data >> 7) & 0x7f, (data >> 14) & 0x7f]
self._command_handler.send_sysex(self._command_handler.EXTENDED_ANALOG, analog_data)


Expand Down Expand Up @@ -842,7 +842,7 @@ def stepper_step(self, motor_speed, number_of_steps):
else:
direction = 0
abs_number_of_steps = abs(number_of_steps)
data = [self.STEPPER_STEP, motor_speed & 0x7f, (motor_speed >> 7) & 0x7f, (motor_speed >> 14) & 0x3fff,
data = [self.STEPPER_STEP, motor_speed & 0x7f, (motor_speed >> 7) & 0x7f, (motor_speed >> 14) & 0x7f,
abs_number_of_steps & 0x7f, (abs_number_of_steps >> 7) & 0x7f, direction]
self._command_handler.send_sysex(self._command_handler.STEPPER_DATA, data)

Expand Down

0 comments on commit 04b2929

Please sign in to comment.