+def start_rmr_thread(real_init=True):
+ """
+ Start a1s rmr thread
+ Also called during unit testing
+ """
+ rmr_loop = a1rmr.RmrLoop(real_init)
+ thread = Thread(target=rmr_loop.loop)
+ thread.start()
+ while not rmr_loop.rmr_is_ready():
+ time.sleep(0.5)
+ return rmr_loop # return the handle; useful during unit testing
+
+