Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ctx = pysurvive.init(sys.argv)
if ctx is None: # implies -help or similiar
exit(-1)
def imu_func(ctx, mode, accelgyro, timecode, id):
print(accelgyro)
keepRunning = True
pysurvive.install_imu_fn(ctx, imu_func)
while keepRunning and pysurvive.poll(ctx) == 0:
pass
pysurvive.close(ctx)