def configure_sensor(serial_device, sensor_id, serial_enabled, channel, sleep_enabled): aci = AciUart.AciUart(port=serial_device, baudrate=115200) # Wait for serial connection to be ready time.sleep(2) cmd = sensei_cmd.SetConfig(sensor_id, serial_enabled, channel, sleep_enabled) data = cmd.serialize() aci.write_aci_cmd(AciCommand.AciAppCommand(data=data, length=len(data) + 1)) # Wait for flash to be written time.sleep(2) aci.write_aci_cmd(AciCommand.AciRadioReset()) aci.stop()
def RadioReset(self): self.acidev.write_aci_cmd(AciCommand.AciRadioReset())