Example #1
0
    def __init__(self, uri, geos, calibs):
        self._event = Event()

        with SyncCrazyflie(uri, cf=Crazyflie(rw_cache='./cache')) as scf:
            writer = LighthouseConfigWriter(scf.cf, nr_of_base_stations=2)
            writer.write_and_store_config(self._data_written,
                                          geos=geos,
                                          calibs=calibs)
            self._event.wait()
Example #2
0
 def writeBaseStationData(self, geometryOne, geometryTwo):
     geo_dict = {0: geometryOne, 1: geometryTwo}
     helper = LighthouseMemHelper(self.crazyflie.cf)
     writer = LighthouseConfigWriter(self.crazyflie.cf,
                                     nr_of_base_stations=2)
     self.write(lambda: helper.write_geos(geo_dict, self.writeComplete))
     self.write(lambda: writer.write_and_store_config(self.writeComplete,
                                                      geos=geo_dict,
                                                      calibs=calibration.
                                                      CALIBRATION_DATA))
     exceptionUtil.checkInterrupt()
Example #3
0
    bs2calib.sweeps[1].gibmag = 4.51
    bs2calib.sweeps[1].gibphase = 5.51
    bs2calib.sweeps[1].ogeemag = 6.51
    bs2calib.sweeps[1].ogeephase = 7.51
    bs2calib.uid = 9876
    bs2calib.valid = True
    calib_dict = {0: bs1calib, 1: bs2calib}

    # Note: base station ids (channels) are 0-indexed
    geo_dict = {0: geometryOne, 1: geometryTwo}
    write(lambda: helper.write_geos(geo_dict, writeComplete))
    write(lambda: helper.write_calibs(calib_dict, writeComplete))

    writer = LighthouseConfigWriter(scf.cf, nr_of_base_stations=2)
    writer.write_and_store_config(writeComplete,
                                  geos=geo_dict,
                                  calibs=calib_dict)
    #
    # print()
    # readEvent.clear()
    # helper.read_all_geos(geoDataReady)
    # readEvent.wait()
    #
    # # time.sleep(1.0)
    # print()
    # print()
    # print()
    start_position_printing(scf)
    reset_estimator(scf)

    while True: