示例#1
0
    def on_event_tx(self, data):
        ANTMessagePayload = self.Create_Next_DataPage()
        self.ActualTime = time.time() - self.TimeProgramStart

        # ANTMessagePayload = array.array('B', [1, 255, 133, 128, 8, 0, 128, 0])    # just for Debuggung pourpose

        self.channel.send_broadcast_data(
            self.ANTMessagePayload)  # Final call for broadcasting data
        print(
            self.ActualTime,
            "TX:",
            Device_Number,
            ",",
            Device_Type,
            ":",
            format_list(ANTMessagePayload),
        )
示例#2
0
def on_data_ack_scan(data):
    deviceNumber = data[10] * 256 + data[9]
    deviceType = data[11]
    ActualTime = time.time() - TimeProgramStart
    print(ActualTime, "RX-Ack:", deviceNumber, ", ", deviceType, ":",
          format_list(data))