Cleanup
This commit is contained in:
parent
e6732d62df
commit
6e3ddc2045
13
miband.py
13
miband.py
|
@ -301,16 +301,6 @@ class miband(Peripheral):
|
||||||
self.waitForNotifications(wait)
|
self.waitForNotifications(wait)
|
||||||
|
|
||||||
|
|
||||||
# def send_gyro_start(self, sensitivity):
|
|
||||||
# if not self.gyro_started_flag:
|
|
||||||
# self._log.info("Starting gyro...")
|
|
||||||
# self.write_req(self._sensor_handle, BYTEPATTERNS.start)
|
|
||||||
# self.write_req(self._steps_handle, BYTEPATTERNS.start)
|
|
||||||
# self.write_req(self._hz_handle, BYTEPATTERNS.start)
|
|
||||||
# self.gyro_started_flag = True
|
|
||||||
# self.write_cmd(self._char_sensor, BYTEPATTERNS.gyro_start(sensitivity))
|
|
||||||
# self.write_req(self._sensor_handle, BYTEPATTERNS.stop)
|
|
||||||
# self.write_cmd(self._char_sensor, b'\x02')
|
|
||||||
def send_gyro_start(self, sensitivity):
|
def send_gyro_start(self, sensitivity):
|
||||||
if not self.gyro_started_flag:
|
if not self.gyro_started_flag:
|
||||||
self._log.info("Starting gyro...")
|
self._log.info("Starting gyro...")
|
||||||
|
@ -319,10 +309,9 @@ class miband(Peripheral):
|
||||||
self.write_req(self._hz_handle, BYTEPATTERNS.start)
|
self.write_req(self._hz_handle, BYTEPATTERNS.start)
|
||||||
self.gyro_started_flag = True
|
self.gyro_started_flag = True
|
||||||
self.write_cmd(self._char_sensor, BYTEPATTERNS.gyro_start(sensitivity))
|
self.write_cmd(self._char_sensor, BYTEPATTERNS.gyro_start(sensitivity))
|
||||||
self.write_cmd(self._char_sensor, bytes.fromhex("010100000019"))
|
|
||||||
self.write_req(self._sensor_handle, BYTEPATTERNS.stop)
|
self.write_req(self._sensor_handle, BYTEPATTERNS.stop)
|
||||||
self.write_cmd(self._char_sensor, b'\x02')
|
self.write_cmd(self._char_sensor, b'\x02')
|
||||||
self.write_cmd(self._char_sensor, b'\x03')
|
|
||||||
|
|
||||||
def send_heart_measure_start(self):
|
def send_heart_measure_start(self):
|
||||||
self._log.info("Starting heart measure...")
|
self._log.info("Starting heart measure...")
|
||||||
|
|
Loading…
Reference in New Issue