PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

tester.py 651B

3 lat temu
123456789101112131415161718192021222324
  1. # -*- coding: utf-8 -*-
  2. # ------------------------------------------------------------------------------
  3. class Tester:
  4. def __init__(self, interface):
  5. self.interface = interface
  6. self.sent = None
  7. self.expected = None
  8. self.received = None
  9. def handleMidiInput(self, data):
  10. print('Recived data:', data)
  11. self.received = data
  12. def checkThru(self, message):
  13. self.interface.send(message)
  14. self.sent = message
  15. self.expected = message
  16. self.received = None
  17. while not self.received:
  18. pass
  19. return self.expected == self.received